Files
MSYS2-packages/pth/pth-2.0.7-2.src.patch
2014-08-01 11:57:53 +04:00

140 lines
4.2 KiB
Diff

--- origsrc/pth-2.0.7/Makefile.in 2006-06-08 13:54:01.000000000 -0400
+++ src/pth-2.0.7/Makefile.in 2009-10-19 01:52:07.928000000 -0400
@@ -169,10 +169,10 @@ pth_p.h: $(S)pth_p.h.in
# build the static and possibly shared libraries
libpth.la: $(LOBJS)
$(LIBTOOL) --mode=link --quiet $(CC) -o libpth.la $(LOBJS) \
- -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)`
+ -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)` -no-undefined
libpthread.la: pthread.lo $(LOBJS)
$(LIBTOOL) --mode=link --quiet $(CC) -o libpthread.la pthread.lo $(LOBJS) \
- -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)`
+ -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)` -no-undefined
# build the manual pages
$(S)pth-config.1: $(S)pth-config.pod $(_VERSION_FILE)
--- origsrc/pth-2.0.7/aclocal.m4 2006-06-08 13:54:01.000000000 -0400
+++ src/pth-2.0.7/aclocal.m4 2009-10-19 01:52:07.935000000 -0400
@@ -1627,3 +1627,9 @@ AC_MSG_VERBOSE([$]$2)
AC_MSG_VERBOSE([$]$3)
])
+m4_include([libtool.m4])
+m4_include([ltoptions.m4])
+m4_include([ltsugar.m4])
+m4_include([ltversion.m4])
+m4_include([lt~obsolete.m4])
+
--- origsrc/pth-2.0.7/configure.ac 2006-06-08 13:54:01.000000000 -0400
+++ src/pth-2.0.7/configure.ac 2009-10-19 01:52:07.943000000 -0400
@@ -32,13 +32,14 @@ dnl ## PROLOG
dnl ##
dnl # standard Autoconf prolog
-AC_PREREQ(2.52)dnl
+AC_PREREQ(2.63)dnl
AC_REVISION([1.0])
dnl # autoconf initialization
AC_INIT(README)
AC_ENABLESUBDIR
AC_SRCDIR_PREFIX(srcdir_prefix)
+AC_CONFIG_MACRO_DIR([.])
AC_HEADLINE(dnl
GNU Pth, Portable Threads, dnl
PTH_VERSION, pth_vers.c, dnl
@@ -61,18 +62,12 @@ AC_SET_MAKE
AC_CHECK_DEBUGGING
AC_CHECK_PROFILING
AC_CHECK_OPTIMIZE
-if test -f "$srcdir/ltmain.sh"; then
- case "$PLATFORM" in
- # Solaris 2.7/x86 is slightly broken
- *-pc-solaris2.[[78]] [)] enable_shared=no ;;
- esac
- sinclude(libtool.m4)
- AC_PROG_LIBTOOL
-else
- dnl # only for stripped down Pth source tree
- AC_CHECK_PROG(AR, ar, ar)
- AC_PROG_RANLIB
-fi
+LT_INIT([win32-dll])
+
+case "$PLATFORM" in
+ # Solaris 2.7/x86 is slightly broken
+ *-pc-solaris2.[[78]] [)] enable_shared=no ;;
+esac
dnl ## Support for some special platform/compiler options
case "$PLATFORM:$CC" in
--- origsrc/pth-2.0.7/pth_acdef.h.in 2006-06-08 13:54:03.000000000 -0400
+++ src/pth-2.0.7/pth_acdef.h.in 2009-10-19 01:53:24.818000000 -0400
@@ -242,6 +242,10 @@
/* Define to 1 if you have the `_setjmp' function. */
#undef HAVE__SETJMP
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@@ -254,6 +258,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
--- origsrc/pth-2.0.7/pth_fork.c 2006-06-08 13:54:03.000000000 -0400
+++ src/pth-2.0.7/pth_fork.c 2009-10-19 01:52:07.960000000 -0400
@@ -29,6 +29,13 @@
-- Calvin */
#include "pth_p.h"
+#if defined(__CYGWIN__) && !defined(PTH_DISABLE_FORK)
+# define PTH_DISABLE_FORK 1
+#endif
+#ifndef PTH_DISABLE_FORK
+# define PTH_DISABLE_FORK 0
+#endif
+
struct pth_atfork_st {
void (*prepare)(void *);
void (*parent)(void *);
@@ -64,15 +71,19 @@ pid_t pth_fork(void)
{
pid_t pid;
int i;
-
+#if PTH_DISABLE_FORK
+ pth_debug1 ("pth does not support fork() on this platform\n");
+ errno = ENOSYS;
+ return -1;
+#else
/* run preparation handlers in LIFO order */
for (i = pth_atfork_idx-1; i >= 0; i--)
if (pth_atfork_list[i].prepare != NULL)
pth_atfork_list[i].prepare(pth_atfork_list[i].arg);
/* fork the process */
- if ((pid = pth_sc(fork)()) == -1)
- return FALSE;
+ if ((pid = pth_sc(fork)()) < 0)
+ return pid;
/* handle parent and child contexts */
if (pid != 0) {
@@ -95,5 +106,6 @@ pid_t pth_fork(void)
pth_atfork_list[i].child(pth_atfork_list[i].arg);
}
return pid;
+#endif
}