Shove the mount entry include voodoo where sun doesn't ... <cough> fs.c
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 12:37:47 +0000 (14:37 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 12:39:04 +0000 (14:39 +0200)
lib/fs.c
system.h

index e16a929..f998525 100644 (file)
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -8,6 +8,57 @@
 #include <rpm/rpmfileutil.h>   /* for rpmGetPath */
 #include <rpm/rpmlog.h>
 
+#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL
+# define GETMNTENT_ONE 0
+# define GETMNTENT_TWO 0
+# if HAVE_SYS_MNTCTL_H
+#  include <sys/mntctl.h>
+# endif
+# if HAVE_SYS_VMOUNT_H
+#  include <sys/vmount.h>
+# endif
+# if HAVE_SYS_MOUNT_H
+#  include <sys/mount.h>
+# endif
+#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB
+# if HAVE_MNTENT_H
+#  include <stdio.h>
+#  include <mntent.h>
+#  define our_mntent struct mntent
+#  define our_mntdir mnt_dir
+# elif HAVE_STRUCT_MNTTAB
+#  include <stdio.h>
+#  include <mnttab.h>
+   struct our_mntent {
+       char * our_mntdir;
+   };
+   struct our_mntent *getmntent(FILE *filep);
+#  define our_mntent struct our_mntent
+# else
+#  include <stdio.h>
+   struct our_mntent {
+       char * our_mntdir;
+   };
+   struct our_mntent *getmntent(FILE *filep);
+#  define our_mntent struct our_mntent
+# endif
+# define GETMNTENT_ONE 1
+# define GETMNTENT_TWO 0
+#elif HAVE_SYS_MNTTAB_H
+# include <stdio.h>
+# include <sys/mnttab.h>
+# define GETMNTENT_ONE 0
+# define GETMNTENT_TWO 1
+# define our_mntent struct mnttab
+# define our_mntdir mnt_mountp
+#else /* if !HAVE_MNTCTL */
+# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system.
+#endif
+
+#ifndef MOUNTED
+#define MOUNTED "/etc/mnttab"
+#endif
+
 #include "debug.h"
 
 
index 4d7a7d3..6d84f0c 100644 (file)
--- a/system.h
+++ b/system.h
@@ -183,55 +183,4 @@ extern const char *__progname;
 #include <strings.h>
 #endif
 
-#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 0
-# if HAVE_SYS_MNTCTL_H
-#  include <sys/mntctl.h>
-# endif
-# if HAVE_SYS_VMOUNT_H
-#  include <sys/vmount.h>
-# endif
-# if HAVE_SYS_MOUNT_H
-#  include <sys/mount.h>
-# endif
-#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB
-# if HAVE_MNTENT_H
-#  include <stdio.h>
-#  include <mntent.h>
-#  define our_mntent struct mntent
-#  define our_mntdir mnt_dir
-# elif HAVE_STRUCT_MNTTAB
-#  include <stdio.h>
-#  include <mnttab.h>
-   struct our_mntent {
-       char * our_mntdir;
-   };
-   struct our_mntent *getmntent(FILE *filep);
-#  define our_mntent struct our_mntent
-# else
-#  include <stdio.h>
-   struct our_mntent {
-       char * our_mntdir;
-   };
-   struct our_mntent *getmntent(FILE *filep);
-#  define our_mntent struct our_mntent
-# endif
-# define GETMNTENT_ONE 1
-# define GETMNTENT_TWO 0
-#elif HAVE_SYS_MNTTAB_H
-# include <stdio.h>
-# include <sys/mnttab.h>
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 1
-# define our_mntent struct mnttab
-# define our_mntdir mnt_mountp
-#else /* if !HAVE_MNTCTL */
-# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system.
-#endif
-
-#ifndef MOUNTED
-#define MOUNTED "/etc/mnttab"
-#endif
-
 #endif /* H_SYSTEM */