From 8238d2d4956cf55da2ad3ded123aca968e6f056a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 23 Oct 2010 09:42:37 +0200 Subject: [PATCH] maint: accommodate stricter syntax-check Avoid #if, #define and #undef of always-defined symbols. * gzip.c (ELOOP, SIGPIPE): Remove unneeded cpp directives. * tailor.h (HAVE_DIRENT_H, HAVE_FCNTL_H, HAVE_UNISTD_H, MSDOS): (O_BINARY): Likewise. --- gzip.c | 8 -------- tailor.h | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/gzip.c b/gzip.c index acb8b55..bba4c76 100644 --- a/gzip.c +++ b/gzip.c @@ -144,10 +144,6 @@ static char const *const license_msg[] = { # define HAVE_WORKING_O_NOFOLLOW 0 #endif -#ifndef ELOOP -# define ELOOP EINVAL -#endif - /* Separator for file name parts (see shorten_name()) */ #ifdef NO_MULTIPLE_DOTS # define PART_SEP "-" @@ -234,11 +230,7 @@ static int handled_sig[] = #ifdef SIGHUP , SIGHUP #endif -#ifdef SIGPIPE , SIGPIPE -#else -# define SIGPIPE 0 -#endif #ifdef SIGTERM , SIGTERM #endif diff --git a/tailor.h b/tailor.h index 39eb0a1..ef7695e 100644 --- a/tailor.h +++ b/tailor.h @@ -39,17 +39,12 @@ /* DJGPP version 1.09+ on MS-DOS. * The DJGPP 1.09 stat() function must be upgraded before gzip will * fully work. - * No need for HAVE_DIRENT_H, since defines POSIX_SOURCE which - * implies HAVE_DIRENT_H. */ # define near # else # define MAXSEG_64K # ifdef __TURBOC__ # define off_t long -# ifdef __BORLANDC__ -# define HAVE_DIRENT_H -# endif # define HAVE_UTIME_H # else /* MSC */ # define HAVE_SYS_UTIME_H @@ -100,12 +95,10 @@ # endif # ifdef __EMX__ # define HAVE_SYS_UTIME_H -# define HAVE_DIRENT_H # define EXPAND(argc,argv) \ {_response(&argc, &argv); _wildcard(&argc, &argv);} # endif # ifdef __BORLANDC__ -# define HAVE_DIRENT_H # define HAVE_UTIME_H # endif # ifdef __ZTC__ @@ -174,8 +167,6 @@ # define unlink delete # ifdef VAXC # include -# else -# define HAVE_FCNTL_H # endif #endif @@ -185,9 +176,6 @@ # define OS_CODE 0x01 # define ASMV # ifdef __GNUC__ -# define HAVE_DIRENT_H -# define HAVE_FCNTL_H -# define HAVE_UNISTD_H # define HAVE_CHOWN # define HAVE_LSTAT # else /* SASC */ @@ -197,7 +185,6 @@ # define direct dirent extern void _expand_args(int *argc, char ***argv); # define EXPAND(argc,argv) _expand_args(&argc,&argv); -# undef O_BINARY /* disable useless --ascii option */ # endif #endif -- 2.47.2