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