1
gnu.patch by Aurelien Jarno <aurel32@debian.org> and
2
Sergei Golovan <sgolovan@debian.org>
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.
7
(2) Allows to build erlang regexp driver for common_test application.
9
(3) Undefines BSD4_4 for os_mon application for GNU/Hurd;
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
17
dnl NOTE: CPPFLAGS will be included in CFLAGS at the end
19
- linux*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";;
20
+ linux*|*gnu*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";;
22
# The ethread library requires _WIN32_WINNT of at least 0x0403.
23
# -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS.
26
enable_child_waiter_thread=yes
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
36
ifeq ($(findstring solaris,$(TARGET)),solaris)
37
SUB_DIRECTORIES = doc/src src c_src priv
39
+ifeq ($(findstring gnu,$(TARGET)),gnu)
40
+SUB_DIRECTORIES = doc/src src c_src priv
42
SUB_DIRECTORIES = doc/src src priv
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
52
ifeq ($(findstring solaris,$(TARGET)),solaris)
55
+ifeq ($(findstring gnu,$(TARGET)),gnu)
63
ifneq ($(findstring win32,$(TARGET)),win32)
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
72
+#warning "Undefined BSD4_4 for GNU/Hurd"
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
82
SKIP_BUILDING_BINARIES := true
86
+HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
88
+ifeq ($(findstring gnu0.3,$(HOST_OS)),gnu0.3)
89
+SKIP_BUILDING_BINARIES := true
91
SKIP_BUILDING_BINARIES := false
95
ifeq ($(SKIP_BUILDING_BINARIES), true)
96
SUB_DIRECTORIES = pkix src c_src doc/src