- 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).
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
noinst_PROGRAMS = file
file_SOURCES = file.c
-file_LDFLAGS = -all-static
+file_LDFLAGS = # -all-static
file_LDADD = libmagic.la
listobjs:
/*@access pgpDig@*/
/*@access pgpDigParams@*/
-#if !defined(__GLIBC__)
+#if !defined(__GLIBC__) && !defined(__APPLE__)
char ** environ = NULL;
#endif
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);
#if HAVE_GNU_LD
# define environ __environ
+#elif defined (__APPLE__)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
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
EXTRA_PROGRAMS = tjfn
tjfn_SOURCES = tjfn.c
-tjfn_LDFLAGS = -all-static
+tjfn_LDFLAGS = @LDFLAGS_STATIC@
tjfn_LDADD = librpmdb.la
pkgincdir = $(pkgincludedir)
$(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)
/*@-bounds -mustmod -sizeoftype @*/
+#ifndef __APPLE__
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
/*@=usereleased@*/
return (0);
}
+#else
+/* mergesort is implemented in System on Mac OS X */
+#endif /* __APPLE__ */
/*@=bounds =mustmod =sizeoftype @*/
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
+#ifndef __APPLE__
/**
* Mergesort, same arguments as qsort(2).
*/
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
}
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
/*@=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