diff options
author | jbj <devnull@localhost> | 2005-01-04 19:31:31 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2005-01-04 19:31:31 +0000 |
commit | 84ec406c35efeb8fb566ceab2fb1a4796cf7b447 (patch) | |
tree | c4e2c7a7c3c5d0ad6fc2dcd64921bb3d6a2483e5 | |
parent | 6da6f7fc0a87818021bb07705450a29f46d7f14b (diff) | |
download | rpm-84ec406c35efeb8fb566ceab2fb1a4796cf7b447.tar.gz rpm-84ec406c35efeb8fb566ceab2fb1a4796cf7b447.tar.bz2 rpm-84ec406c35efeb8fb566ceab2fb1a4796cf7b447.zip |
- mac os x patches (#133611, #133612, #134637).
CVS patchset: 7673
CVS date: 2005/01/04 19:31:31
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | file/src/Makefile.am | 2 | ||||
-rw-r--r-- | lib/signature.c | 2 | ||||
-rw-r--r-- | lua/local/lposix.c | 5 | ||||
-rw-r--r-- | misc/putenv.c | 3 | ||||
-rw-r--r-- | popt/Makefile.am | 6 | ||||
-rw-r--r-- | rpmdb/Makefile.am | 4 | ||||
-rw-r--r-- | rpmdb/merge.c | 4 | ||||
-rw-r--r-- | rpmdb/rpmdb.h | 4 | ||||
-rw-r--r-- | rpmio/Makefile.am | 18 | ||||
-rw-r--r-- | system.h | 5 |
12 files changed, 39 insertions, 16 deletions
@@ -7,6 +7,7 @@ - revert MAGIC_COMPRESS, real fix is in libmagic (#143782). - upgrade to file-4.12 internal. - mac os x patches (#131943,#131944,#132924,#132926). + - mac os x patches (#133611, #133612, #134637). 4.3.3 -> 4.4: - pentium3/pentium4 arch support (pluto@PLD). diff --git a/configure.ac b/configure.ac index edc0a24fd..188f880b0 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,7 @@ if test X"$GCC" = Xyes ; then case "$target" in *-*-solaris*) LDFLAGS_STATIC="-static";; *-*-hpux*) LDFLAGS_STATIC="-static";; + *-*-darwin*) LDFLAGS_STATIC="";; # Mac OS X does not do static binaries. *-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread. *-*-*) LDFLAGS_STATIC="-all-static";; esac diff --git a/file/src/Makefile.am b/file/src/Makefile.am index 1977b887e..2120601fc 100644 --- a/file/src/Makefile.am +++ b/file/src/Makefile.am @@ -23,7 +23,7 @@ libmagic_la_LDFLAGS = -version-info 1:0:0 noinst_PROGRAMS = file file_SOURCES = file.c -file_LDFLAGS = -all-static +file_LDFLAGS = # -all-static file_LDADD = libmagic.la listobjs: diff --git a/lib/signature.c b/lib/signature.c index f30eb7e2d..01129298a 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -26,7 +26,7 @@ /*@access pgpDig@*/ /*@access pgpDigParams@*/ -#if !defined(__GLIBC__) +#if !defined(__GLIBC__) && !defined(__APPLE__) char ** environ = NULL; #endif diff --git a/lua/local/lposix.c b/lua/local/lposix.c index 64b0301a3..5c1566f86 100644 --- a/lua/local/lposix.c +++ b/lua/local/lposix.c @@ -438,7 +438,12 @@ static int Pgetenv(lua_State *L) /** getenv([name]) */ if (lua_isnone(L, 1)) { /*@-nestedextern -shadow@*/ + #ifdef __APPLE__ + #include <crt_externs.h> + #define environ (*_NSGetEnviron()) + #else extern char **environ; + #endif /* __APPLE__ */ /*@=nestedextern =shadow@*/ char **e; if (*environ==NULL) lua_pushnil(L); else lua_newtable(L); diff --git a/misc/putenv.c b/misc/putenv.c index ee3ccc04a..c13e03c3f 100644 --- a/misc/putenv.c +++ b/misc/putenv.c @@ -49,6 +49,9 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if HAVE_GNU_LD # define environ __environ +#elif defined (__APPLE__) +# include <crt_externs.h> +# define environ (*_NSGetEnviron()) #else extern char **environ; #endif diff --git a/popt/Makefile.am b/popt/Makefile.am index 5d9862c0f..3c2e61821 100644 --- a/popt/Makefile.am +++ b/popt/Makefile.am @@ -17,13 +17,13 @@ noinst_HEADERS = findme.h poptint.h system.h noinst_PROGRAMS = test1 test2 test3 test1_SOURCES = test1.c -test1_LDFLAGS = -all-static +test1_LDFLAGS = test1_LDADD = $(usrlib_LTLIBRARIES) test2_SOURCES = test2.c -test2_LDFLAGS = -all-static +test2_LDFLAGS = test2_LDADD = $(usrlib_LTLIBRARIES) test3_SOURCES = test3.c -test3_LDFLAGS = -all-static +test3_LDFLAGS = test3_LDADD = $(usrlib_LTLIBRARIES) noinst_SCRIPTS = testit.sh diff --git a/rpmdb/Makefile.am b/rpmdb/Makefile.am index f3c17bb47..e5391f4f6 100644 --- a/rpmdb/Makefile.am +++ b/rpmdb/Makefile.am @@ -18,7 +18,7 @@ EXTRA_DIST = db3.c EXTRA_PROGRAMS = tjfn tjfn_SOURCES = tjfn.c -tjfn_LDFLAGS = -all-static +tjfn_LDFLAGS = @LDFLAGS_STATIC@ tjfn_LDADD = librpmdb.la pkgincdir = $(pkgincludedir) @@ -186,4 +186,4 @@ lint: $(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) tdbi: librpmdb.la tdbi.o - $(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS) + $(LINK) @LDFLAGS_STATIC@ $@.o $< $(mylibpaths) $(mylibs) $(LIBS) diff --git a/rpmdb/merge.c b/rpmdb/merge.c index 531d63364..d185ac963 100644 --- a/rpmdb/merge.c +++ b/rpmdb/merge.c @@ -1,4 +1,5 @@ /*@-bounds -mustmod -sizeoftype @*/ +#ifndef __APPLE__ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -353,4 +354,7 @@ COPY: b = t; /*@=usereleased@*/ return (0); } +#else +/* mergesort is implemented in System on Mac OS X */ +#endif /* __APPLE__ */ /*@=bounds =mustmod =sizeoftype @*/ diff --git a/rpmdb/rpmdb.h b/rpmdb/rpmdb.h index 6407c27b8..096f38c8b 100644 --- a/rpmdb/rpmdb.h +++ b/rpmdb/rpmdb.h @@ -1098,6 +1098,7 @@ int rpmdbRebuild(/*@null@*/ const char * prefix, /*@null@*/ rpmts ts, /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/; +#ifndef __APPLE__ /** * Mergesort, same arguments as qsort(2). */ @@ -1106,6 +1107,9 @@ int mergesort(void *base, size_t nmemb, size_t size, int (*cmp) (const void *, const void *)) /*@globals errno @*/ /*@modifies base, errno @*/; +#else +/* mergesort is defined in stdlib.h on Mac OS X */ +#endif /* __APPLE__ */ #ifdef __cplusplus } diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index 21e1a74e5..ca7a0b9cd 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -73,40 +73,40 @@ tdigest_SOURCES = tdigest.c tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la -lgcrypt tdir_SOURCES = tdir.c -tdir_LDFLAGS = -all-static +tdir_LDFLAGS = @LDFLAGS_STATIC@ tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tfts_SOURCES = tfts.c -tfts_LDFLAGS = -all-static +tfts_LDFLAGS = @LDFLAGS_STATIC@ tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tget_SOURCES = tget.c -tget_LDFLAGS = -all-static +tget_LDFLAGS = @LDFLAGS_STATIC@ tget_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la thkp_SOURCES = thkp.c -thkp_LDFLAGS = -all-static +thkp_LDFLAGS = @LDFLAGS_STATIC@ thkp_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tput_SOURCES = tput.c -tput_LDFLAGS = -all-static +tput_LDFLAGS = @LDFLAGS_STATIC@ tput_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tglob_SOURCES = tglob.c -tglob_LDFLAGS = -all-static +tglob_LDFLAGS = @LDFLAGS_STATIC@ tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tinv_SOURCES = tinv.c -tinv_LDFLAGS = -all-static +tinv_LDFLAGS = @LDFLAGS_STATIC@ tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tkey_SOURCES = tkey.c -tkey_LDFLAGS = -all-static +tkey_LDFLAGS = @LDFLAGS_STATIC@ tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la tring_SOURCES = tring.c -tring_LDFLAGS = -all-static +tring_LDFLAGS = @LDFLAGS_STATIC@ tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la trpmio_SOURCES = trpmio.c @@ -49,7 +49,12 @@ extern int chroot (const char *__path) /*@=superuser =declundef =incondefs @*/ #endif #if !defined(__GLIBC__) && !defined(__LCLINT__) +#ifdef __APPLE__ +#include <crt_externs.h> +#define environ (*_NSGetEnviron()) +#else extern char ** environ; +#endif /* __APPLE__ */ #endif #endif |