bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Macros __unix__ and unix.


From: Mats Erik Andersson
Subject: [bug-inetutils] Macros __unix__ and unix.
Date: Sat, 7 Jan 2012 01:44:17 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Dear all,

a quick search

  $ git grep -l '#.*def.*\<unix\>'
  ftp/cmds.c
  ftpd/ftpcmd.y
  telnet/commands.c
  telnet/main.c
  telnet/telnet.c
  telnet/tn3270.c
  telnet/utilities.c

hides a portability problem we have at present:

  GNU/Linux, OpenSolaris define "unix" and "__unix__",

  OpenBSD defines only "__unix__".

In the above seven files, only "ftpd/ftpcmd.y" is accepting
"unix" as well as "__unix__", the other only checks on "unix".
Going to the contemporary OpenBSD source for "telnet", their
make file circumvents the problem by passing "-Dunix" to Gcc,
which we do not.

Question: Is a manual rewrite using

  #if defined unix || defined __unix__

a good solution, or should we let "configure.ac" trigger
the insertion of a macro "unix" based on "__unix__", should
the former be missing?

Best regards,
  Mats



reply via email to

[Prev in Thread] Current Thread [Next in Thread]