Use #ifdef for autoconf provided marcos...

...until autoconf switch from un/define marco logic to always existing
macro with 0/1 value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2015-04-05 09:04:35 +03:00 committed by Andrew Borodin
parent d0d7d412a7
commit 57452f656b
3 changed files with 11 additions and 11 deletions

View File

@ -13,9 +13,9 @@
#include <sys/types.h> /* BSD */ #include <sys/types.h> /* BSD */
#if MAJOR_IN_MKDEV #ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h> #include <sys/mkdev.h>
#elif MAJOR_IN_SYSMACROS #elif defined MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h> #include <sys/sysmacros.h>
#endif #endif

View File

@ -53,9 +53,9 @@
#include <config.h> #include <config.h>
/* Keep this conditional in sync with the similar conditional in m4.include/mc-get-fs-info. */ /* Keep this conditional in sync with the similar conditional in m4.include/mc-get-fs-info. */
#if ((STAT_STATVFS || STAT_STATVFS64) \ #if ((defined STAT_STATVFS || defined STAT_STATVFS64) \
&& (HAVE_STRUCT_STATVFS_F_BASETYPE || HAVE_STRUCT_STATVFS_F_FSTYPENAME \ && (defined HAVE_STRUCT_STATVFS_F_BASETYPE || defined HAVE_STRUCT_STATVFS_F_FSTYPENAME \
|| (! HAVE_STRUCT_STATFS_F_FSTYPENAME))) || (! defined HAVE_STRUCT_STATFS_F_FSTYPENAME)))
#define USE_STATVFS 1 #define USE_STATVFS 1
#else #else
#define USE_STATVFS 0 #define USE_STATVFS 0
@ -85,7 +85,7 @@
#include <nfs/nfs_clnt.h> #include <nfs/nfs_clnt.h>
#include <nfs/vfs.h> #include <nfs/vfs.h>
#endif #endif
#elif HAVE_OS_H /* BeOS */ #elif defined HAVE_OS_H /* BeOS */
#include <fs_info.h> #include <fs_info.h>
#endif #endif
@ -134,12 +134,12 @@ statfs (char const *filename, struct fs_info *buf)
#endif #endif
#endif #endif
#if HAVE_STRUCT_STATVFS_F_BASETYPE #ifdef HAVE_STRUCT_STATVFS_F_BASETYPE
#define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_basetype #define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_basetype
#else #else
#if HAVE_STRUCT_STATVFS_F_FSTYPENAME || HAVE_STRUCT_STATFS_F_FSTYPENAME #if defined HAVE_STRUCT_STATVFS_F_FSTYPENAME || defined HAVE_STRUCT_STATFS_F_FSTYPENAME
#define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_fstypename #define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_fstypename
#elif HAVE_OS_H /* BeOS */ #elif defined HAVE_OS_H /* BeOS */
#define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME fsh_name #define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME fsh_name
#endif #endif
#endif #endif

View File

@ -601,10 +601,10 @@ pty_open_master (char *pty_name)
#ifdef HAVE_POSIX_OPENPT #ifdef HAVE_POSIX_OPENPT
pty_master = posix_openpt (O_RDWR); pty_master = posix_openpt (O_RDWR);
#elif HAVE_GETPT #elif defined HAVE_GETPT
/* getpt () is a GNU extension (glibc 2.1.x) */ /* getpt () is a GNU extension (glibc 2.1.x) */
pty_master = getpt (); pty_master = getpt ();
#elif IS_AIX #elif defined IS_AIX
strcpy (pty_name, "/dev/ptc"); strcpy (pty_name, "/dev/ptc");
pty_master = open (pty_name, O_RDWR); pty_master = open (pty_name, O_RDWR);
#else #else