Fix to `warning: undefined preprocessor identifier' messages.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
#include <fcntl.h>
#include <unistd.h>
-#if HAVE_SYS_MKDEV_H
+#ifdef HAVE_SYS_MKDEV_H
# include <sys/mkdev.h> /* major and minor on Solaris */
#endif
#ifndef MD5_H
#define MD5_H
-#if HAVE_STDINT_H
+#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
typedef unsigned int uint32_t;
if (ruid != 0 || (ruid != geteuid()) || (getgid() != getegid()))
return NULL;
-#if HAVE_PRCTL
+#ifdef HAVE_PRCTL
if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
return NULL;
#else
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
-#if HAVE_MNTENT_H
+#ifdef HAVE_MNTENT_H
#include <mntent.h>
#endif
#include <string.h>
* %End-Header%
*/
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_ERRNO_H
#include <stdio.h>
#include <string.h>
#include <limits.h>
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <dirent.h>
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if HAVE_ERRNO_H
+#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include <time.h>
#include <stdio.h>
#include <string.h>
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <dirent.h>
-#if HAVE_ERRNO_H
+#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#if HAVE_SYS_MKDEV_H
+#ifdef HAVE_SYS_MKDEV_H
#include <sys/mkdev.h>
#endif
#include <fcntl.h>
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#if HAVE_ERRNO_H
+#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef __MSDOS__
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#if HAVE_ERRNO_H
+#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include "blkidP.h"
-#if HAVE_STDLIB_H
+#ifdef HAVE_STDLIB_H
# ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 600 /* for inclusion of strtoull */
# endif
*/
#include <stdio.h>
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
* %End-Header%
*/
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
* the locale database, which can be overridden with the
* -s (Sunday) or -m (Monday) options.
*/
-#if HAVE_DECL__NL_TIME_WEEK_1STDAY
+#ifdef HAVE_DECL__NL_TIME_WEEK_1STDAY
/*
* You need to use 2 locale variables to get the first day of the week.
* This is needed to support first_weekday=2 and first_workday=1 for
#include "nls.h"
#include "c.h"
-#if HAVE_LIBUTIL && HAVE_PTY_H
-#include <pty.h>
+#ifdef HAVE_LIBUTIL
+# ifdef HAVE_PTY_H
+# include <pty.h>
+# endif
#endif
#ifdef HAVE_LIBUTEMPTER
void
getmaster(void) {
-#if HAVE_LIBUTIL && HAVE_PTY_H
+#ifdef HAVE_LIBUTIL
+# ifdef HAVE_PTY_H
tcgetattr(STDIN_FILENO, &tt);
ioctl(STDIN_FILENO, TIOCGWINSZ, (char *)&win);
if (openpty(&master, &slave, NULL, &tt, &win) < 0) {
warn(_("openpty failed"));
fail();
}
+# endif
#else
char *pty, *bank, *cp;
struct stat stb;