summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-03-15 17:54:50 +0000
committerJim Meyering <jim@meyering.net>1998-03-15 17:54:50 +0000
commit6684ffa826953b473fe8d7b93770905d081dda74 (patch)
treecdd766842381aab41179bf6b4c9b12295aa40572
parentbfbc3ce20cdcfd00c27922c2e78cbff43846fe0d (diff)
downloadcoreutils-6684ffa826953b473fe8d7b93770905d081dda74.tar.gz
Use #if, not #ifdef with HAVE_ macros.
Use #if !, not #ifndef with HAVE_ macros.
-rw-r--r--src/chgrp.c6
-rw-r--r--src/chown.c6
-rw-r--r--src/copy.c6
-rw-r--r--src/dd.c2
-rw-r--r--src/dircolors.c2
-rw-r--r--src/install.c4
-rw-r--r--src/ls.c4
-rw-r--r--src/mv.c2
-rw-r--r--src/touch.c6
9 files changed, 19 insertions, 19 deletions
diff --git a/src/chgrp.c b/src/chgrp.c
index c4c701b76..3eb9ca213 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -39,11 +39,11 @@
struct group *getgrnam ();
#endif
-#ifndef HAVE_ENDGRENT
+#if ! HAVE_ENDGRENT
# define endgrent() ((void) 0)
#endif
-#ifdef HAVE_LCHOWN
+#if HAVE_LCHOWN
# define LCHOWN(FILE, OWNER, GROUP) lchown (FILE, OWNER, GROUP)
#else
# define LCHOWN(FILE, OWNER, GROUP) 1
@@ -379,7 +379,7 @@ main (int argc, char **argv)
usage (1);
}
-#ifndef HAVE_LCHOWN
+#if ! HAVE_LCHOWN
if (change_symlinks)
{
error (1, 0, _("--no-dereference (-h) is not supported on this system"));
diff --git a/src/chown.c b/src/chown.c
index 9fec27aef..57e6f3840 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -46,11 +46,11 @@ struct group *getgrnam ();
struct group *getgrgid ();
#endif
-#ifndef HAVE_ENDPWENT
+#if ! HAVE_ENDPWENT
# define endpwent() ((void) 0)
#endif
-#ifdef HAVE_LCHOWN
+#if HAVE_LCHOWN
# define LCHOWN(FILE, OWNER, GROUP) lchown (FILE, OWNER, GROUP)
#else
# define LCHOWN(FILE, OWNER, GROUP) 1
@@ -356,7 +356,7 @@ main (int argc, char **argv)
usage (1);
}
-#ifndef HAVE_LCHOWN
+#if ! HAVE_LCHOWN
if (change_symlinks)
{
error (1, 0, _("--no-dereference (-h) is not supported on this system"));
diff --git a/src/copy.c b/src/copy.c
index c98923a88..70bd56082 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -170,7 +170,7 @@ copy_reg (const char *src_path, const char *dst_path,
buf_size = ST_BLKSIZE (sb);
-#ifdef HAVE_ST_BLOCKS
+#if HAVE_ST_BLOCKS
if (sparse_mode == SPARSE_AUTO && S_ISREG (sb.st_mode))
{
/* Use a heuristic to determine whether SRC_PATH contains any
@@ -267,7 +267,7 @@ copy_reg (const char *src_path, const char *dst_path,
if (last_write_made_hole)
{
-#ifdef HAVE_FTRUNCATE
+#if HAVE_FTRUNCATE
/* Write a null character and truncate it again. */
if (full_write (dest_desc, "", 1) < 0
|| ftruncate (dest_desc, n_read_total) < 0)
@@ -659,7 +659,7 @@ copy_internal (const char *src_path, const char *dst_path,
{
/* Preserve the owner and group of the just-`copied'
symbolic link, if possible. */
-# ifdef HAVE_LCHOWN
+# if HAVE_LCHOWN
if (DO_CHOWN (lchown, dst_path, src_sb.st_uid, src_sb.st_gid))
{
error (0, errno, _("preserving ownership for %s"), dst_path);
diff --git a/src/dd.c b/src/dd.c
index 538d74008..276dce1b9 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1106,7 +1106,7 @@ main (int argc, char **argv)
output_fd = open (output_file, omode, 0666);
if (output_fd < 0)
error (1, errno, "%s", output_file);
-#ifdef HAVE_FTRUNCATE
+#if HAVE_FTRUNCATE
if (seek_record != 0 && !(conversions_mask & C_NOTRUNC))
{
off_t o = seek_record * output_blocksize;
diff --git a/src/dircolors.c b/src/dircolors.c
index b16d7e27a..336c0580c 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
diff --git a/src/install.c b/src/install.c
index 4d9c4374c..c36fd1b9e 100644
--- a/src/install.c
+++ b/src/install.c
@@ -95,11 +95,11 @@ uid_t getuid ();
gid_t getgid ();
#endif
-#ifndef HAVE_ENDGRENT
+#if ! HAVE_ENDGRENT
# define endgrent() ((void) 0)
#endif
-#ifndef HAVE_ENDPWENT
+#if ! HAVE_ENDPWENT
# define endpwent() ((void) 0)
#endif
diff --git a/src/ls.c b/src/ls.c
index 971be77c2..b154e8414 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -47,7 +47,7 @@
# include <inttypes.h>
#endif
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
# include <termios.h>
#endif
@@ -2167,7 +2167,7 @@ print_long_format (const struct fileinfo *f)
const char *fmt;
char *user_name;
-#ifdef HAVE_ST_DM_MODE
+#if HAVE_ST_DM_MODE
mode_string (f->stat.st_dm_mode, modebuf);
#else
mode_string (f->stat.st_mode, modebuf);
diff --git a/src/mv.c b/src/mv.c
index e9d94a910..07da4fadc 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -60,7 +60,7 @@
#include "remove.h"
#include "error.h"
-#ifdef HAVE_LCHOWN
+#if HAVE_LCHOWN
# define chown(PATH, OWNER, GROUP) lchown(PATH, OWNER, GROUP)
#endif
diff --git a/src/touch.c b/src/touch.c
index 41decd08a..7f90b5f52 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -52,7 +52,7 @@ int safe_read ();
int full_write ();
void invalid_arg ();
-#ifndef HAVE_UTIME_NULL
+#if ! HAVE_UTIME_NULL
static int utime_now ();
#endif
@@ -171,7 +171,7 @@ touch (char *file)
if (amtime_now)
{
-#ifndef HAVE_UTIME_NULL
+#if ! HAVE_UTIME_NULL
status = utime_now (file, sbuf.st_size);
#else
/* Pass NULL to utime so it will not fail if we just have
@@ -209,7 +209,7 @@ touch (char *file)
return 0;
}
-#ifndef HAVE_UTIME_NULL
+#if ! HAVE_UTIME_NULL
/* Emulate utime (file, NULL) for systems (like 4.3BSD) that do not
interpret it to set the access and modification times of FILE to
the current time. FILESIZE is the correct size of FILE, used to