~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to debian/patches/gnu.patch

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-11-04 22:26:12 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104222612-1uwzavuet6ar35fw
Tags: 1:12.b.3-dfsg-4ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  + debian/patches/glibc2.8_compatibility.patch:
    - Fix FTBFS with new glibc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
gnu.patch by Aurelien Jarno <aurel32@debian.org> and
 
2
Sergei Golovan <sgolovan@debian.org>
 
3
 
 
4
(1) Defines GNU macros not only for Linux but also for any system
 
5
    with 'gnu' substring in OS name. Fixes FTBFS on GNU/kFreeBSD and GNU/Hurd.
 
6
 
 
7
(2) Allows to build erlang regexp driver for common_test application.
 
8
 
 
9
(3) Undefines BSD4_4 for os_mon application for GNU/Hurd;
 
10
 
 
11
(4) Skips building SSL certificate examples for GNU/Hurd (Debian GNU/Hurd has
 
12
    no a random translator yet).
 
13
--- erlang-12.b.3-dfsg.orig/erts/configure.in
 
14
+++ erlang-12.b.3-dfsg/erts/configure.in
 
15
@@ -275,7 +275,7 @@
 
16
 
 
17
 dnl NOTE: CPPFLAGS will be included in CFLAGS at the end
 
18
 case $host_os in
 
19
-    linux*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";; 
 
20
+    linux*|*gnu*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";; 
 
21
     win32)
 
22
        # The ethread library requires _WIN32_WINNT of at least 0x0403.
 
23
        # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS.
 
24
@@ -858,7 +858,7 @@
 
25
            solaris*)
 
26
                enable_child_waiter_thread=yes
 
27
                ;;
 
28
-           linux*)
 
29
+           linux*|*gnu*)
 
30
                AC_DEFINE(USE_RECURSIVE_MALLOC_MUTEX,[1],
 
31
                        [Define if malloc should use a recursive mutex])
 
32
                AC_MSG_CHECKING([whether dlopen() needs to be called before first call to dlerror()])
 
33
--- erlang-12.b.3-dfsg.orig/lib/common_test/Makefile
 
34
+++ erlang-12.b.3-dfsg/lib/common_test/Makefile
 
35
@@ -28,9 +28,13 @@
 
36
 ifeq ($(findstring solaris,$(TARGET)),solaris)
 
37
 SUB_DIRECTORIES = doc/src src c_src priv
 
38
 else
 
39
+ifeq ($(findstring gnu,$(TARGET)),gnu)
 
40
+SUB_DIRECTORIES = doc/src src c_src priv
 
41
+else
 
42
 SUB_DIRECTORIES = doc/src src priv
 
43
 endif
 
44
 endif
 
45
+endif
 
46
 
 
47
 include vsn.mk
 
48
 VSN = $(COMMON_TEST_VSN)
 
49
--- erlang-12.b.3-dfsg.orig/lib/common_test/priv/Makefile.in
 
50
+++ erlang-12.b.3-dfsg/lib/common_test/priv/Makefile.in
 
51
@@ -42,9 +42,13 @@
 
52
 ifeq ($(findstring solaris,$(TARGET)),solaris)
 
53
 XNIX = true
 
54
 else
 
55
+ifeq ($(findstring gnu,$(TARGET)),gnu)
 
56
+XNIX = true
 
57
+else
 
58
 XNIX = false
 
59
 endif
 
60
 endif
 
61
+endif
 
62
 
 
63
 ifneq ($(findstring win32,$(TARGET)),win32)
 
64
 
 
65
--- erlang-12.b.3-dfsg.orig/lib/os_mon/c_src/memsup.c
 
66
+++ erlang-12.b.3-dfsg/lib/os_mon/c_src/memsup.c
 
67
@@ -95,6 +95,11 @@
 
68
 #include <memLib.h>
 
69
 #endif
 
70
 
 
71
+#ifdef __GNU__
 
72
+#warning "Undefined BSD4_4 for GNU/Hurd"
 
73
+#undef BSD4_4
 
74
+#endif
 
75
+
 
76
 #ifdef BSD4_4
 
77
 #include <sys/types.h>
 
78
 #include <sys/sysctl.h>
 
79
--- erlang-12.b.3-dfsg.orig/lib/ssl/Makefile
 
80
+++ erlang-12.b.3-dfsg/lib/ssl/Makefile
 
81
@@ -29,8 +29,15 @@
 
82
 SKIP_BUILDING_BINARIES := true
 
83
 endif
 
84
 else
 
85
+ifeq ($(HOST_OS),)
 
86
+HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
 
87
+endif
 
88
+ifeq ($(findstring gnu0.3,$(HOST_OS)),gnu0.3)
 
89
+SKIP_BUILDING_BINARIES := true
 
90
+else
 
91
 SKIP_BUILDING_BINARIES := false
 
92
 endif
 
93
+endif
 
94
 
 
95
 ifeq ($(SKIP_BUILDING_BINARIES), true)
 
96
 SUB_DIRECTORIES = pkix src c_src doc/src