Per suggestion from Bastian Blank, be less evil when we force fdisk to
authorEric Andersen <andersen@codepoet.org>
Wed, 26 May 2004 11:59:19 +0000 (11:59 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 26 May 2004 11:59:19 +0000 (11:59 -0000)
transparently remap 32-bit interfaces to actually use 64 bit interfaces.
 -Erik

util-linux/Makefile.in
util-linux/fdisk.c

index 0be0fca..72136f1 100644 (file)
@@ -49,3 +49,14 @@ libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR)
 $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
        $(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y))
 
+ifneq ($(strip $(CONFIG_LFS)),y)
+ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y)
+
+$(UTILLINUX_DIR)fdisk.o: $(UTILLINUX_DIR)fdisk.c
+       $(CC) $(CFLAGS) \
+               -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+               $(EXTRA_CFLAGS) -c -o $@ $<
+
+endif
+endif
+
index 5e7e79c..b27a8aa 100644 (file)
 #define PROC_PARTITIONS "/proc/partitions"
 
 #include <features.h>
-/* Force fdisk to transparently remap 32-bit interfaces
- * to instead really use 64 bit interfaces, at least for
- * glibc and uClibc... */
-#ifndef __USE_FILE_OFFSET64
-# ifdef FDISK_SUPPORT_LARGE_DISKS
-#   define __USE_FILE_OFFSET64    1
-# endif
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>           /* stat */
 #include <ctype.h>