[PATCH] Some fixes from trying to build on OpenBSD
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Nov 16 15:53:15 UTC 2015
Hi!
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From cb5f6b6bf7869911aae648256b5ec5c47452e9c9 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 30 Jun 2014 13:52:02 +0200
Subject: [PATCH 1/5] libreplace: Only check malloc.h once
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/replace/wscript | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 7bfe7ee..6f4f6bb 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -71,7 +71,7 @@ def configure(conf):
conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
- conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h')
conf.CHECK_HEADERS('sys/atomic.h')
conf.CHECK_HEADERS('libgen.h')
--
1.9.1
From 64ad82afe148cda62a62747cd83b0baf1ad3f178 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 30 Jun 2014 15:15:37 +0200
Subject: [PATCH 2/5] libreplace: Put the malloc.h check on a line of its own
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/replace/wscript | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 6f4f6bb..d6cddf5 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -43,7 +43,9 @@ def configure(conf):
conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h sys/statvfs.h sys/termio.h')
conf.CHECK_HEADERS('sys/vfs.h sys/xattr.h termio.h termios.h sys/file.h')
- conf.CHECK_HEADERS('sys/ucontext.h sys/wait.h sys/stat.h malloc.h grp.h')
+ conf.CHECK_HEADERS('sys/ucontext.h sys/wait.h sys/stat.h')
+ conf.CHECK_HEADERS('malloc.h')
+ conf.CHECK_HEADERS('grp.h')
conf.CHECK_HEADERS('sys/select.h setjmp.h utime.h sys/syslog.h syslog.h')
conf.CHECK_HEADERS('stdarg.h vararg.h sys/mount.h mntent.h')
conf.CHECK_HEADERS('stropts.h unix.h string.h strings.h sys/param.h limits.h')
--
1.9.1
From 4fe595ee52330a488aec4478d8dab2dc4e634560 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 30 Jun 2014 15:46:21 +0200
Subject: [PATCH 3/5] libreplace: Only check for malloc.h if needed
OpenBSD complains that malloc.h is deprecated on every gcc invocation.
That hides a lot of real warnings. malloc and friends nowadays are
typically defined in stdlib.h, only check there.
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/replace/wscript | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index d6cddf5..093f930 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -44,7 +44,10 @@ def configure(conf):
conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h sys/statvfs.h sys/termio.h')
conf.CHECK_HEADERS('sys/vfs.h sys/xattr.h termio.h termios.h sys/file.h')
conf.CHECK_HEADERS('sys/ucontext.h sys/wait.h sys/stat.h')
- conf.CHECK_HEADERS('malloc.h')
+
+ if not conf.CHECK_DECLS('malloc', headers='stdlib.h'):
+ conf.CHECK_HEADERS('malloc.h')
+
conf.CHECK_HEADERS('grp.h')
conf.CHECK_HEADERS('sys/select.h setjmp.h utime.h sys/syslog.h syslog.h')
conf.CHECK_HEADERS('stdarg.h vararg.h sys/mount.h mntent.h')
--
1.9.1
From 36b108b2ab2634a5dec39739993ebe7438343ff4 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 16 Nov 2015 16:11:48 +0100
Subject: [PATCH 4/5] idl: Avoid // style comments
Signed-off-by: Volker Lendecke <vl at samba.org>
---
librpc/idl/clusapi.idl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/librpc/idl/clusapi.idl b/librpc/idl/clusapi.idl
index 3440047..5cd815b 100644
--- a/librpc/idl/clusapi.idl
+++ b/librpc/idl/clusapi.idl
@@ -2046,7 +2046,7 @@ import "winreg.idl", "misc.idl";
#endif
typedef struct {
- uint32 dwObjectType; // really of type CLUSTER_OBJECT_TYPE_RPC
+ uint32 dwObjectType; /* really of type CLUSTER_OBJECT_TYPE_RPC */
hyper FilterFlags;
} NOTIFY_FILTER_AND_TYPE_RPC;
@@ -2068,9 +2068,9 @@ import "winreg.idl", "misc.idl";
/*****************/
/* Function 0x89 */
- //
- // Notify interface V2 functions
- //
+ /*
+ * Notify interface V2 functions
+ */
#if 0
HNOTIFY_RPC
clusapi_CreateNotifyV2(
--
1.9.1
From 00e773aefe677bc7060fcb73315a51212a1debf5 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 16 Nov 2015 16:23:10 +0100
Subject: [PATCH 5/5] idl: Some CC can't find indented #defines
Signed-off-by: Volker Lendecke <vl at samba.org>
---
librpc/idl/clusapi.idl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/librpc/idl/clusapi.idl b/librpc/idl/clusapi.idl
index 5cd815b..8c4a227 100644
--- a/librpc/idl/clusapi.idl
+++ b/librpc/idl/clusapi.idl
@@ -28,15 +28,15 @@ import "winreg.idl", "misc.idl";
typedef [context_handle] void *HNETINTERFACE_RPC;
typedef [context_handle] void *HBATCH_PORT_RPC;
#else
- #define HCLUSTER_RPC policy_handle
- #define HNODE_RPC policy_handle
- #define HGROUP_RPC policy_handle
- #define HRES_RPC policy_handle
- #define HKEY_RPC policy_handle
- #define HNOTIFY_RPC policy_handle
- #define HNETWORK_RPC policy_handle
- #define HNETINTERFACE_RPC policy_handle
- #define HBATCH_PORT_RPC policy_handle
+#define HCLUSTER_RPC policy_handle
+#define HNODE_RPC policy_handle
+#define HGROUP_RPC policy_handle
+#define HRES_RPC policy_handle
+#define HKEY_RPC policy_handle
+#define HNOTIFY_RPC policy_handle
+#define HNETWORK_RPC policy_handle
+#define HNETINTERFACE_RPC policy_handle
+#define HBATCH_PORT_RPC policy_handle
#endif
typedef struct {
--
1.9.1
More information about the samba-technical
mailing list