Use consistent syntax for boolean preprocessor expressions.
This commit is contained in:
+11
-11
@@ -40,7 +40,7 @@
|
||||
# define USE_UTIME 1
|
||||
#elif ((ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_CC_INTELC || ACC_CC_MSC))
|
||||
# define USE__FUTIME 1
|
||||
#elif defined(HAVE_UTIME)
|
||||
#elif (HAVE_UTIME)
|
||||
# define USE_UTIME 1
|
||||
#endif
|
||||
|
||||
@@ -64,7 +64,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
int r;
|
||||
struct stat st;
|
||||
memset(&st, 0, sizeof(st));
|
||||
#if defined(HAVE_LSTAT)
|
||||
#if (HAVE_LSTAT)
|
||||
r = lstat(iname,&st);
|
||||
#else
|
||||
r = stat(iname,&st);
|
||||
@@ -100,7 +100,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
fi.st = st;
|
||||
fi.sopen(iname, O_RDONLY | O_BINARY, SH_DENYWR);
|
||||
|
||||
#if defined(USE_FTIME)
|
||||
#if (USE_FTIME)
|
||||
struct ftime fi_ftime;
|
||||
memset(&fi_ftime, 0, sizeof(fi_ftime));
|
||||
if (opt->preserve_timestamp)
|
||||
@@ -131,7 +131,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
}
|
||||
if (opt->force >= 2)
|
||||
{
|
||||
#if defined(HAVE_CHMOD)
|
||||
#if (HAVE_CHMOD)
|
||||
r = chmod(tname, 0777);
|
||||
IGNORE_ERROR(r);
|
||||
#endif
|
||||
@@ -177,10 +177,10 @@ void do_one_file(const char *iname, char *oname)
|
||||
// copy time stamp
|
||||
if (opt->preserve_timestamp && oname[0] && fo.isOpen())
|
||||
{
|
||||
#if defined(USE_FTIME)
|
||||
#if (USE_FTIME)
|
||||
r = setftime(fo.getFd(), &fi_ftime);
|
||||
IGNORE_ERROR(r);
|
||||
#elif defined(USE__FUTIME)
|
||||
#elif (USE__FUTIME)
|
||||
struct _utimbuf u;
|
||||
u.actime = st.st_atime;
|
||||
u.modtime = st.st_mtime;
|
||||
@@ -199,7 +199,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
// FIXME: .exe or .cof etc.
|
||||
if (!opt->backup)
|
||||
{
|
||||
#if defined(HAVE_CHMOD)
|
||||
#if (HAVE_CHMOD)
|
||||
r = chmod(iname, 0777);
|
||||
IGNORE_ERROR(r);
|
||||
#endif
|
||||
@@ -222,7 +222,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
oname[0] = 0;
|
||||
const char *name = opt->output_name ? opt->output_name : iname;
|
||||
UNUSED(name);
|
||||
#if defined(USE_UTIME)
|
||||
#if (USE_UTIME)
|
||||
// copy time stamp
|
||||
if (opt->preserve_timestamp)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
IGNORE_ERROR(r);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_CHMOD)
|
||||
#if (HAVE_CHMOD)
|
||||
// copy permissions
|
||||
if (opt->preserve_mode)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ void do_one_file(const char *iname, char *oname)
|
||||
IGNORE_ERROR(r);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_CHOWN)
|
||||
#if (HAVE_CHOWN)
|
||||
// copy the ownership
|
||||
if (opt->preserve_ownership)
|
||||
{
|
||||
@@ -263,7 +263,7 @@ static void unlink_ofile(char *oname)
|
||||
{
|
||||
if (oname && oname[0])
|
||||
{
|
||||
#if defined(HAVE_CHMOD)
|
||||
#if (HAVE_CHMOD)
|
||||
int r;
|
||||
r = chmod(oname, 0777);
|
||||
IGNORE_ERROR(r);
|
||||
|
||||
Reference in New Issue
Block a user