Use #if !, not #ifndef with HAVE_ macros.
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
usage (1);
}
-#ifndef HAVE_LCHOWN
+#if ! HAVE_LCHOWN
if (change_symlinks)
{
error (1, 0, _("--no-dereference (-h) is not supported on this system"));
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
usage (1);
}
-#ifndef HAVE_LCHOWN
+#if ! HAVE_LCHOWN
if (change_symlinks)
{
error (1, 0, _("--no-dereference (-h) is not supported on this system"));
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
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)
{
/* 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);
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;
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
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
# include <inttypes.h>
#endif
-#ifdef HAVE_TERMIOS_H
+#if HAVE_TERMIOS_H
# include <termios.h>
#endif
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);
#include "remove.h"
#include "error.h"
-#ifdef HAVE_LCHOWN
+#if HAVE_LCHOWN
# define chown(PATH, OWNER, GROUP) lchown(PATH, OWNER, GROUP)
#endif
int full_write ();
void invalid_arg ();
-#ifndef HAVE_UTIME_NULL
+#if ! HAVE_UTIME_NULL
static int utime_now ();
#endif
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
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