Subversion Repositories pike

Compare Revisions

Ignore whitespace Rev 165 → Rev 166

/trunk/debian/patches/hurd.patch
0,0 → 1,92
Description: Fixes to make Pike build on GNU/Hurd
1. Let realpath() allocate memory itself.
2. Include mach/message.h directly where mach_msg_type_number_t is used.
3. Don't build shared objects any differently than on Linux.
Forwarded: yes
 
--- a/src/modules/system/system.c
+++ b/src/modules/system/system.c
@@ -411,6 +411,13 @@ void f_resolvepath(INT32 args)
#endif /* ENAMETOOLONG */
(len >= buflen - 1));
#elif defined(HAVE_REALPATH)
+#ifdef __GNU__
+ if ((buf = realpath(path, NULL))) {
+ len = strlen(buf);
+ } else if (errno == ENOMEM) {
+ Pike_error("resolvepath(): Out of memory\n");
+ }
+#else
buflen = PATH_MAX+1;
if (!(buf = alloca(buflen))) {
@@ -420,6 +427,7 @@ void f_resolvepath(INT32 args)
if ((buf = realpath(path, buf))) {
len = strlen(buf);
}
+#endif
#else /* !HAVE_RESOLVEPATH && !HAVE_REALPATH */
#error "f_resolvepath with neither resolvepath nor realpath."
#endif /* HAVE_RESOLVEPATH */
@@ -429,6 +437,9 @@ void f_resolvepath(INT32 args)
}
pop_n_elems(args);
push_string(make_shared_binary_string(buf, len));
+#ifdef __GNU__
+ free(buf);
+#endif
}
#endif /* HAVE_RESOLVEPATH || HAVE_REALPATH */
--- a/src/pike_threadlib.h
+++ b/src/pike_threadlib.h
@@ -94,6 +94,9 @@ PMOD_EXPORT extern struct program *threa
#ifdef HAVE_MACH_TASK_INFO_H
#include <mach/task_info.h>
#endif
+#ifdef HAVE_MACH_MESSAGE_H
+#include <mach/message.h>
+#endif
#ifdef HAVE_MACH_TASK_H
#include <mach/task.h>
#endif
--- a/src/configure.in
+++ b/src/configure.in
@@ -3276,7 +3276,7 @@ AC_CHECK_HEADERS(winsock2.h sys/rusage.h
float.h sys/priocntl.h sys/sched.h winbase.h errno.h \
stddef.h mmx.h asm/mmx.h sys/termio.h sys/termios.h \
ws2tcpip.h valgrind/memcheck.h memcheck.h valgrind.h \
- sys/prctl.h sys/ioctl.h mach/task_info.h mach/task.h \
+ sys/prctl.h sys/ioctl.h mach/message.h mach/task_info.h mach/task.h \
mach/mach_init.h syscall.h sys/syscall.h devices/timer.h \
direct.h CoreServices/CoreServices.h execinfo.h \
mach/mach.h mach/thread_act.h mach/clock.h,,,[
@@ -7893,7 +7893,7 @@ if test -z "$LDSHARED" ; then
next*) LDSHARED="$REALCC $CFLAGS -nostdlib -r";;
Linux*) LDSHARED="$REALCC -shared";;
GNU/kFreeBSD*) LDSHARED="$REALCC -shared";;
- GNU*) LDSHARED="$REALCC -Wl,-Bshareable";;
+ GNU*) LDSHARED="$REALCC -shared";;
FreeBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
NetBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
OpenBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
--- a/src/configure
+++ b/src/configure
@@ -81886,7 +81886,7 @@ done
float.h sys/priocntl.h sys/sched.h winbase.h errno.h \
stddef.h mmx.h asm/mmx.h sys/termio.h sys/termios.h \
ws2tcpip.h valgrind/memcheck.h memcheck.h valgrind.h \
- sys/prctl.h sys/ioctl.h mach/task_info.h mach/task.h \
+ sys/prctl.h sys/ioctl.h mach/message.h mach/task_info.h mach/task.h \
mach/mach_init.h syscall.h sys/syscall.h devices/timer.h \
direct.h CoreServices/CoreServices.h execinfo.h \
mach/mach.h mach/thread_act.h mach/clock.h
@@ -104588,7 +104588,7 @@ if test -z "$LDSHARED" ; then
next*) LDSHARED="$REALCC $CFLAGS -nostdlib -r";;
Linux*) LDSHARED="$REALCC -shared";;
GNU/kFreeBSD*) LDSHARED="$REALCC -shared";;
- GNU*) LDSHARED="$REALCC -Wl,-Bshareable";;
+ GNU*) LDSHARED="$REALCC -shared";;
FreeBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
NetBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
OpenBSD*) LDSHARED="$REALCC -Wl,-Bshareable";;
/trunk/debian/patches/series
9,3 → 9,4
unbreak_cross_compilation.patch
dump_timeout.patch
reg_enum_conflict.patch
hurd.patch
/trunk/debian/changelog
4,8 → 4,9
* Move Tools.PV from -core to -gtk and make -gtk depend on -image, since
Tools.PV requires both but is too small to make its own package
(Closes: #711060).
* hurd.patch (new): Make Pike build on Debian GNU/Hurd.
 
-- Magnus Holmgren <holmgren@debian.org> Wed, 05 Jun 2013 22:23:23 +0200
-- Magnus Holmgren <holmgren@debian.org> Thu, 06 Jun 2013 22:53:05 +0200
 
pike7.8 (7.8.700-4) unstable; urgency=low