summaryrefslogtreecommitdiff
path: root/cppe
diff options
context:
space:
mode:
Diffstat (limited to 'cppe')
-rw-r--r--cppe/config/Make.rules4
-rw-r--r--cppe/config/Make.rules.Linux125
-rw-r--r--cppe/include/IceE/Config.h2
-rw-r--r--cppe/src/IceE/Initialize.cpp2
-rw-r--r--cppe/src/IceE/Network.cpp27
5 files changed, 53 insertions, 107 deletions
diff --git a/cppe/config/Make.rules b/cppe/config/Make.rules
index 5bf6881e60f..d21c3725eb6 100644
--- a/cppe/config/Make.rules
+++ b/cppe/config/Make.rules
@@ -58,8 +58,8 @@ prefix = /opt/IceE-$(VERSION)
# ----------------------------------------------------------------------
SHELL = /bin/sh
-VERSION = 1.1.0
-SOVERSION = 11
+VERSION = 1.2.0
+SOVERSION = 12
bindir = $(top_srcdir)/bin
libdir = $(top_srcdir)/lib
includedir = $(top_srcdir)/include
diff --git a/cppe/config/Make.rules.Linux b/cppe/config/Make.rules.Linux
index 71bad97d81d..19610f478a6 100644
--- a/cppe/config/Make.rules.Linux
+++ b/cppe/config/Make.rules.Linux
@@ -33,6 +33,9 @@ ifeq ($(CXX),g++)
CXX = c++
endif
+ifeq ($(AR),)
+ AR = ar
+endif
ifeq ($(MACHINE),x86_64)
#
@@ -43,99 +46,69 @@ ifeq ($(MACHINE),x86_64)
endif
endif
-
-ifeq ($(CXX),c++)
-
- ifeq ($(MACHINE),sparc64)
- #
- # We are an ultra, at least, and so have the atomic instructions
- #
- USE_SPARC_ASM = yes
- CXXARCHFLAGS = -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
- endif
-
- ifeq ($(MACHINE),sparc)
- #
- # We are a sun4m or sun4c
- # On sun4m, there is a bug in some CPU/kernel/gcc configurations which
- # prevents us from using '-mcpu=v8'.
- #
- USE_SPARC_ASM = no
- CXXARCHFLAGS = -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
- endif
-
- ifeq ($(MACHINE),x86_64)
- ifeq ($(LP64),yes)
- CXXARCHFLAGS = -m64
- else
- CXXARCHFLAGS = -m32
- endif
- lp64suffix = 64
- endif
-
- CXXFLAGS = $(CXXARCHFLAGS) -ftemplate-depth-128 -Wall -D_REENTRANT
-
- ifeq ($(STATICLIBS),)
- CXXFLAGS += -fPIC
- endif
-
- ifeq ($(OPTIMIZE),yes)
- CXXFLAGS += $(OPT_FLAGS) -DNDEBUG
- else
- CXXFLAGS += -g
- endif
-
- ifeq ($(USE_SPARC_ASM),yes)
- CFLAGS = $(OPT_FLAGS) -mcpu=ultrasparc -pipe -DNDEBUG -DUSE_SPARC_ASM
- ifeq ($(STATICLIBS),)
- CFLAGS += -fPIC
- endif
- endif
-
- ifeq ($(USE_SPARC_ASM),no)
- CFLAGS = $(OPT_FLAGS) -mcpu=v8 -pipe -DNDEBUG -DICE_USE_MUTEX_SHARED
- ifeq ($(STATICLIBS),)
- CFLAGS += -fPIC
- endif
- endif
-
+ifeq ($(MACHINE),sparc64)
#
- # C++ run-time libraries, necessary for linking some shared libraries.
+ # We are an ultra, at least, and so have the atomic instructions
#
- CXXLIBS =
+ USE_SPARC_ASM = yes
+ CXXARCHFLAGS = -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
+endif
- mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread
+ifeq ($(MACHINE),sparc)
+ #
+ # We are a sun4m or sun4c
+ # On sun4m, there is a bug in some CPU/kernel/gcc configurations which
+ # prevents us from using '-mcpu=v8'.
+ #
+ USE_SPARC_ASM = no
+ CXXARCHFLAGS = -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
+endif
- mklib = ar cr $(1) $(2)
+ifeq ($(MACHINE),x86_64)
+ ifeq ($(LP64),yes)
+ CXXARCHFLAGS = -m64
+ else
+ CXXARCHFLAGS = -m32
+ endif
+ lp64suffix = 64
+endif
- LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir)
+CXXFLAGS = $(CXXARCHFLAGS) -ftemplate-depth-128 -Wall -D_REENTRANT
+ifeq ($(STATICLIBS),)
+ CXXFLAGS += -fPIC
endif
-ifeq ($(CXX),icpc)
-
- CXXFLAGS = -D_REENTRANT
+ifeq ($(OPTIMIZE),yes)
+ CXXFLAGS += $(OPT_FLAGS) -DNDEBUG
+else
+ CXXFLAGS += -g
+endif
+ifeq ($(USE_SPARC_ASM),yes)
+ CFLAGS = $(OPT_FLAGS) -mcpu=ultrasparc -pipe -DNDEBUG -DUSE_SPARC_ASM
ifeq ($(STATICLIBS),)
- CXXFLAGS += -fPIC
+ CFLAGS += -fPIC
endif
+endif
- ifeq ($(OPTIMIZE),yes)
- CXXFLAGS += $(OPT_FLAGS) -DNDEBUG
- else
- CXXFLAGS += -g
+ifeq ($(USE_SPARC_ASM),no)
+ CFLAGS = $(OPT_FLAGS) -mcpu=v8 -pipe -DNDEBUG -DICE_USE_MUTEX_SHARED
+ ifeq ($(STATICLIBS),)
+ CFLAGS += -fPIC
endif
+endif
- #
- # C++ run-time libraries, necessary for linking some shared libraries.
- #
- CXXLIBS =
+#
+# C++ run-time libraries, necessary for linking some shared libraries.
+#
+CXXLIBS =
- mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread
+mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread
- mklib = ar cr $(1) $(2)
+mklib = $(AR) cr $(1) $(2)
-endif
+LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir)
BASELIBS = $(STLPORT_LIBS) -lpthread
LIBS = -lIceE $(BASELIBS)
diff --git a/cppe/include/IceE/Config.h b/cppe/include/IceE/Config.h
index b325d71ded3..ada1d5fc767 100644
--- a/cppe/include/IceE/Config.h
+++ b/cppe/include/IceE/Config.h
@@ -88,7 +88,7 @@
// of Itanium (IA64) and MIPS.
//
#if defined(__i386) || defined(_M_IX86) || defined (__x86_64) || \
- defined (_M_ARM) || defined(__MIPSEL__)
+ defined (_M_ARM) || defined(__MIPSEL__) || defined (__ARMEL__)
# define ICE_LITTLE_ENDIAN
#elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \
defined(__ppc__) || defined(_ARCH_COM) || defined(__MIPSEB__)
diff --git a/cppe/src/IceE/Initialize.cpp b/cppe/src/IceE/Initialize.cpp
index 2ccd9fd426a..1062a289b6f 100644
--- a/cppe/src/IceE/Initialize.cpp
+++ b/cppe/src/IceE/Initialize.cpp
@@ -120,7 +120,7 @@ CommunicatorPtr
Ice::initialize(StringSeq& args, const InitializationData& initializationData, Int version)
{
int origArgc;
- char** argv;
+ char** argv = 0;
CommunicatorPtr communicator;
try
diff --git a/cppe/src/IceE/Network.cpp b/cppe/src/IceE/Network.cpp
index 869db016118..9d0a0da363d 100644
--- a/cppe/src/IceE/Network.cpp
+++ b/cppe/src/IceE/Network.cpp
@@ -14,8 +14,6 @@
#if defined(_WIN32)
# include <winsock2.h>
-#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
-# include <ifaddrs.h>
#else
# include <sys/ioctl.h>
# include <net/if.h>
@@ -946,31 +944,6 @@ IceInternal::getLocalHosts()
{
result.push_back(inetAddrToString(addrs[i].sin_addr));
}
-#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
- struct ifaddrs* ifap;
- if(::getifaddrs(&ifap) == SOCKET_ERROR)
- {
- SocketException ex(__FILE__, __LINE__);
- ex.error = getSocketErrno();
- throw ex;
- }
-
- struct ifaddrs* curr = ifap;
- while(curr != 0)
- {
- if(curr->ifa_addr && curr->ifa_addr->sa_family == AF_INET)
- {
- struct sockaddr_in* addr = reinterpret_cast<struct sockaddr_in*>(curr->ifa_addr);
- if(addr->sin_addr.s_addr != 0)
- {
- result.push_back(inetAddrToString((*addr).sin_addr));
- }
- }
-
- curr = curr->ifa_next;
- }
-
- ::freeifaddrs(ifap);
#else
SOCKET fd = createSocket();