This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Disabling top level fixincludes


Hi guys,

C.F.: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00934.html

Looks good to me.  My solution was just a no-op script when nothing
was wanted.  The main thing is to avoid doing a lot of work when
nothing needs doing.  :)  It looks like you've glued it into
a more general purpose construct.


C.F.: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01393.html

Fixing portability is a good thing.  I would try to reduce ifdef-ed
code though with things like:

  #ifndef SIGKILL
  #  define SIGKILL SIGTERM
  #endif

and then simply replace all:

  fcntl (stdout_pair.write_fd, F_DUPFD, STDOUT_FILENO);

type invocations with:

  dup2 (stdout_pair.write_fd, STDOUT_FILENO);

because the latter should always work.  Better still, macro-ize
the silly thing:

  #define DUP_FD( _ofd, _nfd ) \
    dup2 ( (_ofd), (_nfd) )

and if some platform needs the fcntl, another #define gets added
and the code remains unchanged.

Cheers - Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]