summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/m4/check_cc.m429
-rw-r--r--source4/build/smb_build/output.pm4
-rw-r--r--source4/lib/com/com.h3
-rw-r--r--source4/lib/com/config.mk4
-rw-r--r--source4/lib/com/dcom/dcom.h1
-rw-r--r--source4/torture/com/simple.c1
-rw-r--r--source4/web_server/config.mk1
-rw-r--r--source4/web_server/web_server.h1
8 files changed, 29 insertions, 15 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index 33bb7050af..72a882b7d8 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -115,18 +115,25 @@ AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
#
# Check if the compiler support ELF visibility for symbols
#
+
visibility_attribute=no
-AC_MSG_CHECKING([whether the C compiler supports the visibility attribute])
-AC_TRY_RUN([
-#pragma GCC visibility push(hidden)
-void vis_foo1(void) {}
-__attribute__((visibility("default"))) void vis_foo2(void) {}
-#include "${srcdir-.}/build/tests/trivial.c"
-], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_VISIBILITY_ATTR,1,[Whether the C compiler supports the visibility attribute])
- visibility_attribute=yes
-], [AC_MSG_RESULT(no);])
+if test x"$GCC" = x"yes" ; then
+ AX_CFLAGS_GCC_OPTION([-fvisibility=hidden], VISIBILITY_CFLAGS)
+fi
+
+if test -n "$VISIBILITY_CFLAGS"; then
+ AC_MSG_CHECKING([whether the C compiler supports the visibility attribute])
+ AC_TRY_RUN([
+ #pragma GCC visibility push(hidden)
+ void vis_foo1(void) {}
+ __attribute__((visibility("default"))) void vis_foo2(void) {}
+ #include "${srcdir-.}/build/tests/trivial.c"
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_VISIBILITY_ATTR,1,[Whether the C compiler supports the visibility attribute])
+ visibility_attribute=yes
+ ], [AC_MSG_RESULT(no);])
+fi
AC_SUBST(visibility_attribute)
#
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 6b3753aa9f..bd2b3eeca9 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -111,8 +111,8 @@ sub create_output($$)
$part->{OUTPUT_TYPE} = "OBJLIST";
}
- if ($part->{DEFAULT_VISIBILITY} ne "default" and
- $config->{visibility_attribute} eq "yes") {
+ if (($part->{DEFAULT_VISIBILITY} ne "default") and
+ ($config->{visibility_attribute} eq "yes")) {
$part->{EXTRA_CFLAGS} .= " -fvisibility=$part->{DEFAULT_VISIBILITY}";
}
diff --git a/source4/lib/com/com.h b/source4/lib/com/com.h
index 0a26a568b0..c4dd872ff7 100644
--- a/source4/lib/com/com.h
+++ b/source4/lib/com/com.h
@@ -31,4 +31,7 @@ struct com_context
typedef struct IUnknown *(*get_class_object_function) (const struct GUID *clsid);
+
+#include "lib/com/proto.h"
+
#endif /* _COM_H */
diff --git a/source4/lib/com/config.mk b/source4/lib/com/config.mk
index 6c668521a5..5933168885 100644
--- a/source4/lib/com/config.mk
+++ b/source4/lib/com/config.mk
@@ -1,12 +1,12 @@
[SUBSYSTEM::COM]
-PRIVATE_PROTO_HEADER = com_proto.h
+PRIVATE_PROTO_HEADER = proto.h
OBJ_FILES = \
tables.o \
rot.o \
main.o
[SUBSYSTEM::DCOM]
-PRIVATE_PROTO_HEADER = dcom_proto.h
+PRIVATE_PROTO_HEADER = dcom/proto.h
OBJ_FILES = \
dcom/main.o \
dcom/tables.o
diff --git a/source4/lib/com/dcom/dcom.h b/source4/lib/com/dcom/dcom.h
index 41b155248e..308852848d 100644
--- a/source4/lib/com/dcom/dcom.h
+++ b/source4/lib/com/dcom/dcom.h
@@ -22,6 +22,7 @@
#define _DCOM_H
#include "lib/com/com.h"
+#include "lib/com/dcom/proto.h"
struct dcom_client_context {
struct cli_credentials *credentials;
diff --git a/source4/torture/com/simple.c b/source4/torture/com/simple.c
index 5d3c6250c4..4e4f91c971 100644
--- a/source4/torture/com/simple.c
+++ b/source4/torture/com/simple.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "lib/com/com.h"
+#include "lib/com/dcom/dcom.h"
#include "librpc/gen_ndr/com_dcom.h"
#include "lib/cmdline/popt_common.h"
diff --git a/source4/web_server/config.mk b/source4/web_server/config.mk
index 0f6158e6cc..04f0266ecd 100644
--- a/source4/web_server/config.mk
+++ b/source4/web_server/config.mk
@@ -3,6 +3,7 @@
#######################
# Start SUBSYSTEM WEB
[SUBSYSTEM::WEB]
+PRIVATE_PROTO_HEADER = proto.h
OBJ_FILES = \
web_server.o \
http.o
diff --git a/source4/web_server/web_server.h b/source4/web_server/web_server.h
index f23a578206..45617082e6 100644
--- a/source4/web_server/web_server.h
+++ b/source4/web_server/web_server.h
@@ -19,6 +19,7 @@
*/
#include "smbd/process_model.h"
+#include "web_server/proto.h"
/*
context of one open web connection