This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Disabling top level fixincludes
- From: Bruce Korb <bkorb at veritas dot com>
- To: GCC-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Oct 2004 13:49:42 -0700
- Subject: Disabling top level fixincludes
- Reply-to: bkorb at veritas dot com
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