summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-23 08:56:11 +0000
committerJim Meyering <jim@meyering.net>2001-09-23 08:56:11 +0000
commit4bccf0b3223e482c523e2d1abc494f8d1c31095b (patch)
tree7c607b78c7299771cf5dd29400f4f12ebe605a5a /lib/mountlist.c
parent0439c570ab0138746d5d951a8fde836ff7e03953 (diff)
downloadcoreutils-4bccf0b3223e482c523e2d1abc494f8d1c31095b.tar.xz
Remove useless parentheses in #if directives.
(MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when the deprecated MOUNTED symbol is no longer defined in mntent.h.
Diffstat (limited to 'lib/mountlist.c')
-rw-r--r--lib/mountlist.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 6f7d07cbc..49109e737 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -1,5 +1,5 @@
/* mountlist.c -- return a list of mounted filesystems
- Copyright (C) 1991, 1992, 1997-2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997-2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
#else
void free ();
#endif
-#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
+#if defined STDC_HEADERS || defined HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
@@ -58,18 +58,21 @@ extern int errno;
# include <sys/param.h>
#endif
-#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
+#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */
# include <sys/mount.h>
# include <sys/fs_types.h>
#endif /* MOUNTED_GETFSSTAT */
#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */
# include <mntent.h>
-# if !defined(MOUNTED)
-# if defined(MNT_MNTTAB) /* HP-UX. */
+# if !defined MOUNTED
+# if defined _PATH_MOUNTED /* GNU libc */
+# define MOUNTED _PATH_MOUNTED
+# endif
+# if defined MNT_MNTTAB /* HP-UX. */
# define MOUNTED MNT_MNTTAB
# endif
-# if defined(MNTTABNAME) /* Dynix. */
+# if defined MNTTABNAME /* Dynix. */
# define MOUNTED MNTTABNAME
# endif
# endif
@@ -123,7 +126,7 @@ extern int errno;
# include <sys/mntent.h>
#endif
-#if defined (MNTOPT_IGNORE) && defined (HAVE_HASMNTOPT)
+#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT
# define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE)
#else
# define MNT_IGNORE(M) 0
@@ -417,7 +420,7 @@ read_filesystem_list (int need_fs_type)
}
#endif /* MOUNTED_GETMNT. */
-#if defined (MOUNTED_FS_STAT_DEV) /* BeOS */
+#if defined MOUNTED_FS_STAT_DEV /* BeOS */
{
/* The next_dev() and fs_stat_dev() system calls give the list of
all filesystems, including the information returned by statvfs()
@@ -522,7 +525,7 @@ read_filesystem_list (int need_fs_type)
}
#endif /* MOUNTED_FS_STAT_DEV */
-#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
+#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */
{
int numsys, counter, bufsize;
struct statfs *stats;
@@ -560,7 +563,7 @@ read_filesystem_list (int need_fs_type)
}
#endif /* MOUNTED_GETFSSTAT */
-#if defined (MOUNTED_FREAD) || defined (MOUNTED_FREAD_FSTYP) /* SVR[23]. */
+#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */
{
struct mnttab mnt;
char *table = "/etc/mnttab";