]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Add Apple/Darwin patches.
authorTheodore Ts'o <tytso@mit.edu>
Fri, 14 Mar 2003 07:13:48 +0000 (02:13 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 14 Mar 2003 07:13:48 +0000 (02:13 -0500)
14 files changed:
ChangeLog
configure.in
e2fsck/ChangeLog
e2fsck/iscan.c
e2fsck/scantest.c
e2fsck/unix.c
lib/ChangeLog
lib/Makefile.darwin-lib [new file with mode: 0644]
lib/ext2fs/ChangeLog
lib/ext2fs/getsize.c
lib/uuid/ChangeLog
lib/uuid/Makefile.in
misc/ChangeLog
misc/fsck.c

index 013f10aaba2415c46bd2a8bdbd648239a29c66ff..606572e8418d3678842538b6ec52283c2f6e87d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * configure.in: Add support for Apple/Darwin shared libraries.
+
 2003-03-06  Theodore Tso  <tytso@thunk.org>
 
        * Makefile.in (.exclude-subset): Include the doc directory in the
index 5ca3ad15b0a51a140f1bc96dc64bddcbc8080216..4047f49348695f18eb2b8b45850f051d134864f2 100644 (file)
@@ -258,6 +258,12 @@ else
        BSDLIB_CMT=
        MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
        LIB_EXT=.so
+       [case "$host_os" in
+       darwin.*)
+               MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
+               LIB_EXT=.dylib
+       ;;
+       esac]
        echo "Enabling BSD shared libraries"
 fi
 ,
index e74a62256423805dc9c161ef6ea466fd41c4bfa8..b98ba8640d125f27fd76892a72c4c300039a11f5 100644 (file)
@@ -1,5 +1,8 @@
 2003-03-14  Theodore Ts'o  <tytso@mit.edu>
 
+       * iscan.c, scantest.c, unix.c: And #ifdef protection around
+               #include of malloc.h
+
        * rehash.c (duplicate_search_and_fix): Now search for duplicates
                filenames, and either prompt to remove a complete
                duplicate entry, or to rename a duplicate filename.
index 70e9aede243b20987ad143d6f98ccc17145b9d33..6501e1f29dc9de417edea1c4c8a29e69a1019e95 100644 (file)
@@ -19,7 +19,9 @@
 #include <mntent.h>
 #endif
 #include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 
 #include "et/com_err.h"
 #include "e2fsck.h"
index e8374d92899f2424e32a4ebeb0201ef22cbbcc1a..9727a9ffb2bfcb3e4e90bd9c9324e90a48815aa2 100644 (file)
@@ -15,7 +15,9 @@
 #include <mntent.h>
 #endif
 #include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 #include <sys/resource.h>
 
 #include "et/com_err.h"
index 492ba4a1a4d3d0bfaad9a8086f234519773e4406..c9d1da2713f223efc769566aed928704e0d6fe64 100644 (file)
@@ -34,7 +34,9 @@ extern int optind;
 #include <mntent.h>
 #endif
 #include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 
 #include "et/com_err.h"
 #include "e2fsck.h"
index a1b1599e4e4d1b586425831b1a9bcbdc7bfa766c..cb95c341ec16b7ee7cd1271586a574d34482fde0 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * Makefile.darwin-lib: New file to provide support for e2fsprogs
+               on Apple Darwin.
+
 2002-11-09  Theodore Ts'o  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.32
diff --git a/lib/Makefile.darwin-lib b/lib/Makefile.darwin-lib
new file mode 100644 (file)
index 0000000..4bacd27
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# This is a Makefile stub which handles the creation of Darwin BSD shared
+# libraries.
+#
+# In order to use this stub, the following makefile variables must be 
+efined.
+#
+# BSDLIB_VERSION = 1.0
+# BSDLIB_IMAGE = libce
+# BSDLIB_MYDIR = et
+# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
+#
+
+all:: pic image
+
+subdirs:: pic
+
+pic:
+       mkdir pic
+
+BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib
+
+image:         $(BSD_LIB)
+
+$(BSD_LIB): $(OBJS)
+       (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 
+ -current_version $(BSDLIB_VERSION) \
+               -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
+       $(MV) pic/$(BSD_LIB) .
+       $(RM) -f ../$(BSD_LIB)
+       $(LN) $(BSD_LIB) ../$(BSD_LIB)
+       $(LN) ../$(BSD_LIB) ../$(BSDLIB_IMAGE).dylib
+
+install-shlibs install:: $(BSD_LIB)
+       $(INSTALL_PROGRAM) $(BSD_LIB) \
+               $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+       -$(LDCONFIG)
+
+uninstall-shlibs uninstall::
+       $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+
+clean::
+       $(RM) -rf pic
+       $(RM) -f $(BSD_LIB)
+       $(RM) -f ../$(BSD_LIB)
+       $(RM) -f ../$(BSDLIB_IMAGE).dylib
index 5e3b37e6fee311e3235c501b01b4dad1ddb01dc8..b9c997c8a471ad10dc1ceb092a4045408cc8c480 100644 (file)
@@ -1,5 +1,8 @@
 2003-03-14  Theodore Ts'o  <tytso@mit.edu>
 
+       * getsize.c: Add support for Apple Darwin's ioctl to get the hard
+               disk size.
+
        * badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
                which returns the number of entries in the list.
 
index e8fadba2a92f6d8b97145ccaaaeda3cec7b9689b..5b5c633a6d6c8200edfcbd8a914ebe63cf0bc06b 100644 (file)
 #define BLKGETSIZE _IO(0x12,96)        /* return device size */
 #endif
 
+#ifdef APPLE_DARWIN
+#include <sys/ioctl.h>
+#include <sys/disk.h>
+
+#define BLKGETSIZE DKIOCGETBLOCKCOUNT32
+#endif /* APPLE_DARWIN */
+
 #include "ext2_fs.h"
 #include "ext2fs.h"
 
index 2146e25dd5c3d7f3ee1d945e61958b937a6f1170..7a0ec9ba67fde8b55be5606c0cf203a8e6b2d648 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * Makefile.in: Add support for Apple Darwin
+
 2003-03-06  Theodore Tso  <tytso@mit.edu>
 
        * uuid_types.h.in: Don't redefine types if other e2fsprogs
index c91093ca26307bde82714bbe3a55c65aac3c3845..ed995ce60f432a8556b308503b003cba6d280a98 100644 (file)
@@ -167,6 +167,7 @@ distclean:: clean
 #
 ../../lib/libuuid.a: libuuid.a
 ../../lib/libuuid.so: image
+../../lib/libuuid.dylib: image
 
 # +++ Dependency line eater +++
 # 
index 248f8cff5f01d0a6b3732772a519803d1d2d6214..4c8ce6e7a0b764e06b148873b450abd6455de8c9 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-14  Theodore Ts'o  <tytso@mit.edu>
+
+       * fsck.c: And #ifdef protection around #include of malloc.h
+
 2003-03-13  Theodore Ts'o  <tytso@mit.edu>
 
        * e2image.c (write_raw_image_file): Include blocks from slow
index 86f2406bc0f1e0b5f866861d4cb30efde06811dc..6408c8e02f5a2e4423119483445a102853b90124 100644 (file)
@@ -50,7 +50,9 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#if HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 
 #include "../version.h"
 #include "nls-enable.h"