#2 Misuse of __unix__ token


You're using __unix__ as a proxy for many different
things, assuming "if not __unix__, then we're not on a
unix machine, and therefore we don't have certain
features". I'm using OS X, which is a darwin (BSDish)
unix at heart, but I don't get the __unix__ token
defined for some reason. It's quite possible that some
entirely-non-unix machine might have the specific
unixoid things you want, too.

Please use specific tests for the specific features

With AC_CHECK_HEADERS([fcntl.h]), you can use
HAVE_FCNTL_H in gb.c to know if you can use that header.

With some test (sorry, don't know if there's a built-in
AC_* for this) for the presence of /dev/urandom that
sets HAVE_DEV_URANDOM, you can use that and
HAVE_FCNTL_H in gb.c to decide whether to open random_fd.

With AC_CHECK_HEADERS([glob.h]), you can use
HAVE_GLOB_H in tm_workspace.c to know if you can use
that header. While you're there, why is the P_tmpdir
block part of the !__unix__ block anyway? Your code
appears to require that P_tmpdir be defined on all
platforms, so you shouldn't allow the block that makes
sure it's defined to be avoided.

I don't know enough about the goal or implementation of
tm_workspace_create_global_tags to know what features
it uses or functions it supplies that are assumed to be


  • Enrico Tröger

    Enrico Tröger - 2005-12-29
    • assigned_to: nobody --> eht16
    • status: open --> pending
  • Enrico Tröger

    Enrico Tröger - 2005-12-29
    • status: pending --> closed

Log in to post a comment.