]> err.no Git - util-linux/commitdiff
build-sys: remove DEFAULT_INCLUDES workaround
authorKarel Zak <kzak@redhat.com>
Thu, 4 Jan 2007 13:39:17 +0000 (14:39 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 4 Jan 2007 13:39:17 +0000 (14:39 +0100)
The automake stuff uses "-I.". as a default gcc option for includes. This is a
problem for source code where is local includes with a same name like system
includes (e.g.  mntent.h, paths.h). Possible workaround is overwrite the
automake DEFAULT_INCLUDES variable. But this solution produces warnings. The
best way (this patch) is probably rename the files and remove DEFAULT_INCLUDES.

Signed-off-by: Karel Zak <kzak@redhat.com>
config/include-Makefile.am
mount/Makefile.am
mount/fstab.c
mount/fstab.h
mount/mount.c
mount/mount_mntent.c [moved from mount/mntent.c with 99% similarity]
mount/mount_mntent.h [moved from mount/mntent.h with 87% similarity]
mount/mount_paths.h [moved from mount/paths.h with 78% similarity]

index dceb914cebceb5de7885ba8c5a2fe7261836aa94..d3fffa760ed2f88174c185e4b49ec897550f65fb 100644 (file)
@@ -6,7 +6,5 @@ mandir = $(datadir)/man
 
 AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
 
-DEFAULT_INCLUDES =
-
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
 
index 87ff57b2156cd019d31ff39e262ac2a458ab6e64..951fd40511b6d9b9aa8a959f3c4edc90d1c4c5bd 100644 (file)
@@ -8,12 +8,13 @@ bin_PROGRAMS = mount umount
 sbin_PROGRAMS = losetup swapon
 man_MANS = fstab.5 nfs.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
 
-MNTHDRS = fstab.h linux_fs.h mntent.h mount_constants.h my_dev_t.h paths.h \
-       get_label_uuid.h lomount.h mount_blkid.h mount_guess_fstype.h \
-       nfs_mount4.h realpath.h xmalloc.h getusername.h loop.h mount_by_label.h \
-       mount_guess_rootdev.h nfsmount.h sundries.h 
+MNTHDRS = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \
+       mount_paths.h get_label_uuid.h lomount.h mount_blkid.h \
+       mount_guess_fstype.h nfs_mount4.h realpath.h xmalloc.h \
+       getusername.h loop.h mount_by_label.h mount_guess_rootdev.h \
+       nfsmount.h sundries.h
 
-mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \
+mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \
        get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \
        getusername.c \
        nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \
@@ -22,7 +23,7 @@ mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \
 
 mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a
 
-umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \
+umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \
        getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \
        lomount.c \
        $(MNTHDRS)
index 1bedcf4b7b235593d0b349c395b3644a434b144c..2de44e68fa5bea5b9b9a3d66b2be93befad92645 100644 (file)
@@ -9,12 +9,12 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/stat.h>
-#include "mntent.h"
+#include "mount_mntent.h"
 #include "fstab.h"
 #include "sundries.h"
 #include "xmalloc.h"
 #include "mount_blkid.h"
-#include "paths.h"
+#include "mount_paths.h"
 #include "nls.h"
 
 #define streq(s, t)    (strcmp ((s), (t)) == 0)
index f1d4e5c6478a023a2e23be9cb756724b039dd9df..3daa814693af2f4f6de81d155f8c8f594830beb3 100644 (file)
@@ -1,4 +1,4 @@
-#include "mntent.h"
+#include "mount_mntent.h"
 int mtab_is_writable(void);
 int mtab_does_not_exist(void);
 int is_mounted_once(const char *name);
index 5dc62ef62ca0bdf380094a7dc2081131c642f849..28770933e179cd4e79f9cb3b70cb51858607851e 100644 (file)
 #include <sys/wait.h>
 #include <sys/mount.h>
 
+#include <mntent.h>
+#include <paths.h>
+
 #include "mount_blkid.h"
 #include "mount_constants.h"
 #include "sundries.h"
 #include "xmalloc.h"
-#include "mntent.h"
+#include "mount_mntent.h"
 #include "fstab.h"
 #include "lomount.h"
 #include "loop.h"
@@ -34,7 +37,7 @@
 #include "mount_guess_fstype.h"
 #include "mount_by_label.h"
 #include "getusername.h"
-#include "paths.h"
+#include "mount_paths.h"
 #include "env.h"
 #include "nls.h"
 
similarity index 99%
rename from mount/mntent.c
rename to mount/mount_mntent.c
index 5c07c50f48bf0bb276329d294db912d1342ae5c7..9fecc924a8ee2135ce16c1e36cfeb35523996bed 100644 (file)
@@ -9,7 +9,7 @@
 #include <string.h>            /* for index */
 #include <ctype.h>             /* for isdigit */
 #include <sys/stat.h>          /* for umask */
-#include "mntent.h"
+#include "mount_mntent.h"
 #include "sundries.h"          /* for xmalloc */
 #include "nls.h"
 
similarity index 87%
rename from mount/mntent.h
rename to mount/mount_mntent.h
index 81e5dc89ad194a571c2aa3afeefe7cbf87848202..3b74215356396686ad8bb828b9afdb44935c434c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef MY_MNTENT_H
-#define MY_MNTENT_H
+#ifndef MOUNT_MNTENT_H
+#define MOUNT_MNTENT_H
 
 struct my_mntent {
        const char *mnt_fsname;
@@ -25,4 +25,4 @@ void my_endmntent (mntFILE *mfp);
 int my_addmntent (mntFILE *mfp, struct my_mntent *mnt);
 struct my_mntent *my_getmntent (mntFILE *mfp);
 
-#endif
+#endif /* MOUNT_MNTENT_H */
similarity index 78%
rename from mount/paths.h
rename to mount/mount_paths.h
index d8cc575caf1e920faf679b25176e8284deaa7f03..fe84e1d7ec19e93d61fe26b857be185c9a069a24 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef MOUNT_PATHS_H
+#define MOUNT_PATHS_H
+
 #include <mntent.h>
 #define _PATH_FSTAB    "/etc/fstab"
 #ifdef _PATH_MOUNTED
@@ -8,3 +11,5 @@
 #define MOUNTED_TEMP   "/etc/mtab.tmp"
 #endif
 #define LOCK_TIMEOUT   10
+
+#endif /* MOUNT_PATHS_H */