fixes for Solaris 11 build; missing SQL input files added to dist
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 4 Aug 2016 08:42:56 +0000 (11:42 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 4 Aug 2016 08:42:56 +0000 (11:42 +0300)
configure.ac
include/nms_common.h
sql/Makefile.am

index d989d3c..a98bad9 100644 (file)
@@ -267,6 +267,9 @@ AC_ARG_WITH(jdk,
                LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"   
                LDFLAGS="$LDFLAGS -L${withval}/lib"
                CPPFLAGS="$CPPFLAGS -I${withval}/include"
+               if test -d "${withval}/include/solaris"; then
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include/solaris"
+               fi
        fi
        COMPONENTS="$COMPONENTS java"
 fi ])
@@ -1119,6 +1122,8 @@ if test "x$ac_compiler_gnu" = "xyes" ; then
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
                                [ 
                                        LDFLAGS="-m32 $LDFLAGS"
+                                       LTINIT_CC="$CC -m32"
+                                       LTINIT_CXX="$CXX -m32"
                                        AC_MSG_RESULT(yes) 
                                ], 
                                [ 
@@ -1132,6 +1137,8 @@ if test "x$ac_compiler_gnu" = "xyes" ; then
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
                                [ 
                                        LDFLAGS="-m64 $LDFLAGS"
+                                       LTINIT_CC="$CC -m64"
+                                       LTINIT_CXX="$CXX -m64"
                                        AC_MSG_RESULT(yes) 
                                ], 
                                [ 
@@ -1150,6 +1157,8 @@ if test "x$ac_compiler_gnu" = "xyes" ; then
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
                                [ 
                                        LDFLAGS="-m32 $LDFLAGS"
+                                       LTINIT_CC="$CC -m32"
+                                       LTINIT_CXX="$CXX -m32"
                                        AC_MSG_RESULT(yes) 
                                ], 
                                [ 
index 3ec6c51..11d719a 100644 (file)
@@ -483,6 +483,19 @@ typedef int SOCKET;
 #include <wctype.h>
 #endif
 
+// Fix for wcs* functions visibility in Solaris 11
+#if defined(__sun) && (__cplusplus >= 199711L)
+#if HAVE_WCSDUP
+using std::wcsdup;
+#endif
+#if HAVE_WCSCASECMP
+using std::wcscasecmp;
+#endif
+#if HAVE_WCSNCASECMP
+using std::wcsncasecmp;
+#endif
+#endif
+
 #include <errno.h>
 
 #define FS_PATH_SEPARATOR       _T("/")
index 45cfc21..48eda0a 100644 (file)
@@ -19,7 +19,7 @@ sql_DATA = dbinit_mysql.sql \
 
 ROOT_FILE = dbinit.in
 ADDITIONAL_COMMENTS_FILE = additional_comments.in
-SOURCE = $(ROOT_FILE) database.in schema.in metadata.in setup.in events.in policy.in objtools.in scripts.in images.in traps.in
+SOURCE = $(ROOT_FILE) database.in schema.in metadata.in setup.in events.in policy.in objtools.in scripts.in images.in traps.in country_codes.in currency_codes.in
 HEADER_FILES = ../include/netxmsdb.h ../include/nxevent.h ../src/server/include/nms_locks.h
 COMMAND = $(CPP) @SQLFLAGS@ -P -D_NETXMS_DB_SCHEMA_ -I@top_srcdir@/include -I@top_srcdir@/src/server/include
 SQUEEZE = perl -n strip.pl