diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-08-06 10:24:57 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-08-06 10:24:57 +0200 |
commit | e6f5dc2c89eda44fb0a3d444223131a31867a1b2 (patch) | |
tree | b6bddfe0a0cccef45484314f47967d95a01472bb /cpp | |
parent | more Java changes & tests (diff) | |
parent | ICE-4804 - Properties and case-mismatch (diff) | |
download | ice-e6f5dc2c89eda44fb0a3d444223131a31867a1b2.tar.bz2 ice-e6f5dc2c89eda44fb0a3d444223131a31867a1b2.tar.xz ice-e6f5dc2c89eda44fb0a3d444223131a31867a1b2.zip |
Merge remote-tracking branch 'origin/master' into encoding11
Conflicts:
cpp/include/Ice/Stream.h
cpp/include/Slice/Preprocessor.h
rb/ruby/Makefile.mak
Diffstat (limited to 'cpp')
397 files changed, 1114 insertions, 2023 deletions
diff --git a/cpp/INSTALL.MINGW b/cpp/INSTALL.MINGW new file mode 100644 index 00000000000..cc6e3cf22b4 --- /dev/null +++ b/cpp/INSTALL.MINGW @@ -0,0 +1,128 @@ +====================================================================== +Introduction +====================================================================== + +This file describes the Ice source distribution, including information +about compiler requirements, third-party dependencies, and +instructions for building and testing the distribution. + + http://www.zeroc.com/download.html + +MinGW is only supported for building the Ice extension for Ruby. + +MinGW is not supported for general application development in this +release. + + +====================================================================== +Requirements +====================================================================== + + +Windows version +--------------- + +Ice for MinGW is only supported in Windows XP and Windows 7. + + +MinGW Setup +------------ + +The only supported MinGW version is the one that is included in the +Ruby Development Kit, which you can download here: + + http://rubyinstaller.org/downloads/ + +You must download the file DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe, +which is a self-extracting archive. + +To build Ice with MinGW, you also need to install Cygwin. The Cygwin +installer is available at: + + http://www.cygwin.com/install.html + +When installing Cygwin, make sure you select "make" in the package +list. You do not need to install the MinGW packages from Cygwin. + + +Third-party libraries +--------------------- + +Ice has dependencies on a number of third-party libraries: + +- OpenSSL 1.0 or later +- bzip2 1.0.x +- mcpp 2.7.2 (with patches) + +You do not need to build these packages yourself, as ZeroC supplies a +Windows installer that contains all of the third-party dependencies. + +If you intend to build the third-party dependencies from source, we +recommend downloading the Ice third-party source archive from + + http://www.zeroc.com/download.html + +This archive contains the source distributions for each of the +third-party dependencies, as well as required source patches and +configuration instructions. + +For more information about these dependencies, please refer to +the links below: + +OpenSSL http://www.openssl.org +bzip2 http://sources.redhat.com/bzip2 +mcpp http://mcpp.sourceforge.net + + +====================================================================== +Compilation and Testing +====================================================================== + +Using your favorite Zip tool, unzip the Ice source archive anywhere +you like. + +Open a Cygwin command prompt and change the working directory to the +location of the extracted source archive. For example: + +$ cd ~/Ice-@ver@/cpp + +Update your PATH to include MinGW from the Ruby Development Kit. For +example, if you installed the kit into C:\RubyDevKit-4.5.2, you would +update PATH as follows: + +$ export PATH=/cygdrive/c/RubyDevKit-4.5.2/mingw/bin:$PATH + +Edit config/Make.rules to establish your build configuration. The +comments in the file provide more information. In particular, if +Ice third-party packages are not installed in the default location, +set THIRDPARTY_HOME to the Ice third-party installation directory. + +Now you are ready to build Ice: + +$ make + +This will build the Ice core, libraries, and tests. + +Python is required to run the test suite: + + http://www.python.org/download + +After a successful build, you can run the test suite. Open a Windows +(not Cygwin) command prompt and change the working directory to +Ice-@ver@: + +> cd C:\Ice-@ver@\cpp +> set CPP_COMPILER=MINGW +> python allTests.py + +If everything worked out, you should see lots of "ok" messages. In +case of a failure, the tests abort with "failed". + + +====================================================================== +Installation +====================================================================== + +From a Cygwin command prompt, simply run "make install". This will +install Ice in the directory specified by the "prefix" variable in +config/Make.rules. diff --git a/cpp/Makefile b/cpp/Makefile index b2f079a30a2..67d4542b71c 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -11,7 +11,11 @@ top_srcdir = . include $(top_srcdir)/config/Make.rules -SUBDIRS = config src include test demo +SUBDIRS = config src include test + +ifneq ($(MinGW), yes) +SUBDIRS := $(SUBDIRS) demo +endif INSTALL_SUBDIRS = $(install_bindir) $(install_libdir) $(install_includedir) $(install_configdir) diff --git a/cpp/allTests.py b/cpp/allTests.py index 046dfe586ce..c0432217228 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -35,7 +35,7 @@ tests = [ ("Slice/errorDetection", ["once"]), ("Slice/keyword", ["once"]), ("Slice/structure", ["once"]), - ("Ice/properties", ["once", "novc6", "nobcc"]), + ("Ice/properties", ["once", "novc6", "nomingw"]), ("Ice/proxy", ["core"]), ("Ice/operations", ["core"]), ("Ice/exceptions", ["core"]), @@ -58,7 +58,7 @@ tests = [ ("Ice/custom", ["core", "novc6", "nossl"]), ("Ice/retry", ["core"]), ("Ice/timeout", ["core"]), - ("Ice/background", ["core"]), + ("Ice/background", ["core", "nomingw"]), ("Ice/servantLocator", ["core"]), ("Ice/interceptor", ["core"]), ("Ice/stringConverter", ["core"]), @@ -67,39 +67,39 @@ tests = [ ("Ice/defaultValue", ["core"]), ("Ice/invoke", ["core", "novc6"]), ("IceSSL/configuration", ["once", "novalgrind"]), # valgrind doesn't work well with openssl - ("IceBox/configuration", ["core", "noipv6", "nobcc", "novc6"]), - ("Freeze/dbmap", ["once", "novc6"]), - ("Freeze/complex", ["once", "novc6"]), - ("Freeze/evictor", ["core", "novc6"]), - ("Freeze/fileLock", ["core", "novc6"]), - ("IceStorm/single", ["service", "novc6", "noappverifier"]), # This test doensn't work with appverifier is sensitive to timeouts. - ("IceStorm/federation", ["service", "novc6"]), - ("IceStorm/federation2", ["service", "novc6"]), - ("IceStorm/stress", ["service", "stress", "novc6", "noappverifier"]), # This test is very slow with appverifier. - ("IceStorm/rep1", ["service", "novc6"]), - ("IceStorm/repgrid", ["service", "novc6"]), - ("IceStorm/repstress", ["service", "noipv6", "stress", "novc6"]), - ("FreezeScript/dbmap", ["once", "novc6"]), - ("FreezeScript/evictor", ["once", "novc6"]), - ("IceGrid/simple", ["service", "novc6"]), - ("IceGrid/fileLock", ["service", "nobcc", "novc6"]), - ("IceGrid/deployer", ["service", "nobcc", "novc6"]), - ("IceGrid/session", ["service", "nobcc", "novc6"]), - ("IceGrid/update", ["service", "nobcc", "novc6"]), - ("IceGrid/activation", ["service", "nobcc", "novc6"]), - ("IceGrid/replicaGroup", ["service", "nobcc", "novc6"]), - ("IceGrid/replication", ["service", "nobcc", "novc6"]), - ("IceGrid/allocation", ["service", "nobcc", "novc6"]), - ("IceGrid/distribution", ["service", "nobcc", "novc6"]), - ("IceGrid/admin", ["service", "novc6"]), - ("Glacier2/router", ["service", "novc6"]), - ("Glacier2/attack", ["service", "novc6"]), - ("Glacier2/override", ["service", "novc6"]), - ("Glacier2/sessionControl", ["service", "novc6"]), - ("Glacier2/ssl", ["service", "novalgrind", "novc6"]), # valgrind doesn't work well with openssl - ("Glacier2/dynamicFiltering", ["service", "novc6"]), - ("Glacier2/staticFiltering", ["service", "noipv6", "novc6"]), - ("Glacier2/sessionHelper", ["service", "novc6"]), + ("IceBox/configuration", ["core", "noipv6", "novc6", "nomingw"]), + ("Freeze/dbmap", ["once", "novc6", "nomingw"]), + ("Freeze/complex", ["once", "novc6", "nomingw"]), + ("Freeze/evictor", ["core", "novc6", "nomingw"]), + ("Freeze/fileLock", ["core", "novc6", "nomingw"]), + ("IceStorm/single", ["service", "novc6", "noappverifier", "nomingw"]), # This test doensn't work with appverifier is sensitive to timeouts. + ("IceStorm/federation", ["service", "novc6", "nomingw"]), + ("IceStorm/federation2", ["service", "novc6", "nomingw"]), + ("IceStorm/stress", ["service", "stress", "novc6", "noappverifier", "nomingw"]), # This test is very slow with appverifier. + ("IceStorm/rep1", ["service", "novc6", "nomingw"]), + ("IceStorm/repgrid", ["service", "novc6", "nomingw"]), + ("IceStorm/repstress", ["service", "noipv6", "stress", "novc6", "nomingw"]), + ("FreezeScript/dbmap", ["once", "novc6", "nomingw"]), + ("FreezeScript/evictor", ["once", "novc6", "nomingw"]), + ("IceGrid/simple", ["service", "novc6", "nomingw"]), + ("IceGrid/fileLock", ["service", "novc6", "nomingw"]), + ("IceGrid/deployer", ["service", "novc6", "nomingw"]), + ("IceGrid/session", ["service", "novc6", "nomingw"]), + ("IceGrid/update", ["service", "novc6", "nomingw"]), + ("IceGrid/activation", ["service", "novc6", "nomingw"]), + ("IceGrid/replicaGroup", ["service", "novc6", "nomingw"]), + ("IceGrid/replication", ["service", "novc6", "nomingw"]), + ("IceGrid/allocation", ["service", "novc6", "nomingw"]), + ("IceGrid/distribution", ["service", "novc6", "nomingw"]), + ("IceGrid/admin", ["service", "novc6", "nomingw"]), + ("Glacier2/router", ["service", "novc6", "nomingw"]), + ("Glacier2/attack", ["service", "novc6", "nomingw"]), + ("Glacier2/override", ["service", "novc6", "nomingw"]), + ("Glacier2/sessionControl", ["service", "novc6", "nomingw"]), + ("Glacier2/ssl", ["service", "novalgrind", "novc6", "nomingw"]), # valgrind doesn't work well with openssl + ("Glacier2/dynamicFiltering", ["service", "novc6", "nomingw"]), + ("Glacier2/staticFiltering", ["service", "noipv6", "novc6", "nomingw"]), + ("Glacier2/sessionHelper", ["service", "novc6", "nomingw"]), ] # diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 54a478cd218..e159318b676 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -130,6 +130,13 @@ USE_READLINE ?= no #GENPIC ?= yes # +# If building with MinGW and Ice third party packages is not installed +# in the default location set THIRDPARTY_HOME to the Ice third party +# installation directory. +# +#THIRDPARTY_HOME ?= C:\Program Files\ZeroC\Ice-$(VERSION)-ThirdParty + +# # Default Mutex protocol: one of PrioNone or PrioInherit. # #DEFAULT_MUTEX_PROTOCOL ?= PrioNone @@ -138,12 +145,22 @@ USE_READLINE ?= no # Don't change anything below this line! # ---------------------------------------------------------------------- +ifeq ($(shell test -f $(top_srcdir)/config/Make.rules.common && echo 0),0) + include $(top_srcdir)/config/Make.rules.common +else + include $(top_srcdir)/../cpp/config/Make.rules.common +endif + # # Common definitions # ice_language = cpp ifneq ($(shell test "$(USE_BIN_DIST)" != "yes" -a -d $(top_srcdir)/../$(ice_language) && echo 0),0) - slice_translator = slice2cpp + ifeq ($(MinGW), yes) + slice_translator = slice2cpp.exe + else + slice_translator = slice2cpp + endif ice_require_cpp = 1 endif @@ -170,7 +187,11 @@ endif # # Platform specific definitions # -include $(top_srcdir)/config/Make.rules.$(UNAME) +ifeq ($(MinGW), yes) + include $(top_srcdir)/config/Make.rules.MinGW +else + include $(top_srcdir)/config/Make.rules.$(UNAME) +endif install_includedir := $(prefix)/include install_docdir := $(prefix)/doc @@ -188,58 +209,71 @@ ifeq ($(DEFAULT_MUTEX_PROTOCOL), PrioInherit) ICEUTIL_FLAGS = -DICE_PRIO_INHERIT endif -OPENSSL_FLAGS = $(if $(OPENSSL_HOME),-I$(OPENSSL_HOME)/include) -OPENSSL_LIBS = $(if $(OPENSSL_HOME),-L$(OPENSSL_HOME)/$(libsubdir)) -lssl -lcrypto -OPENSSL_RPATH_LINK = $(if $(OPENSSL_HOME),$(call rpathlink,$(OPENSSL_HOME)/$(libsubdir))) - -BZIP2_FLAGS = $(if $(BZIP2_HOME),-I$(BZIP2_HOME)/include) -BZIP2_LIBS = $(if $(BZIP2_HOME),-L$(BZIP2_HOME)/$(libsubdir)) -lbz2 -BZIP2_RPATH_LINK = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir))) - -ICONV_LIBS = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) $(ICONV_LIB) - -ifneq ($(DB_HOME),) - DB_FLAGS = -I$(DB_HOME)/include - DB_LIBS = -L$(DB_HOME)/$(libsubdir) -ldb_cxx - DB_RPATH_LINK = $(call rpathlink,$(DB_HOME)/$(libsubdir)) +ifeq ($(MinGW), yes) + OPENSSL_LIBS = -leay32_mingw -lssleay32_mingw + BZIP2_LIBS = -lbzip2_mingw + MCPP_LIBS = -lmcpp + slicedir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(slicedir)) + ICECPPFLAGS = -I"$(slicedir_win)" else - ifeq ($(shell if [ -d /usr/include/db48 -a -d /usr/$(libsubdir)/db48 ] ; then echo yes; fi), yes) - DB_FLAGS = -I/usr/include/db48 - DB_LIBS = -L/usr/$(libsubdir)/db48 -ldb_cxx - else - DB_LIBS = -ldb_cxx - endif + OPENSSL_FLAGS = $(if $(OPENSSL_HOME),-I$(OPENSSL_HOME)/include) + OPENSSL_LIBS = $(if $(OPENSSL_HOME),-L$(OPENSSL_HOME)/$(libsubdir)) -lssl -lcrypto + OPENSSL_RPATH_LINK = $(if $(OPENSSL_HOME),$(call rpathlink,$(OPENSSL_HOME)/$(libsubdir))) + BZIP2_FLAGS = $(if $(BZIP2_HOME),-I$(BZIP2_HOME)/include) + BZIP2_LIBS = $(if $(BZIP2_HOME),-L$(BZIP2_HOME)/$(libsubdir)) -lbz2 + BZIP2_RPATH_LINK = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir))) + ICONV_LIBS = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) $(ICONV_LIB) + + ifneq ($(DB_HOME),) + DB_FLAGS = -I$(DB_HOME)/include + DB_LIBS = -L$(DB_HOME)/$(libsubdir) -ldb_cxx + DB_RPATH_LINK = $(call rpathlink,$(DB_HOME)/$(libsubdir)) + else + ifeq ($(shell if [ -d /usr/include/db48 -a -d /usr/$(libsubdir)/db48 ] ; then echo yes; fi), yes) + DB_FLAGS = -I/usr/include/db48 + DB_LIBS = -L/usr/$(libsubdir)/db48 -ldb_cxx + else + DB_LIBS = -ldb_cxx + endif + endif + EXPAT_FLAGS = $(if $(EXPAT_HOME),-I$(EXPAT_HOME)/include) + EXPAT_LIBS = $(if $(EXPAT_HOME),-L$(EXPAT_HOME)/$(libsubdir)) -lexpat + EXPAT_RPATH_LINK = $(if $(EXPAT_HOME),$(call rpathlink,$(EXPAT_HOME)/$(libsubdir))) + MCPP_LIBS = $(if $(MCPP_HOME),-L$(MCPP_HOME)/$(libsubdir)) -lmcpp + MCPP_RPATH_LINK = $(if $(MCPP_HOME),$(call rpathlink,$(MCPP_HOME)/$(libsubdir))) + + ifeq ($(PLATFORM_HAS_READLINE),yes) + ifeq ($(USE_READLINE),yes) + READLINE_FLAGS = -DHAVE_READLINE $(if $(READLINE_HOME),-I$(READLINE_HOME)/include) + READLINE_LIBS = $(if $(READLINE_HOME),-L$(READLINE_HOME)/$(libsubdir)) -lreadline -lncurses + endif + endif + ICECPPFLAGS = -I$(slicedir) endif -EXPAT_FLAGS = $(if $(EXPAT_HOME),-I$(EXPAT_HOME)/include) -EXPAT_LIBS = $(if $(EXPAT_HOME),-L$(EXPAT_HOME)/$(libsubdir)) -lexpat -EXPAT_RPATH_LINK = $(if $(EXPAT_HOME),$(call rpathlink,$(EXPAT_HOME)/$(libsubdir))) -MCPP_LIBS = $(if $(MCPP_HOME),-L$(MCPP_HOME)/$(libsubdir)) -lmcpp -MCPP_RPATH_LINK = $(if $(MCPP_HOME),$(call rpathlink,$(MCPP_HOME)/$(libsubdir))) - -ifeq ($(PLATFORM_HAS_READLINE),yes) - ifeq ($(USE_READLINE),yes) - READLINE_FLAGS = -DHAVE_READLINE $(if $(READLINE_HOME),-I$(READLINE_HOME)/include) - READLINE_LIBS = $(if $(READLINE_HOME),-L$(READLINE_HOME)/$(libsubdir)) -lreadline -lncurses - endif -endif - -ifneq ($(DB_HOME),) -endif - -ICECPPFLAGS = -I$(slicedir) SLICE2CPPFLAGS = $(ICECPPFLAGS) ifeq ($(ice_dir), /usr) CPPFLAGS = LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) else - CPPFLAGS = -I$(includedir) - ifdef ice_src_dist - LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) + ifeq ($(MinGW), yes) + includedir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(includedir)) + CPPFLAGS = -I"$(includedir_win)" + ice_dir_win = $(shell $(top_srcdir)/../cpp/config/cygpath-win.sh $(ice_dir)) + ifdef ice_src_dist + LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) + else + LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L"$(ice_dir_win)\$(binsubdir)" + endif else - LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir) + CPPFLAGS = -I$(includedir) + ifdef ice_src_dist + LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) + else + LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir) + endif endif endif @@ -255,18 +289,35 @@ else BISONFLAGS := -dvt endif +ifneq ($(MinGW), yes) ifeq ($(mkshlib),) $(error You need to define mkshlib in Make.rules.$(UNAME)) endif +endif ifdef ice_src_dist - SLICEPARSERLIB = $(libdir)/$(call mklibfilename,Slice,$(VERSION)) - SLICE2CPP = $(bindir)/slice2cpp - SLICE2FREEZE = $(bindir)/slice2freeze + ifeq ($(MinGW), yes) + SLICEPARSERLIB = $(bindir)/$(SLICE_LIBNAME).dll + SLICE2CPP = $(bindir)/slice2cpp.exe + else + SLICEPARSERLIB = $(libdir)/$(call mklibfilename,Slice,$(VERSION)) + SLICE2CPP = $(bindir)/slice2cpp + SLICE2FREEZE = $(bindir)/slice2freeze + endif else - SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION)) - SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp - SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze + ifeq ($(MinGW), yes) + SLICEPARSERLIB = $(ice_dir)/$(binsubdir)/$(SLICE_LIBNAME).dll + SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp.exe + else + SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION)) + SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp + SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze + endif +endif + +ifeq ($(MinGW), yes) + CPPFLAGS := $(CPPFLAGS) -I"$(THIRDPARTY_HOME_WIN)\include" + LDFLAGS := $(LDFLAGS) -L"$(THIRDPARTY_HOME_WIN)\lib\mingw" -L"$(THIRDPARTY_HOME_WIN)\bin" -L$(libdir) -L$(bindir) endif EVERYTHING = all depend clean install @@ -280,7 +331,6 @@ EVERYTHING = all depend clean install .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $< - $(HDIR)/%F.h: $(SDIR)/%F.ice $(SLICE2CPP) $(SLICEPARSERLIB) rm -f $(HDIR)/$(*F)F.h $(*F)F.cpp $(SLICE2CPP) $(SLICE2CPPFLAGS) $< @@ -315,10 +365,14 @@ all:: $(SRCS) $(TARGETS) depend:: $(SRCS) $(patsubst $(SDIR)/%.ice,$(HDIR)/%.h,$(wildcard $(SDIR)/*F.ice)) $(SLICE_SRCS) -rm -f .depend .depend.mak if test -n "$(SRCS)" ; then \ - $(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | $(ice_dir)/config/makedepend.py; \ + $(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | $(ice_dir)/config/makedepend.py; \ fi if test -n "$(SLICE_SRCS)" ; then \ - $(SLICE2CPP) --depend $(SLICE2CPPFLAGS) $(SLICE_SRCS) | $(ice_dir)/config/makedepend.py; \ + if test -n "$(HDIR)"; then \ + $(SLICE2CPP) --depend $(SLICE2CPPFLAGS) $(SLICE_SRCS) | $(ice_dir)/config/makedepend.py "\$$(HDIR)"; \ + else \ + $(SLICE2CPP) --depend $(SLICE2CPPFLAGS) $(SLICE_SRCS) | $(ice_dir)/config/makedepend.py; \ + fi \ fi clean:: diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index 9f2ac80e7f7..2ce8320aeb5 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -11,7 +11,13 @@ # This file is included by Make.rules when uname is Darwin. # -CXX = clang++ +ifeq ($(DEVELOPER_PATH),) + DEVELOPER_PATH = $(shell xcode-select -print-path) +endif + +TOOLCHAIN_BIN_DIR = $(DEVELOPER_PATH)/Toolchains/XcodeDefault.xctoolchain/usr/bin +CXX = $(TOOLCHAIN_BIN_DIR)/clang++ + #CXX = g++ CXXFLAGS = -Wall -D_REENTRANT diff --git a/cpp/config/Make.rules.MINGW b/cpp/config/Make.rules.MINGW new file mode 100644 index 00000000000..2342da1e3c7 --- /dev/null +++ b/cpp/config/Make.rules.MINGW @@ -0,0 +1,56 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +# +# This file is included by Make.rules when building with MinGW. +# + +# +# build with CygWin MinGW? +# +#ifeq ($(CygWin), yes) +# CXX = i686-pc-mingw32-c++ +#endif + +# +# Default compiler is c++ (aka g++). +# +ifeq ($(CXX),) + CXX = c++ +endif + +CXXFLAGS = $(CXXARCHFLAGS) -fexceptions -mthreads -Wall -DWIN32_LEAN_AND_MEAN +LDFLAGS = -Wl,-no-undefined + +ifeq ($(CXX), i686-pc-mingw32-c++) + LDPLATFORMFLAGS := $(LDFLAGS) -static-libstdc++ -static-libgcc +endif + +ifeq ($(OPTIMIZE),yes) + CXXFLAGS += -O2 -DNDEBUG +else + CXXFLAGS += -g -D_DEBUG + LIBSUFFIX = d +endif + +COMPSUFFIX = mingw_ + +# +# MinGW lib names +# +ICEUTIL_LIBNAME = iceutil$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) +SLICE_LIBNAME = slice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) +ICE_LIBNAME = ice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) +ICESSL_LIBNAME = icessl$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) + +BASELIBS = -l$(ICEUTIL_LIBNAME) +LIBS = -l$(ICE_LIBNAME) $(BASELIBS) +ICEUTIL_OS_LIBS = -lrpcrt4 -ladvapi32 +ICE_OS_LIBS = $(ICEUTIL_OS_LIBS) -lIphlpapi -lws2_32 + diff --git a/cpp/config/Make.rules.bcc b/cpp/config/Make.rules.bcc deleted file mode 100644 index 7e8afe8a0a9..00000000000 --- a/cpp/config/Make.rules.bcc +++ /dev/null @@ -1,56 +0,0 @@ -# **********************************************************************
-#
-# Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-#
-# This file is included by Make.rules.mak when using Borland C++Builder.
-#
-# The following warnings are suppressed when building Ice:
-#
-# -w-par: W8057 - Parameter is never used
-# -w-lvc: W8031 - Temporary used for parameter
-# -w-rch: W8066 - Unreachable code
-#
-# Ice and Ice applications must be built with multi-threaded support (-tWM)
-# and linked with the multi-threaded runtime library (cw32mti.lib).
-#
-
-CXX = bcc32.exe
-CC = bcc32.exe
-LINK = ilink32.exe
-RC = brc32.exe
-
-BASE = -b
-PREOUT = ,
-PRELIBS = ,,
-PRELIBPATH = -L
-
-SETARGV = wildargs.obj
-
-CPPFLAGS = $(CPPFLAGS) -q -w-par -w-lvc -w-rch -vi- -tWM -c -DNO_STRICT;_NO_VCL;_RTLDLL
-
-!if "$(OPTIMIZE)" == "yes"
-CPPFLAGS = $(CPPFLAGS) -O2 -k- -DNDEBUG
-!else
-CPPFLAGS = $(CPPFLAGS) -Od -v -k -D_DEBUG
-!endif
-
-LDFLAGS = $(LDFLAGS) -L"$(BDS)\lib" -q -Gn -v -x
-
-LD_DLLFLAGS = $(LDFLAGS) -Gi -Tpd c0d32.obj
-LD_EXEFLAGS = $(LDFLAGS) -Tpe c0x32.obj
-
-ICE_OS_LIBS = cw32mti.lib import32.lib
-
-BASELIBS = iceutil$(LIBSUFFIX).lib $(ICE_OS_LIBS)
-LIBS = ice$(LIBSUFFIX).lib $(BASELIBS)
-
-BZIP2_LIBS = libbz2.lib
-DB_LIBS = libdb48.lib
-MCPP_LIBS = mcpp.lib
-ICONV_LIB = libiconv-bcc.lib
diff --git a/cpp/config/Make.rules.common b/cpp/config/Make.rules.common new file mode 100644 index 00000000000..5a5ded6a947 --- /dev/null +++ b/cpp/config/Make.rules.common @@ -0,0 +1,33 @@ +UNAME = $(shell uname) + +# +# CygWin on Windows XP x86 +# +ifeq ($(UNAME), CYGWIN_NT-5.1) + CygWin = yes + MinGW = yes +endif + +# +# CygWin on Windows XP x64 +# +ifeq ($(UNAME), CYGWIN_NT-5.1-WOW64) + CygWin = yes + MinGW = yes +endif + +# +# CygWin on Windows 7 x64 +# +ifeq ($(UNAME), CYGWIN_NT-6.1) + CygWin = yes + MinGW = yes +endif + +# +# CygWin on Windows 7 x64 +# +ifeq ($(UNAME), CYGWIN_NT-6.1-WOW64) + CygWin = yes + MinGW = yes +endif diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak index 7173648c14f..3b5b419c8a6 100755 --- a/cpp/config/Make.rules.mak +++ b/cpp/config/Make.rules.mak @@ -28,7 +28,7 @@ prefix = C:\Ice-$(VERSION) #
# Specify your C++ compiler. Supported values are:
-# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, BCC2010, VC110, VC110_EXPRESS
+# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, VC110, VC110_EXPRESS
#
!if "$(CPP_COMPILER)" == ""
CPP_COMPILER = VC90
@@ -97,13 +97,10 @@ SETARGV = setargv.obj #
# Compiler specific definitions
#
-!if "$(CPP_COMPILER)" == "BCC2010"
-BCPLUSPLUS = yes
-!include $(top_srcdir)/config/Make.rules.bcc
-!elseif "$(CPP_COMPILER)" == "VC60" || \
+!if "$(CPP_COMPILER)" == "VC60" || \
"$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || \
"$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" || \
- "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS"
+ "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS"
!include $(top_srcdir)/config/Make.rules.msvc
! else
!error Invalid setting for CPP_COMPILER: $(CPP_COMPILER)
@@ -113,9 +110,7 @@ BCPLUSPLUS = yes !error CPP_COMPILER: $(CPP_COMPILER) not supported to build Ice for WinRT
!endif
-!if "$(CPP_COMPILER)" == "BCC2010"
-libsuff = \bcc10
-!elseif "$(CPP_COMPILER)" == "VC60"
+!if "$(CPP_COMPILER)" == "VC60"
libsuff = \vc6
UNIQUE_DLL_NAMES = yes
!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
@@ -146,11 +141,9 @@ COMPSUFFIX = vc60_ !elseif "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS"
COMPSUFFIX = vc90_
!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
-COMPSUFFIX = vc100_
+COMPSUFFIX = vc100_
!elseif "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS"
COMPSUFFIX = vc110_
-!elseif "$(CPP_COMPILER)" == "BCC2010"
-COMPSUFFIX = bcc10_
!endif
!endif
@@ -301,4 +294,4 @@ clean:: install::
-depend::
\ No newline at end of file +depend::
diff --git a/cpp/config/cygpath-unix.sh b/cpp/config/cygpath-unix.sh new file mode 100755 index 00000000000..9f0bd94c704 --- /dev/null +++ b/cpp/config/cygpath-unix.sh @@ -0,0 +1,4 @@ +# +# Convert Windows path to Unix path, also escape whitespace. +# +v=`cygpath -u "$1"`; v=${v//[[:blank:]]/\\ }; v=${v/(/\\(}; echo ${v/)/\\)} diff --git a/cpp/config/cygpath-win.sh b/cpp/config/cygpath-win.sh new file mode 100755 index 00000000000..dd3e36e25fb --- /dev/null +++ b/cpp/config/cygpath-win.sh @@ -0,0 +1,4 @@ +#
+# Convert Unix path to Windows path.
+#
+echo `cygpath -w $1`
diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp index b86979edd16..2b20779bcf4 100644 --- a/cpp/demo/Freeze/bench/Client.cpp +++ b/cpp/demo/Freeze/bench/Client.cpp @@ -166,7 +166,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(i, i)); #else m.put(typename T::value_type(i, i)); @@ -269,7 +269,7 @@ private: s2.s = os.str(); s2.s1 = s1; -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(s1, s2)); #else m.put(typename T::value_type(s1, s2)); @@ -350,7 +350,7 @@ private: ostringstream os; os << i; c1->s = os.str(); -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(s1, c1)); #else m.put(typename T::value_type(s1, c1)); @@ -425,7 +425,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(i, i)); #else m.put(typename T::value_type(i, i)); diff --git a/cpp/demo/Freeze/casino/BankI.h b/cpp/demo/Freeze/casino/BankI.h index ad0e3ba899a..99cd3d6126f 100644 --- a/cpp/demo/Freeze/casino/BankI.h +++ b/cpp/demo/Freeze/casino/BankI.h @@ -54,7 +54,7 @@ private: std::vector<CasinoStore::PersistentBetPrx> getBets(const Ice::ObjectAdapterPtr&) const; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BCPLUSPLUS__) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) // // Some compilers don't let local classes access private data members // diff --git a/cpp/demo/Freeze/casino/BetResolver.h b/cpp/demo/Freeze/casino/BetResolver.h index cd441ed2718..5c05b2e44a8 100644 --- a/cpp/demo/Freeze/casino/BetResolver.h +++ b/cpp/demo/Freeze/casino/BetResolver.h @@ -30,7 +30,7 @@ public: int getBetCount() const; -#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) && (!defined(__BCPLUSPLUS__)) +#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) // // Some compilers don't let local classes access private members // diff --git a/cpp/demo/Freeze/casino/Server.cpp b/cpp/demo/Freeze/casino/Server.cpp index f84b4b6bca2..d8f1a937d08 100644 --- a/cpp/demo/Freeze/casino/Server.cpp +++ b/cpp/demo/Freeze/casino/Server.cpp @@ -30,7 +30,7 @@ private: map<string, string> createTypeMap(const string&); const string _envName; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BCPLUSPLUS__) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) // // Some compilers don't let local classes access private data members // diff --git a/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp b/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp index 7d4c613ab60..2800b3991cc 100644 --- a/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp +++ b/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp @@ -18,7 +18,7 @@ using namespace IceUtil; // can only create and destroy one CurrentDatabase per process run. // -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) +#ifdef _MSC_VER #define __thread __declspec(thread) #endif diff --git a/cpp/include/Freeze/Freeze.h b/cpp/include/Freeze/Freeze.h index 1e1c6df5f32..9165f30d948 100644 --- a/cpp/include/Freeze/Freeze.h +++ b/cpp/include/Freeze/Freeze.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_FREEZE_H -#define FREEZE_FREEZE_H +#pragma once #include <Freeze/Initialize.h> #include <Freeze/BackgroundSaveEvictor.h> @@ -17,4 +16,3 @@ #include <Freeze/TransactionHolder.h> #include <Freeze/Catalog.h> -#endif diff --git a/cpp/include/Freeze/Index.h b/cpp/include/Freeze/Index.h index 7c15bcad8c6..cb05a198ec0 100644 --- a/cpp/include/Freeze/Index.h +++ b/cpp/include/Freeze/Index.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_INDEX_H -#define FREEZE_INDEX_H +#pragma once #include <Ice/Ice.h> #include <Freeze/DB.h> @@ -56,6 +55,3 @@ private: typedef IceUtil::Handle<Index> IndexPtr; } - -#endif - diff --git a/cpp/include/Freeze/Initialize.h b/cpp/include/Freeze/Initialize.h index f355c80f5fa..29a165e5506 100644 --- a/cpp/include/Freeze/Initialize.h +++ b/cpp/include/Freeze/Initialize.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_INITIALIZE_H -#define FREEZE_INITIALIZE_H +#pragma once #include <Ice/Ice.h> #include <Freeze/EvictorF.h> @@ -108,5 +107,3 @@ typedef void (*FatalErrorCallback)(const BackgroundSaveEvictorPtr&, const Ice::C FREEZE_API FatalErrorCallback registerFatalErrorCallback(FatalErrorCallback); } - -#endif diff --git a/cpp/include/Freeze/Map.h b/cpp/include/Freeze/Map.h index 10e3ec57771..61cc6a66ed7 100644 --- a/cpp/include/Freeze/Map.h +++ b/cpp/include/Freeze/Map.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_MAP_H -#define FREEZE_MAP_H +#pragma once #include <Ice/Ice.h> #include <iterator> @@ -1235,5 +1234,3 @@ inline ptrdiff_t* distance_type(const Freeze::IteratorBase&) { return (ptrdiff_t } #endif - -#endif diff --git a/cpp/include/Freeze/TransactionHolder.h b/cpp/include/Freeze/TransactionHolder.h index 84e973150a2..d3fec8c675c 100644 --- a/cpp/include/Freeze/TransactionHolder.h +++ b/cpp/include/Freeze/TransactionHolder.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_TRANSACTION_HOLDER_H -#define FREEZE_TRANSACTION_HOLDER_H +#pragma once #include <Freeze/Connection.h> #include <Freeze/Transaction.h> @@ -44,5 +43,3 @@ private: }; } - -#endif diff --git a/cpp/include/Glacier2/Application.h b/cpp/include/Glacier2/Application.h index 1cabe12b7c8..6bf8334af94 100644 --- a/cpp/include/Glacier2/Application.h +++ b/cpp/include/Glacier2/Application.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_APPLICATION_H -#define GLACIER2_APPLICATION_H +#pragma once #include <Ice/Application.h> @@ -217,5 +216,3 @@ private: }; } - -#endif diff --git a/cpp/include/Glacier2/Glacier2.h b/cpp/include/Glacier2/Glacier2.h index a970ac4d11a..f0490cdad44 100644 --- a/cpp/include/Glacier2/Glacier2.h +++ b/cpp/include/Glacier2/Glacier2.h @@ -7,8 +7,8 @@ // // ********************************************************************** -#ifndef GLACIER2_H -#define GLACIER2_H +#pragma once + #include <IceUtil/Config.h> #include <Glacier2/Router.h> #include <Glacier2/Session.h> @@ -17,5 +17,3 @@ # include <Glacier2/Application.h> #endif #include <Glacier2/SessionHelper.h> - -#endif diff --git a/cpp/include/Glacier2/SessionHelper.h b/cpp/include/Glacier2/SessionHelper.h index 687c680ce04..41dac3a908e 100644 --- a/cpp/include/Glacier2/SessionHelper.h +++ b/cpp/include/Glacier2/SessionHelper.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_SESSION_HELPER_H -#define GLACIER2_SESSION_HELPER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -112,5 +111,3 @@ private: typedef IceUtil::Handle<SessionFactoryHelper> SessionFactoryHelperPtr; } - -#endif diff --git a/cpp/include/Ice/Application.h b/cpp/include/Ice/Application.h index 448c88eb97d..d5d41de58e9 100644 --- a/cpp/include/Ice/Application.h +++ b/cpp/include/Ice/Application.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_APPLICATION_H -#define ICE_APPLICATION_H +#pragma once #include <Ice/Ice.h> @@ -152,5 +151,3 @@ protected: }; } - -#endif diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 595b8895aa4..0ac688ab381 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_BASIC_STREAM_H -#define ICE_BASIC_STREAM_H +#pragma once #include <Ice/InstanceF.h> #include <Ice/ObjectF.h> @@ -1138,5 +1137,3 @@ private: }; } // End namespace IceInternal - -#endif diff --git a/cpp/include/Ice/Buffer.h b/cpp/include/Ice/Buffer.h index 37f69eb3725..8c1c4339023 100644 --- a/cpp/include/Ice/Buffer.h +++ b/cpp/include/Ice/Buffer.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEE_BUFFER_H -#define ICEE_BUFFER_H +#pragma once #include <Ice/Config.h> @@ -150,5 +149,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/CommunicatorAsync.h b/cpp/include/Ice/CommunicatorAsync.h index 301daa893f4..e1cd14ac7df 100644 --- a/cpp/include/Ice/CommunicatorAsync.h +++ b/cpp/include/Ice/CommunicatorAsync.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_COMMUNICATOR_ASYNC_H -#define ICE_COMMUNICATOR_ASYNC_H +#pragma once #include <Ice/Communicator.h> @@ -120,5 +119,3 @@ newCallback_Communicator_flushBatchRequests(T* instance, void (T::*excb)(const : } } - -#endif diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h index 5322bb31717..bb3231c3a76 100644 --- a/cpp/include/Ice/Config.h +++ b/cpp/include/Ice/Config.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONFIG_H -#define ICE_CONFIG_H +#pragma once #include <IceUtil/Config.h> @@ -78,5 +77,3 @@ inline int getSystemErrno() { return errno; } #endif } - -#endif diff --git a/cpp/include/Ice/ConnectionAsync.h b/cpp/include/Ice/ConnectionAsync.h index f33569f083d..a53fe50e002 100644 --- a/cpp/include/Ice/ConnectionAsync.h +++ b/cpp/include/Ice/ConnectionAsync.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_ASYNC_H -#define ICE_CONNECTION_ASYNC_H +#pragma once #include <Ice/Connection.h> @@ -120,5 +119,3 @@ newCallback_Connection_flushBatchRequests(T* instance, void (T::*excb)(const ::I } } - -#endif diff --git a/cpp/include/Ice/ConnectionFactoryF.h b/cpp/include/Ice/ConnectionFactoryF.h index 5a5b3c123a1..8e2d62712c3 100644 --- a/cpp/include/Ice/ConnectionFactoryF.h +++ b/cpp/include/Ice/ConnectionFactoryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_FACTORY_F_H -#define ICE_CONNECTION_FACTORY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -26,5 +25,3 @@ ICE_API IceUtil::Shared* upCast(IncomingConnectionFactory*); typedef IceInternal::Handle<IncomingConnectionFactory> IncomingConnectionFactoryPtr; } - -#endif diff --git a/cpp/include/Ice/ConnectionIF.h b/cpp/include/Ice/ConnectionIF.h index 2c3b922edaa..114bc0f8a5f 100644 --- a/cpp/include/Ice/ConnectionIF.h +++ b/cpp/include/Ice/ConnectionIF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTIONI_F_H -#define ICE_CONNECTIONI_F_H +#pragma once #include <Ice/Handle.h> #include <Ice/LocalObject.h> @@ -33,5 +32,3 @@ enum AsyncStatus }; } - -#endif diff --git a/cpp/include/Ice/ConnectionMonitorF.h b/cpp/include/Ice/ConnectionMonitorF.h index ebf80a9f02c..5c61810e5a5 100644 --- a/cpp/include/Ice/ConnectionMonitorF.h +++ b/cpp/include/Ice/ConnectionMonitorF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_MONITOR_F_H -#define ICE_CONNECTION_MONITOR_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(ConnectionMonitor*); typedef IceInternal::Handle<ConnectionMonitor> ConnectionMonitorPtr; } - -#endif diff --git a/cpp/include/Ice/Direct.h b/cpp/include/Ice/Direct.h index 90a8944689f..fde47a9e6cc 100644 --- a/cpp/include/Ice/Direct.h +++ b/cpp/include/Ice/Direct.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DIRECT_H -#define ICE_DIRECT_H +#pragma once #include <Ice/ServantLocatorF.h> #include <Ice/ReferenceF.h> @@ -55,5 +54,3 @@ private: }; } - -#endif diff --git a/cpp/include/Ice/DispatchInterceptor.h b/cpp/include/Ice/DispatchInterceptor.h index 1949e810983..0515161c9c5 100644 --- a/cpp/include/Ice/DispatchInterceptor.h +++ b/cpp/include/Ice/DispatchInterceptor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DISPATCH_INTERCEPTOR_H -#define ICE_DISPATCH_INTERCEPTOR_H +#pragma once #include <Ice/Object.h> @@ -32,5 +31,3 @@ public: typedef IceInternal::Handle<DispatchInterceptor> DispatchInterceptorPtr; } - -#endif diff --git a/cpp/include/Ice/Dispatcher.h b/cpp/include/Ice/Dispatcher.h index cc1126f64e2..323ca7afa68 100644 --- a/cpp/include/Ice/Dispatcher.h +++ b/cpp/include/Ice/Dispatcher.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DISPATCHER_H -#define ICE_DISPATCHER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -38,5 +37,3 @@ public: typedef IceUtil::Handle<Dispatcher> DispatcherPtr; } - -#endif diff --git a/cpp/include/Ice/DynamicLibrary.h b/cpp/include/Ice/DynamicLibrary.h index 3a1d79de0a8..dd1aa9f9526 100644 --- a/cpp/include/Ice/DynamicLibrary.h +++ b/cpp/include/Ice/DynamicLibrary.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DYNAMIC_LIBRARY_H -#define ICE_DYNAMIC_LIBRARY_H +#pragma once #include <Ice/DynamicLibraryF.h> #include <Ice/StringConverter.h> @@ -87,7 +86,6 @@ private: #else void* _hnd; #endif - std::string _err; const Ice::StringConverterPtr _stringConverter; }; @@ -105,4 +103,3 @@ private: } -#endif diff --git a/cpp/include/Ice/DynamicLibraryF.h b/cpp/include/Ice/DynamicLibraryF.h index 32b9a01f8d1..184b15a8e57 100644 --- a/cpp/include/Ice/DynamicLibraryF.h +++ b/cpp/include/Ice/DynamicLibraryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DYNAMIC_LIBRARY_F_H -#define ICE_DYNAMIC_LIBRARY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -26,4 +25,4 @@ ICE_API IceUtil::Shared* upCast(DynamicLibraryList*); typedef Handle<DynamicLibraryList> DynamicLibraryListPtr; } -#endif + diff --git a/cpp/include/Ice/EndpointFactory.h b/cpp/include/Ice/EndpointFactory.h index 61734728d8c..6f344587828 100644 --- a/cpp/include/Ice/EndpointFactory.h +++ b/cpp/include/Ice/EndpointFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_FACTORY_H -#define ICE_ENDPOINT_FACTORY_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/EndpointIF.h> @@ -38,5 +37,3 @@ protected: }; } - -#endif diff --git a/cpp/include/Ice/EndpointFactoryF.h b/cpp/include/Ice/EndpointFactoryF.h index b5a03c4c35a..dc8bbfdb72f 100644 --- a/cpp/include/Ice/EndpointFactoryF.h +++ b/cpp/include/Ice/EndpointFactoryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_FACTORY_F_H -#define ICE_ENDPOINT_FACTORY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(EndpointFactory*); typedef Handle<EndpointFactory> EndpointFactoryPtr; } - -#endif diff --git a/cpp/include/Ice/EndpointIF.h b/cpp/include/Ice/EndpointIF.h index 4e9c69d1b8b..d1da6324f2a 100644 --- a/cpp/include/Ice/EndpointIF.h +++ b/cpp/include/Ice/EndpointIF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_I_F_H -#define ICE_ENDPOINT_I_F_H +#pragma once #include <Ice/Handle.h> #include <Ice/LocalObject.h> @@ -25,5 +24,3 @@ ICE_API IceUtil::Shared* upCast(EndpointHostResolver*); typedef Handle<EndpointHostResolver> EndpointHostResolverPtr; } - -#endif diff --git a/cpp/include/Ice/Exception.h b/cpp/include/Ice/Exception.h index cdc6bb8155c..f0a57f27e4b 100644 --- a/cpp/include/Ice/Exception.h +++ b/cpp/include/Ice/Exception.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_EXCEPTION_H -#define ICE_EXCEPTION_H +#pragma once #include <IceUtil/Exception.h> #include <Ice/Config.h> @@ -99,5 +98,3 @@ ICE_API std::ostream& operator<<(std::ostream&, const SystemException&); #endif } - -#endif diff --git a/cpp/include/Ice/FactoryTable.h b/cpp/include/Ice/FactoryTable.h index 1350c39db14..fe71694cfb2 100644 --- a/cpp/include/Ice/FactoryTable.h +++ b/cpp/include/Ice/FactoryTable.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_FACTORYTABLE_H -#define ICE_FACTORYTABLE_H +#pragma once #include <IceUtil/Mutex.h> #include <Ice/UserExceptionFactory.h> @@ -45,5 +44,3 @@ private: }; } - -#endif diff --git a/cpp/include/Ice/FactoryTableInit.h b/cpp/include/Ice/FactoryTableInit.h index 2e793e0c980..09a18ee8429 100644 --- a/cpp/include/Ice/FactoryTableInit.h +++ b/cpp/include/Ice/FactoryTableInit.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_FACTORYTABLEINIT_H -#define ICE_FACTORYTABLEINIT_H +#pragma once #include <Ice/FactoryTable.h> @@ -28,5 +27,3 @@ static FactoryTableInit factoryTableInitializer; // Dummy variable to force i extern ICE_API FactoryTable* factoryTable; } - -#endif diff --git a/cpp/include/Ice/Functional.h b/cpp/include/Ice/Functional.h index 6349a1d371a..28926302e9b 100644 --- a/cpp/include/Ice/Functional.h +++ b/cpp/include/Ice/Functional.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_FUNCTIONAL_H -#define ICE_FUNCTIONAL_H +#pragma once #include <IceUtil/Functional.h> #include <Ice/Handle.h> @@ -134,5 +133,3 @@ secondConstVoidMemFun1(void (T::*p)(A) const) } } - -#endif diff --git a/cpp/include/Ice/GCCountMap.h b/cpp/include/Ice/GCCountMap.h index fded894b317..a27f9465c1a 100644 --- a/cpp/include/Ice/GCCountMap.h +++ b/cpp/include/Ice/GCCountMap.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GCCOUNTMAP_H -#define ICE_GCCOUNTMAP_H +#pragma once #include <map> @@ -20,5 +19,3 @@ class GCShared; typedef ::std::map<GCShared*, int> GCCountMap; } - -#endif diff --git a/cpp/include/Ice/GCShared.h b/cpp/include/Ice/GCShared.h index e83332c1649..3edcf98ee33 100644 --- a/cpp/include/Ice/GCShared.h +++ b/cpp/include/Ice/GCShared.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GC_SHARED_H -#define ICE_GC_SHARED_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/Config.h> @@ -49,5 +48,3 @@ protected: }; } - -#endif diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index e38a02ffb61..1d1703d36c7 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_HANDLE_H -#define ICE_HANDLE_H +#pragma once #include <IceUtil/Handle.h> #include <Ice/Config.h> @@ -36,17 +35,6 @@ template<typename T> class Handle : public ::IceUtil::HandleBase<T> { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Ptr to 0. - // - Handle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif Handle(T* p = 0) { @@ -183,21 +171,13 @@ public: template<class Y> static Handle dynamicCast(const ::IceUtil::HandleBase<Y>& r) { -#ifdef __BCPLUSPLUS__ - return Handle<T>(dynamic_cast<T*>(r._ptr)); -#else return Handle(dynamic_cast<T*>(r._ptr)); -#endif } template<class Y> static Handle dynamicCast(Y* p) { -#ifdef __BCPLUSPLUS__ - return Handle<T>(dynamic_cast<T*>(p)); -#else return Handle(dynamic_cast<T*>(p)); -#endif } void __clearHandleUnsafe() @@ -207,5 +187,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/Ice.h b/cpp/include/Ice/Ice.h index 27cdf17dcd6..6fc7f119645 100644 --- a/cpp/include/Ice/Ice.h +++ b/cpp/include/Ice/Ice.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ICE_H -#define ICE_ICE_H +#pragma once #include <IceUtil/Config.h> #include <Ice/Initialize.h> @@ -44,5 +43,3 @@ #ifndef _WIN32 #include <Ice/IconvStringConverter.h> #endif - -#endif diff --git a/cpp/include/Ice/IconvStringConverter.h b/cpp/include/Ice/IconvStringConverter.h index 2ab569ebbb4..5df0dacf802 100644 --- a/cpp/include/Ice/IconvStringConverter.h +++ b/cpp/include/Ice/IconvStringConverter.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ICONV_STRING_CONVERTER -#define ICE_ICONV_STRING_CONVERTER +#pragma once #include <Ice/StringConverter.h> #include <Ice/UndefSysMacros.h> @@ -368,5 +367,3 @@ IconvStringConverter<charT>::fromUTF8(const Ice::Byte* sourceStart, const Ice::B } } - -#endif diff --git a/cpp/include/Ice/Incoming.h b/cpp/include/Ice/Incoming.h index 6c1530bc8a4..635ed3709b4 100644 --- a/cpp/include/Ice/Incoming.h +++ b/cpp/include/Ice/Incoming.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INCOMING_H -#define ICE_INCOMING_H +#pragma once #include <Ice/InstanceF.h> #include <Ice/ConnectionIF.h> @@ -121,5 +120,3 @@ private: }; } - -#endif diff --git a/cpp/include/Ice/IncomingAsync.h b/cpp/include/Ice/IncomingAsync.h index b8ec39eb61c..7c29f4ff243 100644 --- a/cpp/include/Ice/IncomingAsync.h +++ b/cpp/include/Ice/IncomingAsync.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INCOMING_ASYNC_H -#define ICE_INCOMING_ASYNC_H +#pragma once #include <Ice/IncomingAsyncF.h> #include <Ice/Incoming.h> @@ -104,5 +103,3 @@ public: } } - -#endif diff --git a/cpp/include/Ice/IncomingAsyncF.h b/cpp/include/Ice/IncomingAsyncF.h index 5b0d0790745..7e7087f1dc3 100644 --- a/cpp/include/Ice/IncomingAsyncF.h +++ b/cpp/include/Ice/IncomingAsyncF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INCOMING_ASYNC_F_H -#define ICE_INCOMING_ASYNC_F_H +#pragma once #include <IceUtil/Shared.h> @@ -31,5 +30,3 @@ ICE_API IceUtil::Shared* upCast(::Ice::AMD_Object_ice_invoke*); typedef IceInternal::Handle<AMD_Object_ice_invoke> AMD_Object_ice_invokePtr; } - -#endif diff --git a/cpp/include/Ice/Initialize.h b/cpp/include/Ice/Initialize.h index 57a0fc55a56..0979547366d 100644 --- a/cpp/include/Ice/Initialize.h +++ b/cpp/include/Ice/Initialize.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INITIALIZE_H -#define ICE_INITIALIZE_H +#pragma once #include <Ice/CommunicatorF.h> #include <Ice/PropertiesF.h> @@ -121,5 +120,3 @@ namespace IceInternal ICE_API InstancePtr getInstance(const ::Ice::CommunicatorPtr&); } - -#endif diff --git a/cpp/include/Ice/InstanceF.h b/cpp/include/Ice/InstanceF.h index 9ce92354595..2e1dd7dedc1 100644 --- a/cpp/include/Ice/InstanceF.h +++ b/cpp/include/Ice/InstanceF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INSTANCE_F_H -#define ICE_INSTANCE_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(Instance*); typedef IceInternal::Handle<Instance> InstancePtr; } - -#endif diff --git a/cpp/include/Ice/LocalObject.h b/cpp/include/Ice/LocalObject.h index 657136182b2..39d9cb2aca1 100644 --- a/cpp/include/Ice/LocalObject.h +++ b/cpp/include/Ice/LocalObject.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOCAL_OBJECT_H -#define ICE_LOCAL_OBJECT_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/LocalObjectF.h> @@ -38,5 +37,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/LocalObjectF.h b/cpp/include/Ice/LocalObjectF.h index c8591c24352..4c87038d5a6 100644 --- a/cpp/include/Ice/LocalObjectF.h +++ b/cpp/include/Ice/LocalObjectF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOCAL_OBJECT_F_H -#define ICE_LOCAL_OBJECT_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(::Ice::LocalObject*); typedef IceInternal::Handle< LocalObject > LocalObjectPtr; } - -#endif diff --git a/cpp/include/Ice/LoggerUtil.h b/cpp/include/Ice/LoggerUtil.h index fec7e79f75b..ab056984b9b 100644 --- a/cpp/include/Ice/LoggerUtil.h +++ b/cpp/include/Ice/LoggerUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOGGER_UTIL_H -#define ICE_LOGGER_UTIL_H +#pragma once #include <Ice/LoggerF.h> #include <Ice/CommunicatorF.h> @@ -119,5 +118,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/Object.h b/cpp/include/Ice/Object.h index 831842c6ad8..d91d1acc5bb 100644 --- a/cpp/include/Ice/Object.h +++ b/cpp/include/Ice/Object.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OBJECT_H -#define ICE_OBJECT_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -173,5 +172,3 @@ ICE_API void ice_writeObject(const OutputStreamPtr&, const ObjectPtr&); ICE_API void ice_readObject(const InputStreamPtr&, ObjectPtr&); } - -#endif diff --git a/cpp/include/Ice/ObjectAdapterFactoryF.h b/cpp/include/Ice/ObjectAdapterFactoryF.h index 7e2a937cadd..145ec884c15 100644 --- a/cpp/include/Ice/ObjectAdapterFactoryF.h +++ b/cpp/include/Ice/ObjectAdapterFactoryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OBJECT_ADAPTER_FACTORY_F_H -#define ICE_OBJECT_ADAPTER_FACTORY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(ObjectAdapterFactory*); typedef IceInternal::Handle<ObjectAdapterFactory> ObjectAdapterFactoryPtr; } - -#endif diff --git a/cpp/include/Ice/ObjectF.h b/cpp/include/Ice/ObjectF.h index 5946be23dd0..c4953df3d44 100644 --- a/cpp/include/Ice/ObjectF.h +++ b/cpp/include/Ice/ObjectF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OBJECT_F_H -#define ICE_OBJECT_F_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/Handle.h> @@ -22,5 +21,3 @@ typedef IceInternal::Handle< Object > ObjectPtr; ICE_API void __patch(ObjectPtr&, ObjectPtr&); } - -#endif diff --git a/cpp/include/Ice/Outgoing.h b/cpp/include/Ice/Outgoing.h index ca1d25161fd..58e0dc28d66 100644 --- a/cpp/include/Ice/Outgoing.h +++ b/cpp/include/Ice/Outgoing.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OUTGOING_H -#define ICE_OUTGOING_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Monitor.h> @@ -197,5 +196,3 @@ private: }; } - -#endif diff --git a/cpp/include/Ice/OutgoingAsync.h b/cpp/include/Ice/OutgoingAsync.h index b391c456a35..ab8e59d8ea1 100644 --- a/cpp/include/Ice/OutgoingAsync.h +++ b/cpp/include/Ice/OutgoingAsync.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OUTGOING_ASYNC_H -#define ICE_OUTGOING_ASYNC_H +#pragma once #include <IceUtil/Monitor.h> #include <IceUtil/Mutex.h> @@ -463,5 +462,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/OutgoingAsyncF.h b/cpp/include/Ice/OutgoingAsyncF.h index 5b6f4daa1e4..1feb42cead2 100644 --- a/cpp/include/Ice/OutgoingAsyncF.h +++ b/cpp/include/Ice/OutgoingAsyncF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OUTGOING_ASYNC_F_H -#define ICE_OUTGOING_ASYNC_F_H +#pragma once #include <IceUtil/Shared.h> @@ -51,5 +50,3 @@ ICE_API IceUtil::Shared* upCast(CommunicatorBatchOutgoingAsync*); typedef IceInternal::Handle<CommunicatorBatchOutgoingAsync> CommunicatorBatchOutgoingAsyncPtr; } - -#endif diff --git a/cpp/include/Ice/Protocol.h b/cpp/include/Ice/Protocol.h index cf14d1b85a8..0a83c4ddbac 100644 --- a/cpp/include/Ice/Protocol.h +++ b/cpp/include/Ice/Protocol.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROTOCOL_H -#define ICE_PROTOCOL_H +#pragma once #include <Ice/Config.h> #include <Ice/Version.h> @@ -188,5 +187,3 @@ checkSupportedEncoding(const Ice::EncodingVersion& v) } } - -#endif diff --git a/cpp/include/Ice/ProtocolPluginFacade.h b/cpp/include/Ice/ProtocolPluginFacade.h index 7290cfdf115..c4283e3b03a 100644 --- a/cpp/include/Ice/ProtocolPluginFacade.h +++ b/cpp/include/Ice/ProtocolPluginFacade.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROTOCOL_PLUGIN_FACADE_H -#define ICE_PROTOCOL_PLUGIN_FACADE_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Shared.h> @@ -89,5 +88,3 @@ private: }; } - -#endif diff --git a/cpp/include/Ice/ProtocolPluginFacadeF.h b/cpp/include/Ice/ProtocolPluginFacadeF.h index 9e8f0d1c7c1..02e2e8ea999 100644 --- a/cpp/include/Ice/ProtocolPluginFacadeF.h +++ b/cpp/include/Ice/ProtocolPluginFacadeF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROTOCOL_PLUGIN_FACADE_F_H -#define ICE_PROTOCOL_PLUGIN_FACADE_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(ProtocolPluginFacade*); typedef Handle<ProtocolPluginFacade> ProtocolPluginFacadePtr; } - -#endif diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h index 2293194980b..ca179a1d89d 100644 --- a/cpp/include/Ice/Proxy.h +++ b/cpp/include/Ice/Proxy.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_H -#define ICE_PROXY_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -2201,5 +2200,3 @@ newCallback_Object_ice_flushBatchRequests(T* instance, } } - -#endif diff --git a/cpp/include/Ice/ProxyF.h b/cpp/include/Ice/ProxyF.h index 82bf18c497e..108cdee7447 100644 --- a/cpp/include/Ice/ProxyF.h +++ b/cpp/include/Ice/ProxyF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_F_H -#define ICE_PROXY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -73,6 +72,3 @@ namespace Ice typedef IceInternal::ProxyHandle< ::IceProxy::Ice::Object> ObjectPrx; } - - -#endif diff --git a/cpp/include/Ice/ProxyFactoryF.h b/cpp/include/Ice/ProxyFactoryF.h index a450f9e4c99..c915ffaa6ee 100644 --- a/cpp/include/Ice/ProxyFactoryF.h +++ b/cpp/include/Ice/ProxyFactoryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_FACTORY_F_H -#define ICE_PROXY_FACTORY_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(ProxyFactory*); typedef IceInternal::Handle<ProxyFactory> ProxyFactoryPtr; } - -#endif diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index 2d245f44674..b23958d26d5 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_HANDLE_H -#define ICE_PROXY_HANDLE_H +#pragma once #include <IceUtil/Handle.h> #include <Ice/Config.h> @@ -114,17 +113,6 @@ template<typename T> class ProxyHandle : public ::IceUtil::HandleBase<T> { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Prx to 0. - // - ProxyHandle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif ProxyHandle(T* p = 0) { @@ -332,5 +320,3 @@ std::ostream& operator<<(std::ostream& os, ::IceInternal::ProxyHandle<Y> p) { return os << (p ? p->ice_toString() : std::string("")); } - -#endif diff --git a/cpp/include/Ice/ReferenceF.h b/cpp/include/Ice/ReferenceF.h index 80f4d87d08d..99af2a09af2 100644 --- a/cpp/include/Ice/ReferenceF.h +++ b/cpp/include/Ice/ReferenceF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REFERENCE_F_H -#define ICE_REFERENCE_F_H +#pragma once #include <IceUtil/Shared.h> @@ -30,5 +29,3 @@ ICE_API IceUtil::Shared* upCast(RoutableReference*); typedef IceInternal::Handle<RoutableReference> RoutableReferencePtr; } - -#endif diff --git a/cpp/include/Ice/RequestHandlerF.h b/cpp/include/Ice/RequestHandlerF.h index cc5df85be4a..d637da51f10 100644 --- a/cpp/include/Ice/RequestHandlerF.h +++ b/cpp/include/Ice/RequestHandlerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REQUEST_HANDLER_F_H -#define ICE_REQUEST_HANDLER_F_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/Handle.h> @@ -21,5 +20,3 @@ ICE_API IceUtil::Shared* upCast(RequestHandler*); typedef IceInternal::Handle<RequestHandler> RequestHandlerPtr; } - -#endif diff --git a/cpp/include/Ice/ServantManagerF.h b/cpp/include/Ice/ServantManagerF.h index 4ae03595ad5..395349506bd 100644 --- a/cpp/include/Ice/ServantManagerF.h +++ b/cpp/include/Ice/ServantManagerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVANT_MANAGER_F_H -#define ICE_SERVANT_MANAGER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(ServantManager*); typedef Handle<ServantManager> ServantManagerPtr; } - -#endif diff --git a/cpp/include/Ice/Service.h b/cpp/include/Ice/Service.h index 77108a14db5..8b24f58e192 100644 --- a/cpp/include/Ice/Service.h +++ b/cpp/include/Ice/Service.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVICE_H -#define ICE_SERVICE_H +#pragma once #include <Ice/Ice.h> @@ -262,5 +261,3 @@ public: }; } // End of namespace Ice - -#endif diff --git a/cpp/include/Ice/SliceChecksums.h b/cpp/include/Ice/SliceChecksums.h index cfbdc7c997f..8fec4b60c86 100644 --- a/cpp/include/Ice/SliceChecksums.h +++ b/cpp/include/Ice/SliceChecksums.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SLICE_CHECKSUM_H -#define ICE_SLICE_CHECKSUM_H +#pragma once #include <Ice/SliceChecksumDict.h> @@ -30,5 +29,3 @@ public: }; } - -#endif diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index 4244be03899..b4b75516213 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STREAM_H -#define ICE_STREAM_H +#pragma once #include <Ice/StreamF.h> #include <Ice/CommunicatorF.h> @@ -98,18 +97,6 @@ public: virtual void sliceObjects(bool) = 0; // - // COMPILERFIX: BCC2010 doesn't allow use of full specialization over - // partial specialization. - // -#ifdef __BCPLUSPLUS__ - void - read(::std::_Vb_reference<unsigned int, int> v) - { - v = readBool(); - } -#endif - - // // Sequences of bool are handled specifically because C++ // optimizations for vector<bool> prevent us from reading vector // of bools the same way as other sequences. @@ -434,5 +421,3 @@ protected: }; } - -#endif diff --git a/cpp/include/Ice/StreamF.h b/cpp/include/Ice/StreamF.h index 9fec3ce1d71..92ad61869cf 100644 --- a/cpp/include/Ice/StreamF.h +++ b/cpp/include/Ice/StreamF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STREAM_F_H -#define ICE_STREAM_F_H +#pragma once #include <IceUtil/Shared.h> @@ -26,5 +25,3 @@ ICE_API IceUtil::Shared* upCast(::Ice::OutputStream*); typedef IceInternal::Handle< OutputStream > OutputStreamPtr; } - -#endif diff --git a/cpp/include/Ice/StringConverter.h b/cpp/include/Ice/StringConverter.h index 28ee9bb3b9b..7452b90c845 100644 --- a/cpp/include/Ice/StringConverter.h +++ b/cpp/include/Ice/StringConverter.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STRING_CONVERTER_H -#define ICE_STRING_CONVERTER_H +#pragma once #include <Ice/Config.h> #include <Ice/CommunicatorF.h> @@ -157,5 +156,3 @@ ICE_API std::string UTF8ToNative(const Ice::CommunicatorPtr&, const std::string&); } - -#endif diff --git a/cpp/include/Ice/UndefSysMacros.h b/cpp/include/Ice/UndefSysMacros.h index d412fd1b26d..32ccd926258 100644 --- a/cpp/include/Ice/UndefSysMacros.h +++ b/cpp/include/Ice/UndefSysMacros.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UNDEF_SYS_MACROS_H -#define ICE_UNDEF_SYS_MACROS_H +#pragma once // // This header includes macros that can end up being dragged into @@ -38,5 +37,3 @@ #ifdef max #undef max #endif - -#endif diff --git a/cpp/include/Ice/UserExceptionFactory.h b/cpp/include/Ice/UserExceptionFactory.h index fd0e97f1cae..2fa176d3d68 100644 --- a/cpp/include/Ice/UserExceptionFactory.h +++ b/cpp/include/Ice/UserExceptionFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_USER_EXCEPTION_FACTORY_H -#define ICE_USER_EXCEPTION_FACTORY_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -28,5 +27,3 @@ public: typedef ::IceUtil::Handle<UserExceptionFactory> UserExceptionFactoryPtr; }; - -#endif diff --git a/cpp/include/IceGrid/IceGrid.h b/cpp/include/IceGrid/IceGrid.h index 34e1ed0d854..e2f87bf9d43 100644 --- a/cpp/include/IceGrid/IceGrid.h +++ b/cpp/include/IceGrid/IceGrid.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_H -#define ICEGRID_H +#pragma once #include <IceGrid/Admin.h> #include <IceGrid/Descriptor.h> @@ -20,5 +19,3 @@ #include <IceGrid/Registry.h> #include <IceGrid/Session.h> #include <IceGrid/UserAccountMapper.h> - -#endif diff --git a/cpp/include/IcePatch2/ClientUtil.h b/cpp/include/IcePatch2/ClientUtil.h index 917abc28f2e..4e110f301d1 100644 --- a/cpp/include/IcePatch2/ClientUtil.h +++ b/cpp/include/IcePatch2/ClientUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PATCH2_CLIENT_UTIL_H -#define ICE_PATCH2_CLIENT_UTIL_H +#pragma once #include <Ice/Ice.h> #include <IceUtil/Thread.h> @@ -161,5 +160,3 @@ private: typedef IceUtil::Handle<Patcher> PatcherPtr; } - -#endif diff --git a/cpp/include/IcePatch2/Util.h b/cpp/include/IcePatch2/Util.h index 8b92ba88afe..3813d675bc1 100644 --- a/cpp/include/IcePatch2/Util.h +++ b/cpp/include/IcePatch2/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PATCH2_UTIL_H -#define ICE_PATCH2_UTIL_H +#pragma once #include <Ice/Ice.h> #include <IcePatch2/FileInfo.h> @@ -188,5 +187,3 @@ struct FileTree0 ICE_PATCH2_API void getFileTree0(const FileInfoSeq&, FileTree0&); } - -#endif diff --git a/cpp/include/IceSSL/IceSSL.h b/cpp/include/IceSSL/IceSSL.h index 8ffa97c6618..450e3c2b34e 100644 --- a/cpp/include/IceSSL/IceSSL.h +++ b/cpp/include/IceSSL/IceSSL.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_ICE_SSL_H -#define ICE_SSL_ICE_SSL_H +#pragma once #include <IceUtil/Config.h> #ifndef ICE_OS_WINRT @@ -16,5 +15,3 @@ #endif #include <IceSSL/EndpointInfo.h> #include <IceSSL/ConnectionInfo.h> - -#endif diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index b9cf292a41b..ff67ba55a43 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_PLUGIN_H -#define ICE_SSL_PLUGIN_H +#pragma once #include <IceUtil/Time.h> #include <Ice/Plugin.h> @@ -454,5 +453,3 @@ public: typedef IceUtil::Handle<Plugin> PluginPtr; } - -#endif diff --git a/cpp/include/IceUtil/AbstractMutex.h b/cpp/include/IceUtil/AbstractMutex.h index 13fd6855234..c0805160a1e 100644 --- a/cpp/include/IceUtil/AbstractMutex.h +++ b/cpp/include/IceUtil/AbstractMutex.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_ABSTRACT_MUTEX_H -#define ICE_UTIL_ABSTRACT_MUTEX_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Lock.h> @@ -36,10 +35,8 @@ class AbstractMutexI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexI> Lock; typedef TryLockT<AbstractMutexI> TryLock; -#endif virtual void lock() const { @@ -65,10 +62,8 @@ class AbstractMutexReadI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexReadI> Lock; typedef TryLockT<AbstractMutexReadI> TryLock; -#endif virtual void lock() const { @@ -94,10 +89,8 @@ class AbstractMutexWriteI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexWriteI> Lock; typedef TryLockT<AbstractMutexWriteI> TryLock; -#endif virtual void lock() const { @@ -120,5 +113,3 @@ public: } - -#endif diff --git a/cpp/include/IceUtil/ArgVector.h b/cpp/include/IceUtil/ArgVector.h index 813f7c873d0..0cf29c4de9e 100644 --- a/cpp/include/IceUtil/ArgVector.h +++ b/cpp/include/IceUtil/ArgVector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_ARGVECTOR_H -#define ICE_UTIL_ARGVECTOR_H +#pragma once #include <IceUtil/Config.h> #include <vector> @@ -37,5 +36,3 @@ private: }; } - -#endif diff --git a/cpp/include/IceUtil/Cache.h b/cpp/include/IceUtil/Cache.h index e11830ead39..31d6e7cc460 100644 --- a/cpp/include/IceUtil/Cache.h +++ b/cpp/include/IceUtil/Cache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_CACHE_H -#define ICE_UTIL_CACHE_H +#pragma once #include <IceUtil/Handle.h> #include <IceUtil/Mutex.h> @@ -175,7 +174,7 @@ Cache<Key, Value>::pin(const Key& key, const Handle<Value>& obj) std::pair<typename CacheMap::iterator, bool> ir = #endif -#if defined(_MSC_VER) +#ifdef _MSC_VER _map.insert(CacheMap::value_type(key, CacheValue(obj))); #else _map.insert(typename CacheMap::value_type(key, CacheValue(obj))); @@ -229,7 +228,7 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj) std::pair<typename CacheMap::iterator, bool> ir = #endif -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) +#if defined(_MSC_VER) _map.insert(CacheMap::value_type(key, CacheValue(0))); #else _map.insert(typename CacheMap::value_type(key, CacheValue(0))); @@ -368,5 +367,3 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj) } } - -#endif diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h index 901b779ebc1..ff4aa2a4f4d 100644 --- a/cpp/include/IceUtil/Cond.h +++ b/cpp/include/IceUtil/Cond.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_COND_H -#define ICE_UTIL_COND_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Time.h> @@ -268,5 +267,3 @@ Cond::timedWaitImpl(const M& mutex, const Time& timeout) const #endif } // End namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index 643408d5c6c..d6e89cdf7fe 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_CONFIG_H -#define ICE_UTIL_CONFIG_H +#pragma once // // Endianness @@ -66,7 +65,7 @@ // // TODO: more macros to support IBM Visual Age _Export syntax as well. // -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \ +#if (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \ (defined(__HP_aCC) && defined(__HP_WINDLL)) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) # define ICE_DECLSPEC_IMPORT __declspec(dllimport) @@ -103,7 +102,7 @@ // TODO: figure out why IceUtil does not compile with _SLTP_DEBUG using // the Intel compiler. // -#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) && !defined(__BCPLUSPLUS__) +#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) # define _STLP_DEBUG #endif @@ -199,7 +198,7 @@ private: // // Int64 typedef // -#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) +#ifdef _MSC_VER // // On Windows, long is always 32-bit // @@ -215,7 +214,7 @@ typedef long long Int64; // // ICE_INT64: macro for Int64 literal values // -#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) +#if defined(_MSC_VER) # define ICE_INT64(n) n##i64 #elif defined(ICE_64) # define ICE_INT64(n) n##L @@ -229,25 +228,3 @@ typedef long long Int64; #define ICE_STRING_VERSION "3.4.2" // "A.B.C", with A=major, B=minor, C=patch #define ICE_INT_VERSION 30402 // AABBCC, with AA=major, BB=minor, CC=patch -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) -// -// Dummy class used in work around for bug in C++Builder 2009 -// http://qc.embarcadero/wc/qcmain.aspx?d=71611 -// -namespace IceUtil -{ - -class DummyBCC -{ -public: - - ~DummyBCC() - { - } -}; - -} -#endif - -#endif - diff --git a/cpp/include/IceUtil/CountDownLatch.h b/cpp/include/IceUtil/CountDownLatch.h index ef0d774abd4..bb6305224ef 100644 --- a/cpp/include/IceUtil/CountDownLatch.h +++ b/cpp/include/IceUtil/CountDownLatch.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_COUNT_DOWN_LATCH_H -#define ICE_UTIL_COUNT_DOWN_LATCH_H +#pragma once #include <IceUtil/Config.h> @@ -46,5 +45,3 @@ private: }; } - -#endif diff --git a/cpp/include/IceUtil/CtrlCHandler.h b/cpp/include/IceUtil/CtrlCHandler.h index 5770bbaec79..6614b601c58 100644 --- a/cpp/include/IceUtil/CtrlCHandler.h +++ b/cpp/include/IceUtil/CtrlCHandler.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_CTRL_C_HANDLER_H -#define ICE_UTIL_CTRL_C_HANDLER_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Exception.h> @@ -67,4 +66,3 @@ public: } -#endif diff --git a/cpp/include/IceUtil/DisableWarnings.h b/cpp/include/IceUtil/DisableWarnings.h index a8041ef9b49..cf27472aa3c 100644 --- a/cpp/include/IceUtil/DisableWarnings.h +++ b/cpp/include/IceUtil/DisableWarnings.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_DISABLEWARNINGS_H -#define ICE_UTIL_DISABLEWARNINGS_H +#pragma once // // This header file disables various annoying compiler warnings that @@ -27,5 +26,3 @@ #if defined(_MSC_VER) && _MSC_VER >= 1300 # pragma warning( 4 : 4996 ) // C4996 'std::<function>' was declared deprecated #endif - -#endif diff --git a/cpp/include/IceUtil/Exception.h b/cpp/include/IceUtil/Exception.h index 03a6fa6d836..9f04171efd9 100644 --- a/cpp/include/IceUtil/Exception.h +++ b/cpp/include/IceUtil/Exception.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_EXCEPTION_H -#define ICE_UTIL_EXCEPTION_H +#pragma once #include <IceUtil/Config.h> @@ -135,5 +134,3 @@ private: }; } - -#endif diff --git a/cpp/include/IceUtil/FileUtil.h b/cpp/include/IceUtil/FileUtil.h index 351c597c7c9..054a8c9fef0 100644 --- a/cpp/include/IceUtil/FileUtil.h +++ b/cpp/include/IceUtil/FileUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_FILE_UTIL_H -#define ICE_FILE_UTIL_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Shared.h> @@ -39,7 +38,7 @@ ICE_UTIL_API bool directoryExists(const std::string&); #ifdef _WIN32 -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) typedef struct _stat structstat; #else typedef struct _stat64i32 structstat; @@ -160,4 +159,3 @@ private: }; } -#endif diff --git a/cpp/include/IceUtil/Functional.h b/cpp/include/IceUtil/Functional.h index 47281bfa476..6ddbd824461 100644 --- a/cpp/include/IceUtil/Functional.h +++ b/cpp/include/IceUtil/Functional.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_FUNCTIONAL_H -#define ICE_UTIL_FUNCTIONAL_H +#pragma once #include <IceUtil/Handle.h> #include <functional> @@ -448,5 +447,3 @@ voidbind2nd(const _Operation& __fn, const _Tp& __x) _STLP_END_NAMESPACE #endif - -#endif diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index 2eeb58c8830..8e75db3bae4 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_HANDLE_H -#define ICE_UTIL_HANDLE_H +#pragma once #include <IceUtil/Exception.h> #include <algorithm> @@ -147,17 +146,6 @@ template<typename T> class Handle : public HandleBase<T> { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Ptr to 0. - // - Handle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif Handle(T* p = 0) { @@ -262,24 +250,14 @@ public: template<class Y> static Handle dynamicCast(const HandleBase<Y>& r) { -#ifdef __BCPLUSPLUS__ - return Handle<T>(dynamic_cast<T*>(r._ptr)); -#else return Handle(dynamic_cast<T*>(r._ptr)); -#endif } template<class Y> static Handle dynamicCast(Y* p) { -#ifdef __BCPLUSPLUS__ - return Handle<T>(dynamic_cast<T*>(p)); -#else return Handle(dynamic_cast<T*>(p)); -#endif } }; } - -#endif diff --git a/cpp/include/IceUtil/IceUtil.h b/cpp/include/IceUtil/IceUtil.h index 783bcb6f945..87459b1d6f2 100644 --- a/cpp/include/IceUtil/IceUtil.h +++ b/cpp/include/IceUtil/IceUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_ICE_UTIL_H -#define ICE_UTIL_ICE_UTIL_H +#pragma once // // This file must include *all* other headers of IceUtil, except @@ -38,5 +37,3 @@ #include <IceUtil/Timer.h> #include <IceUtil/UUID.h> #include <IceUtil/Unicode.h> - -#endif diff --git a/cpp/include/IceUtil/InputUtil.h b/cpp/include/IceUtil/InputUtil.h index 4bbe0f08780..5428b4754d5 100644 --- a/cpp/include/IceUtil/InputUtil.h +++ b/cpp/include/IceUtil/InputUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_INPUT_UTIL_H -#define ICE_UTIL_INPUT_UTIL_H +#pragma once #include <IceUtil/Config.h> #include <string> @@ -43,5 +42,3 @@ ICE_UTIL_API IceUtil::Int64 strToInt64(const char*, char**, int); ICE_UTIL_API bool stringToInt64(const std::string&, IceUtil::Int64&); } - -#endif diff --git a/cpp/include/IceUtil/Iterator.h b/cpp/include/IceUtil/Iterator.h index c3cc6222a35..e64446121b8 100644 --- a/cpp/include/IceUtil/Iterator.h +++ b/cpp/include/IceUtil/Iterator.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_ITERATOR_H -#define ICE_UTIL_ITERATOR_H +#pragma once #include <iterator> @@ -33,4 +32,3 @@ distance(ForwardIterator first, ForwardIterator last) } } -#endif diff --git a/cpp/include/IceUtil/Lock.h b/cpp/include/IceUtil/Lock.h index cf5ba793e0b..573ee546653 100644 --- a/cpp/include/IceUtil/Lock.h +++ b/cpp/include/IceUtil/Lock.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_LOCK_H -#define ICE_UTIL_LOCK_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/ThreadException.h> @@ -131,5 +130,3 @@ public: }; } // End namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/Monitor.h b/cpp/include/IceUtil/Monitor.h index 48733926cce..2b3404aedf1 100644 --- a/cpp/include/IceUtil/Monitor.h +++ b/cpp/include/IceUtil/Monitor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_MONITOR_H -#define ICE_UTIL_MONITOR_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Lock.h> @@ -245,5 +244,3 @@ IceUtil::Monitor<T>::notifyImpl(int nnotify) const } } } - -#endif diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h index 68c810cf475..3914e325dc3 100644 --- a/cpp/include/IceUtil/Mutex.h +++ b/cpp/include/IceUtil/Mutex.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_MUTEX_H -#define ICE_UTIL_MUTEX_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Lock.h> @@ -325,5 +324,3 @@ Mutex::willUnlock() const } } // End namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/MutexProtocol.h b/cpp/include/IceUtil/MutexProtocol.h index a74589f468a..61a956a4b00 100644 --- a/cpp/include/IceUtil/MutexProtocol.h +++ b/cpp/include/IceUtil/MutexProtocol.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_MUTEX_PROTOCOL_H -#define ICE_UTIL_MUTEX_PROTOCOL_H +#pragma once #include <IceUtil/Config.h> @@ -24,5 +23,3 @@ enum MutexProtocol ICE_UTIL_API MutexProtocol getDefaultMutexProtocol(); } // End namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/MutexPtrLock.h b/cpp/include/IceUtil/MutexPtrLock.h index 3574a95a442..c2e4a389c5c 100644 --- a/cpp/include/IceUtil/MutexPtrLock.h +++ b/cpp/include/IceUtil/MutexPtrLock.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_MUTEX_PTR_LOCK_H -#define ICE_UTIL_MUTEX_PTR_LOCK_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/ThreadException.h> @@ -79,5 +78,3 @@ private: }; } // End namespace IceUtilInternal - -#endif diff --git a/cpp/include/IceUtil/MutexPtrTryLock.h b/cpp/include/IceUtil/MutexPtrTryLock.h index 7eb64d242c8..c4b81d47ce7 100644 --- a/cpp/include/IceUtil/MutexPtrTryLock.h +++ b/cpp/include/IceUtil/MutexPtrTryLock.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_MUTEX_PTR_TRY_LOCK_H -#define ICE_UTIL_MUTEX_PTR_TRY_LOCK_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Mutex.h> @@ -78,5 +77,3 @@ private: }; } // End namespace IceUtilInternal - -#endif diff --git a/cpp/include/IceUtil/Options.h b/cpp/include/IceUtil/Options.h index d0edaee22bb..364df237821 100644 --- a/cpp/include/IceUtil/Options.h +++ b/cpp/include/IceUtil/Options.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_OPTIONS_H -#define ICE_UTIL_OPTIONS_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/RecMutex.h> @@ -137,5 +136,3 @@ private: }; } - -#endif diff --git a/cpp/include/IceUtil/OutputUtil.h b/cpp/include/IceUtil/OutputUtil.h index d282369c69c..034a4214543 100644 --- a/cpp/include/IceUtil/OutputUtil.h +++ b/cpp/include/IceUtil/OutputUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_OUTPUT_UTIL_H -#define ICE_UTIL_OUTPUT_UTIL_H +#pragma once #include <IceUtil/Config.h> #include <fstream> @@ -378,5 +377,3 @@ operator<<(XMLOutput& o, const EndEscapes&) ICE_UTIL_API XMLOutput& operator<<(XMLOutput&, std::ios_base& (*)(std::ios_base&)); } - -#endif diff --git a/cpp/include/IceUtil/Random.h b/cpp/include/IceUtil/Random.h index eb9b2ca0051..9bdd9caad53 100644 --- a/cpp/include/IceUtil/Random.h +++ b/cpp/include/IceUtil/Random.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_RANDOM_H -#define ICE_UTIL_RANDOM_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Exception.h> @@ -20,5 +19,3 @@ ICE_UTIL_API void generateRandom(char*, int); ICE_UTIL_API unsigned int random(int = 0); } - -#endif diff --git a/cpp/include/IceUtil/ScopedArray.h b/cpp/include/IceUtil/ScopedArray.h index 8e1d0d0ddf0..15571b22b0e 100644 --- a/cpp/include/IceUtil/ScopedArray.h +++ b/cpp/include/IceUtil/ScopedArray.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_SCOPED_ARRAY_H -#define ICE_UTIL_SCOPED_ARRAY_H +#pragma once #include <IceUtil/Config.h> @@ -86,5 +85,3 @@ private: }; } // End of namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/Shared.h b/cpp/include/IceUtil/Shared.h index 2412ec1210c..5b3e1b610c4 100644 --- a/cpp/include/IceUtil/Shared.h +++ b/cpp/include/IceUtil/Shared.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_SHARED_H -#define ICE_UTIL_SHARED_H +#pragma once #include <IceUtil/Config.h> @@ -144,5 +143,3 @@ protected: }; } - -#endif diff --git a/cpp/include/IceUtil/StringUtil.h b/cpp/include/IceUtil/StringUtil.h index f2786340b4c..3439d040e36 100644 --- a/cpp/include/IceUtil/StringUtil.h +++ b/cpp/include/IceUtil/StringUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STRING_UTIL_H -#define ICE_STRING_UTIL_H +#pragma once #include <IceUtil/Config.h> #include <vector> @@ -87,5 +86,3 @@ ICE_UTIL_API bool isDigit(char); ICE_UTIL_API std::string removeWhitespace(const std::string&); } - -#endif diff --git a/cpp/include/IceUtil/Thread.h b/cpp/include/IceUtil/Thread.h index 6658ef8740f..e75adf60476 100644 --- a/cpp/include/IceUtil/Thread.h +++ b/cpp/include/IceUtil/Thread.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_THREAD_H -#define ICE_UTIL_THREAD_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -161,6 +160,3 @@ private: typedef Handle<Thread> ThreadPtr; } - -#endif - diff --git a/cpp/include/IceUtil/ThreadException.h b/cpp/include/IceUtil/ThreadException.h index c475b499117..d0444c20573 100644 --- a/cpp/include/IceUtil/ThreadException.h +++ b/cpp/include/IceUtil/ThreadException.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_THREAD_EXCEPTION_H -#define ICE_UTIL_THREAD_EXCEPTION_H +#pragma once #include <IceUtil/Exception.h> #include <IceUtil/Time.h> @@ -103,6 +102,3 @@ private: }; } - -#endif - diff --git a/cpp/include/IceUtil/Time.h b/cpp/include/IceUtil/Time.h index d987ca3cd00..8dcd0699d4f 100644 --- a/cpp/include/IceUtil/Time.h +++ b/cpp/include/IceUtil/Time.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_TIME_H -#define ICE_UTIL_TIME_H +#pragma once #include <IceUtil/Config.h> @@ -205,5 +204,3 @@ private: ICE_UTIL_API std::ostream& operator<<(std::ostream&, const Time&); } // End namespace IceUtil - -#endif diff --git a/cpp/include/IceUtil/Timer.h b/cpp/include/IceUtil/Timer.h index 00087365b33..f6eed95058e 100644 --- a/cpp/include/IceUtil/Timer.h +++ b/cpp/include/IceUtil/Timer.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_TIMER_H -#define ICE_UTIL_TIMER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Thread.h> @@ -137,6 +136,3 @@ Timer::Token::operator<(const Timer::Token& r) const } } - -#endif - diff --git a/cpp/include/IceUtil/UUID.h b/cpp/include/IceUtil/UUID.h index 4cc1d85f87a..838b97d8e4e 100644 --- a/cpp/include/IceUtil/UUID.h +++ b/cpp/include/IceUtil/UUID.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_UUID_H -#define ICE_UTIL_UUID_H +#pragma once #include <IceUtil/Config.h> @@ -18,5 +17,3 @@ namespace IceUtil ICE_UTIL_API std::string generateUUID(); } - -#endif diff --git a/cpp/include/IceUtil/Unicode.h b/cpp/include/IceUtil/Unicode.h index d88d04f9583..6bd5232c065 100644 --- a/cpp/include/IceUtil/Unicode.h +++ b/cpp/include/IceUtil/Unicode.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_UNICODE_H -#define ICE_UTIL_UNICODE_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Exception.h> @@ -91,5 +90,3 @@ convertUTF8ToUTFWstring(const IceUtil::Byte*& sourceStart, const IceUtil::Byte* std::wstring& target, IceUtil::ConversionFlags flags); } - -#endif diff --git a/cpp/include/IceXML/Parser.h b/cpp/include/IceXML/Parser.h index 59c8c64fc35..e32993aa207 100644 --- a/cpp/include/IceXML/Parser.h +++ b/cpp/include/IceXML/Parser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_XML_PARSER_H -#define ICE_XML_PARSER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -153,5 +152,3 @@ public: }; } - -#endif diff --git a/cpp/include/Makefile b/cpp/include/Makefile index e0cc01b3c42..5de48e060d4 100644 --- a/cpp/include/Makefile +++ b/cpp/include/Makefile @@ -11,17 +11,22 @@ top_srcdir = .. include $(top_srcdir)/config/Make.rules -SUBDIRS = Freeze \ - Glacier2 \ - Ice \ - IceBox \ - IceGrid \ - IcePatch2 \ +SUBDIRS = Ice \ IceSSL \ - IceStorm \ IceUtil \ - IceXML \ Slice + +ifneq ($(MinGW), yes) +SUBDIRS := $(SUBDIRS) \ + Freeze \ + Glacier2 \ + IceBox \ + IceGrid \ + IcePatch2 \ + IceStorm \ + IceXML +endif + $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/include/Slice/CPlusPlusUtil.h b/cpp/include/Slice/CPlusPlusUtil.h index f8aeb5f19b3..9febb97eb1b 100644 --- a/cpp/include/Slice/CPlusPlusUtil.h +++ b/cpp/include/Slice/CPlusPlusUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef C_PLUS_PLUS_UTIL_H -#define C_PLUS_PLUS_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -61,5 +60,3 @@ SLICE_API bool inWstringModule(const SequencePtr&); SLICE_API std::string getDataMemberRef(const DataMemberPtr&); } - -#endif diff --git a/cpp/include/Slice/Checksum.h b/cpp/include/Slice/Checksum.h index 0a758f5c8a4..c874595512f 100644 --- a/cpp/include/Slice/Checksum.h +++ b/cpp/include/Slice/Checksum.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_CHECKSUM_H -#define SLICE_CHECKSUM_H +#pragma once #include <Slice/Parser.h> #include <map> @@ -22,5 +21,3 @@ typedef std::map<std::string, std::vector<unsigned char> > ChecksumMap; SLICE_API ChecksumMap createChecksums(const UnitPtr&); } - -#endif diff --git a/cpp/include/Slice/CsUtil.h b/cpp/include/Slice/CsUtil.h index 46dae821ad9..39b8ac9bbae 100644 --- a/cpp/include/Slice/CsUtil.h +++ b/cpp/include/Slice/CsUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef CS_UTIL_H -#define CS_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -80,5 +79,3 @@ private: }; } - -#endif diff --git a/cpp/include/Slice/DotNetNames.h b/cpp/include/Slice/DotNetNames.h index 88e74c378be..43bab7155c0 100644 --- a/cpp/include/Slice/DotNetNames.h +++ b/cpp/include/Slice/DotNetNames.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef DOTNETNAMES_H -#define DOTNETNAMES_H +#pragma once #include <string> @@ -30,5 +29,3 @@ std::string mangleName(const std::string&, int baseTypes = 0); } } - -#endif diff --git a/cpp/include/Slice/FileTracker.h b/cpp/include/Slice/FileTracker.h index e59ae79bf9c..3fb45799e8c 100644 --- a/cpp/include/Slice/FileTracker.h +++ b/cpp/include/Slice/FileTracker.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FILE_TRACKER_H -#define FILE_TRACKER_H +#pragma once #include <IceUtil/Shared.h> #include <Slice/Parser.h> @@ -67,5 +66,3 @@ private: }; } - -#endif diff --git a/cpp/include/Slice/JavaUtil.h b/cpp/include/Slice/JavaUtil.h index c8bb6a71f85..d7023490b78 100644 --- a/cpp/include/Slice/JavaUtil.h +++ b/cpp/include/Slice/JavaUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef JAVA_UTIL_H -#define JAVA_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -267,5 +266,3 @@ private: }; } - -#endif diff --git a/cpp/include/Slice/PHPUtil.h b/cpp/include/Slice/PHPUtil.h index 8e0322ffaee..200cdf57e86 100644 --- a/cpp/include/Slice/PHPUtil.h +++ b/cpp/include/Slice/PHPUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_PHP_UTIL_H -#define SLICE_PHP_UTIL_H +#pragma once #include <Slice/Parser.h> @@ -46,5 +45,3 @@ SLICE_API std::string escapeName(const std::string&); } } - -#endif diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index 261a106bb38..51fb288b318 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_PARSER_H -#define SLICE_PARSER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -31,7 +30,7 @@ namespace Slice { -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__MINGW32__) const IceUtil::Int64 Int32Max = 0x7fffffffi64; const IceUtil::Int64 Int32Min = -Int32Max - 1i64; @@ -1071,5 +1070,3 @@ private: extern SLICE_API Unit* unit; // The current parser for bison/flex } - -#endif diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index 969f4e09054..ee58e8f312c 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -7,16 +7,11 @@ // // ********************************************************************** -#ifndef PREPROCESSOR_H -#define PREPROCESSOR_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> #include <vector> -#include <cstdio> -#ifdef __BCPLUSPLUS__ -# include <stdio.h> -#endif #ifndef SLICE_API # ifdef SLICE_API_EXPORTS @@ -68,5 +63,3 @@ private: }; } - -#endif diff --git a/cpp/include/Slice/PythonUtil.h b/cpp/include/Slice/PythonUtil.h index 91501cb7f50..5201b7f1c49 100644 --- a/cpp/include/Slice/PythonUtil.h +++ b/cpp/include/Slice/PythonUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_PYTHON_UTIL_H -#define SLICE_PYTHON_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -58,5 +57,3 @@ SLICE_API void printHeader(IceUtilInternal::Output&); } } - -#endif diff --git a/cpp/include/Slice/RubyUtil.h b/cpp/include/Slice/RubyUtil.h index d8cd8ead8b8..acf93455fed 100644 --- a/cpp/include/Slice/RubyUtil.h +++ b/cpp/include/Slice/RubyUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_RUBY_UTIL_H -#define SLICE_RUBY_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -48,5 +47,3 @@ SLICE_API void printHeader(IceUtilInternal::Output&); } } - -#endif diff --git a/cpp/include/Slice/Util.h b/cpp/include/Slice/Util.h index 340f3eb6caa..c4267590cc2 100644 --- a/cpp/include/Slice/Util.h +++ b/cpp/include/Slice/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_UTIL_H -#define SLICE_UTIL_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -29,5 +28,3 @@ SLICE_API std::vector<std::string> filterMcppWarnings(const std::string&); SLICE_API void printGeneratedHeader(IceUtilInternal::Output& out, const std::string&, const std::string& commentStyle = "//"); } - -#endif diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.h b/cpp/src/Freeze/BackgroundSaveEvictorI.h index 805086a0eca..5d8132f9afc 100644 --- a/cpp/src/Freeze/BackgroundSaveEvictorI.h +++ b/cpp/src/Freeze/BackgroundSaveEvictorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_BACKGROUND_SAVE_EVICTOR_I_H -#define FREEZE_BACKGROUND_SAVE_EVICTOR_I_H +#pragma once #include <Freeze/EvictorI.h> #include <Freeze/BackgroundSaveEvictor.h> @@ -213,5 +212,3 @@ private: }; } - -#endif diff --git a/cpp/src/Freeze/ConnectionI.h b/cpp/src/Freeze/ConnectionI.h index 46acecec3ab..86cca9d0216 100644 --- a/cpp/src/Freeze/ConnectionI.h +++ b/cpp/src/Freeze/ConnectionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_CONNECTIONI_H -#define FREEZE_CONNECTIONI_H +#pragma once #include <Freeze/Connection.h> #include <Freeze/Initialize.h> @@ -168,5 +167,3 @@ ConnectionI::deadlockWarning() const } } - -#endif diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index 4e91705819c..5a1ca1f55af 100755 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_EVICTOR_I_H -#define FREEZE_EVICTOR_I_H +#pragma once #include <IceUtil/IceUtil.h> #include <Ice/Ice.h> @@ -220,7 +219,7 @@ protected: } ObjectStore<T>* store = new ObjectStore<T>(facet, facetType,_createDb, this, storeIndices, populateEmptyIndices); -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) _storeMap.insert(StoreMap::value_type(facet, store)); #else _storeMap.insert(typename StoreMap::value_type(facet, store)); @@ -235,7 +234,7 @@ protected: { facet = ""; } -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) std::pair<StoreMap::iterator, bool> ir = _storeMap.insert(StoreMap::value_type(facet, 0)); #elif (defined(_MSC_VER) && (_MSC_VER >= 1600)) @@ -281,7 +280,7 @@ protected: } os = new ObjectStore<T>(facet, facetType, true, this); -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) _storeMap.insert(StoreMap::value_type(facet, os)); #else _storeMap.insert(typename StoreMap::value_type(facet, os)); @@ -356,5 +355,3 @@ checkIdentity(const Ice::Identity& ident) } } - -#endif diff --git a/cpp/src/Freeze/EvictorIteratorI.h b/cpp/src/Freeze/EvictorIteratorI.h index fd075645f86..4c740782c32 100644 --- a/cpp/src/Freeze/EvictorIteratorI.h +++ b/cpp/src/Freeze/EvictorIteratorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_EVICTOR_ITERATOR_I_H -#define FREEZE_EVICTOR_ITERATOR_I_H +#pragma once #include <Ice/Ice.h> #include <Freeze/Freeze.h> @@ -49,5 +48,3 @@ private: }; } - -#endif diff --git a/cpp/src/Freeze/IndexI.h b/cpp/src/Freeze/IndexI.h index ea850a3be02..3fe2d6018e0 100644 --- a/cpp/src/Freeze/IndexI.h +++ b/cpp/src/Freeze/IndexI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_INDEX_I_H -#define FREEZE_INDEX_I_H +#pragma once #include <Ice/Ice.h> #include <Freeze/Index.h> @@ -49,5 +48,3 @@ private: }; } -#endif - diff --git a/cpp/src/Freeze/MapDb.h b/cpp/src/Freeze/MapDb.h index 5bc9a6f6373..c158b4de1d5 100644 --- a/cpp/src/Freeze/MapDb.h +++ b/cpp/src/Freeze/MapDb.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_MAP_DB_H -#define FREEZE_MAP_DB_H +#pragma once #include <IceUtil/Config.h> #include <db_cxx.h> @@ -120,4 +119,3 @@ MapDb::getKeyCompare() const } } -#endif diff --git a/cpp/src/Freeze/MapI.h b/cpp/src/Freeze/MapI.h index dc1e421d97a..89583728ce8 100644 --- a/cpp/src/Freeze/MapI.h +++ b/cpp/src/Freeze/MapI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_MAP_I_H -#define FREEZE_MAP_I_H +#pragma once #include <Freeze/Map.h> #include <Freeze/ConnectionI.h> @@ -187,5 +186,3 @@ IteratorHelperI::tx() const } } - -#endif diff --git a/cpp/src/Freeze/ObjectStore.h b/cpp/src/Freeze/ObjectStore.h index 579344e0c2c..a78c3e197d9 100644 --- a/cpp/src/Freeze/ObjectStore.h +++ b/cpp/src/Freeze/ObjectStore.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_OBJECT_STORE_H -#define FREEZE_OBJECT_STORE_H +#pragma once #include <Ice/Ice.h> #include <Ice/Identity.h> @@ -96,14 +95,7 @@ class ObjectStore : public ObjectStoreBase, public IceUtil::Cache<Ice::Identity, { } -#ifdef __BCPLUSPLUS__ - bool load(const Ice::Identity& ident, const TransactionIPtr& trans, ObjectRecord& rec) - { - return ObjectStoreBase::load(ident, trans, rec); - } -#else using ObjectStoreBase::load; -#endif typedef IceUtil::Cache<Ice::Identity, T> Cache; @@ -171,6 +163,3 @@ ObjectStoreBase::sampleServant() const } } - -#endif - diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index 5b86bcc4a36..d17e61faf36 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -89,10 +89,8 @@ dbErrCallback(const char* prefix, char* msg) out << "DbEnv \"" << env->getEnvName() << "\": " << msg; } -#ifndef __BCPLUSPLUS__ // COMPILERFIX namespace { -#endif Mutex* mapMutex = 0; Mutex* refCountMutex = 0; @@ -119,9 +117,7 @@ public: Init init; -#ifndef __BCPLUSPLUS__ // COMPILERFIX } -#endif typedef map<MapKey, Freeze::SharedDbEnv*> SharedDbEnvMap; SharedDbEnvMap* sharedDbEnvMap; diff --git a/cpp/src/Freeze/SharedDbEnv.h b/cpp/src/Freeze/SharedDbEnv.h index 0afd4b9098f..53c54988bb7 100644 --- a/cpp/src/Freeze/SharedDbEnv.h +++ b/cpp/src/Freeze/SharedDbEnv.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SHARED_DB_ENV_H -#define FREEZE_SHARED_DB_ENV_H +#pragma once #include <Freeze/Map.h> #include <IceUtil/FileUtil.h> @@ -127,4 +126,3 @@ SharedDbEnv::getEncoding() const } } -#endif diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h index 456e9f9b883..993a50d4ae8 100644 --- a/cpp/src/Freeze/TransactionI.h +++ b/cpp/src/Freeze/TransactionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_TRANSACTIONI_H -#define FREEZE_TRANSACTIONI_H +#pragma once #include <Ice/CommunicatorF.h> #include <Freeze/Transaction.h> @@ -85,4 +84,3 @@ private: typedef IceUtil::Handle<TransactionI> TransactionIPtr; } -#endif diff --git a/cpp/src/Freeze/TransactionalEvictorContext.h b/cpp/src/Freeze/TransactionalEvictorContext.h index 0278d6f5ad3..45a6afd1074 100644 --- a/cpp/src/Freeze/TransactionalEvictorContext.h +++ b/cpp/src/Freeze/TransactionalEvictorContext.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_TRANSACTIONAL_EVICTOR_CONTEXT_H -#define FREEZE_TRANSACTIONAL_EVICTOR_CONTEXT_H +#pragma once #include <Ice/Ice.h> #include <Freeze/TransactionalEvictor.h> @@ -164,6 +163,3 @@ private: typedef IceUtil::Handle<TransactionalEvictorContext> TransactionalEvictorContextPtr; } - - -#endif diff --git a/cpp/src/Freeze/TransactionalEvictorI.h b/cpp/src/Freeze/TransactionalEvictorI.h index d8c9a9375d4..73c140b0db4 100644 --- a/cpp/src/Freeze/TransactionalEvictorI.h +++ b/cpp/src/Freeze/TransactionalEvictorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_TRANSACTIONAL_EVICTOR_I_H -#define FREEZE_TRANSACTIONAL_EVICTOR_I_H +#pragma once #include <Freeze/EvictorI.h> #include <Freeze/TransactionalEvictor.h> @@ -124,5 +123,3 @@ private: typedef IceUtil::Handle<TransactionalEvictorI> TransactionalEvictorIPtr; } - -#endif diff --git a/cpp/src/Freeze/Util.h b/cpp/src/Freeze/Util.h index 9423a707f6f..f848e873bd2 100644 --- a/cpp/src/Freeze/Util.h +++ b/cpp/src/Freeze/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_UTIL_H -#define FREEZE_UTIL_H +#pragma once #include <Ice/Ice.h> #include <Freeze/DB.h> @@ -68,7 +67,3 @@ handleDbException(const DbException&, Key&, Dbt&, Value&, Dbt&, const char*, int); } - - -#endif - diff --git a/cpp/src/FreezeScript/AssignVisitor.h b/cpp/src/FreezeScript/AssignVisitor.h index 388dde01b60..71f9091967c 100644 --- a/cpp/src/FreezeScript/AssignVisitor.h +++ b/cpp/src/FreezeScript/AssignVisitor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_ASSIGN_VISITOR_H -#define FREEZE_SCRIPT_ASSIGN_VISITOR_H +#pragma once #include <FreezeScript/Data.h> @@ -50,5 +49,3 @@ private: }; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Data.h b/cpp/src/FreezeScript/Data.h index 6e4e24a0168..7f2524f06df 100644 --- a/cpp/src/FreezeScript/Data.h +++ b/cpp/src/FreezeScript/Data.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_DATA_H -#define FREEZE_SCRIPT_DATA_H +#pragma once #include <Ice/Ice.h> #include <Slice/Parser.h> @@ -614,5 +613,3 @@ public: }; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index 13d8e1554bf..5472b1d50a8 100755 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -629,8 +629,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator return status; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/FreezeScript/DumpDescriptors.h b/cpp/src/FreezeScript/DumpDescriptors.h index 25af7437a0f..a4d900df06c 100644 --- a/cpp/src/FreezeScript/DumpDescriptors.h +++ b/cpp/src/FreezeScript/DumpDescriptors.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_DUMP_DESCRIPTORS_H -#define FREEZE_SCRIPT_DUMP_DESCRIPTORS_H +#pragma once #include <FreezeScript/Parser.h> #include <IceXML/Parser.h> @@ -302,5 +301,3 @@ private: typedef IceUtil::Handle<DumpDBDescriptor> DumpDBDescriptorPtr; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Error.h b/cpp/src/FreezeScript/Error.h index 8e52a549cbd..4cbf3ff2272 100644 --- a/cpp/src/FreezeScript/Error.h +++ b/cpp/src/FreezeScript/Error.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_ERROR_H -#define FREEZE_SCRIPT_ERROR_H +#pragma once #include <Slice/Parser.h> @@ -64,5 +63,3 @@ private: }; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Exception.h b/cpp/src/FreezeScript/Exception.h index 8c3b6d5e87e..3d19ec8e2dc 100644 --- a/cpp/src/FreezeScript/Exception.h +++ b/cpp/src/FreezeScript/Exception.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_EXCEPTION_H -#define FREEZE_SCRIPT_EXCEPTION_H +#pragma once #include <IceUtil/Exception.h> @@ -35,5 +34,3 @@ private: }; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Functions.h b/cpp/src/FreezeScript/Functions.h index d3b63146ba7..c1194051e3b 100644 --- a/cpp/src/FreezeScript/Functions.h +++ b/cpp/src/FreezeScript/Functions.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_FUNCTIONS_H -#define FREEZE_SCRIPT_FUNCTIONS_H +#pragma once #include <FreezeScript/Data.h> @@ -22,5 +21,3 @@ bool invokeMemberFunction(const std::string&, const DataPtr&, const DataList&, D const ErrorReporterPtr&); } - -#endif diff --git a/cpp/src/FreezeScript/GrammarUtil.h b/cpp/src/FreezeScript/GrammarUtil.h index 2ca8fa22eda..9b42a92351a 100644 --- a/cpp/src/FreezeScript/GrammarUtil.h +++ b/cpp/src/FreezeScript/GrammarUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_GRAMMAR_UTIL_H -#define FREEZE_SCRIPT_GRAMMAR_UTIL_H +#pragma once #include <FreezeScript/Parser.h> @@ -132,5 +131,3 @@ int freeze_script_parse(); // yyoverflow. // #define yyoverflow(a, b, c, d, e, f) freeze_script_error(a) - -#endif diff --git a/cpp/src/FreezeScript/Parser.h b/cpp/src/FreezeScript/Parser.h index c3297385aec..397de172fac 100644 --- a/cpp/src/FreezeScript/Parser.h +++ b/cpp/src/FreezeScript/Parser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_PARSER_H -#define FREEZE_SCRIPT_PARSER_H +#pragma once #include <FreezeScript/Data.h> @@ -247,5 +246,3 @@ private: } // End of namespace FreezeScript std::ostream& operator<<(std::ostream&, const FreezeScript::EntityNodePtr&); - -#endif diff --git a/cpp/src/FreezeScript/Print.h b/cpp/src/FreezeScript/Print.h index 6d6d57efbd1..ce548612c77 100644 --- a/cpp/src/FreezeScript/Print.h +++ b/cpp/src/FreezeScript/Print.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_PRINT_H -#define FREEZE_SCRIPT_PRINT_H +#pragma once #include <FreezeScript/Data.h> @@ -18,5 +17,3 @@ namespace FreezeScript void printData(const DataPtr&, std::ostream&); } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/TransformAnalyzer.h b/cpp/src/FreezeScript/TransformAnalyzer.h index 2d0d5719bcc..1ebbf1a91a6 100644 --- a/cpp/src/FreezeScript/TransformAnalyzer.h +++ b/cpp/src/FreezeScript/TransformAnalyzer.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_TRANSFORM_ANALYZER_H -#define FREEZE_SCRIPT_TRANSFORM_ANALYZER_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -40,5 +39,3 @@ private: }; } - -#endif diff --git a/cpp/src/FreezeScript/TransformVisitor.h b/cpp/src/FreezeScript/TransformVisitor.h index c1365e340a1..1a53d7954ca 100644 --- a/cpp/src/FreezeScript/TransformVisitor.h +++ b/cpp/src/FreezeScript/TransformVisitor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_TRANSFORM_VISITOR_H -#define FREEZE_SCRIPT_TRANSFORM_VISITOR_H +#pragma once #include <FreezeScript/Data.h> @@ -116,5 +115,3 @@ private: }; } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Transformer.h b/cpp/src/FreezeScript/Transformer.h index 724688b11de..323f285c26a 100644 --- a/cpp/src/FreezeScript/Transformer.h +++ b/cpp/src/FreezeScript/Transformer.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_TRANSFORMER_H -#define FREEZE_SCRIPT_TRANSFORMER_H +#pragma once #include <Ice/Ice.h> #include <Slice/Parser.h> @@ -29,5 +28,3 @@ transformDatabase(const Ice::CommunicatorPtr&, std::ostream&, bool, std::istream&); } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/Util.h b/cpp/src/FreezeScript/Util.h index 4ad93167c7e..cb81adf7b8f 100644 --- a/cpp/src/FreezeScript/Util.h +++ b/cpp/src/FreezeScript/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_SCRIPT_UTIL_H -#define FREEZE_SCRIPT_UTIL_H +#pragma once #include <Slice/Parser.h> #include <Ice/CommunicatorF.h> @@ -63,5 +62,3 @@ typedef std::map<std::string, Freeze::CatalogData> CatalogDataMap; CatalogDataMap readCatalog(const Ice::CommunicatorPtr&, const std::string&); } // End of namespace FreezeScript - -#endif diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp index 7d8573fe09d..6a6bd5fe7f5 100755 --- a/cpp/src/FreezeScript/transformdb.cpp +++ b/cpp/src/FreezeScript/transformdb.cpp @@ -928,8 +928,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator return status; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/Glacier2/Blobject.h b/cpp/src/Glacier2/Blobject.h index 6c50d286d34..05e6c63fe3b 100644 --- a/cpp/src/Glacier2/Blobject.h +++ b/cpp/src/Glacier2/Blobject.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef BLOBJECT_H -#define BLOBJECT_H +#pragma once #include <Ice/Ice.h> #include <Glacier2/RequestQueue.h> @@ -45,5 +44,3 @@ private: }; } - -#endif diff --git a/cpp/src/Glacier2/ClientBlobject.h b/cpp/src/Glacier2/ClientBlobject.h index 0dcf4c728e4..0e1143051b6 100644 --- a/cpp/src/Glacier2/ClientBlobject.h +++ b/cpp/src/Glacier2/ClientBlobject.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef CLIENT_BLOBJECT_H -#define CLIENT_BLOBJECT_H +#pragma once #include <Glacier2/Blobject.h> #include <Glacier2/Session.h> @@ -50,5 +49,3 @@ private: const int _rejectTraceLevel; }; } - -#endif diff --git a/cpp/src/Glacier2/CryptPermissionsVerifierI.h b/cpp/src/Glacier2/CryptPermissionsVerifierI.h index 143c1afa1d9..b7a61847c62 100644 --- a/cpp/src/Glacier2/CryptPermissionsVerifierI.h +++ b/cpp/src/Glacier2/CryptPermissionsVerifierI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_CRYPT_PERMISSIONS_VERIFIER_I_H -#define GLACIER2_CRYPT_PERMISSIONS_VERIFIER_I_H +#pragma once #include <Ice/Ice.h> #include <Glacier2/PermissionsVerifier.h> @@ -30,5 +29,3 @@ private: }; } - -#endif diff --git a/cpp/src/Glacier2/FilterI.h b/cpp/src/Glacier2/FilterI.h index e2c81f0f221..20a9cb873c8 100644 --- a/cpp/src/Glacier2/FilterI.h +++ b/cpp/src/Glacier2/FilterI.h @@ -6,8 +6,8 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -#ifndef FILTER_I_H -#define FILTER_I_H + +#pragma once #include <Glacier2/Session.h> @@ -176,5 +176,3 @@ typedef FilterT<std::string, Glacier2::StringSet> StringSetI; typedef IceUtil::Handle< FilterT<std::string, Glacier2::StringSet> > StringSetIPtr; }; - -#endif diff --git a/cpp/src/Glacier2/FilterManager.h b/cpp/src/Glacier2/FilterManager.h index 0506c9c197b..0c0e8108981 100644 --- a/cpp/src/Glacier2/FilterManager.h +++ b/cpp/src/Glacier2/FilterManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FILTER_MANAGER_H -#define FILTER_MANAGER_H +#pragma once // // It'd be better if we didn't have to include this everywhere, but @@ -84,6 +83,3 @@ private: FilterManager(const InstancePtr& , const StringSetIPtr&, const StringSetIPtr&, const IdentitySetIPtr&); }; }; - -#endif /* FILTER_MANAGER_H */ - diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index b5d38c7c642..93af7ddb963 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -612,8 +612,7 @@ Glacier2::RouterService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/Glacier2/Instance.h b/cpp/src/Glacier2/Instance.h index fe49c0ddcad..4bde3b585db 100644 --- a/cpp/src/Glacier2/Instance.h +++ b/cpp/src/Glacier2/Instance.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_INSTANCE_H -#define GLACIER2_INSTANCE_H +#pragma once #include <Ice/CommunicatorF.h> #include <Ice/ObjectAdapterF.h> @@ -60,5 +59,3 @@ private: typedef IceUtil::Handle<Instance> InstancePtr; } // End namespace Glacier2 - -#endif diff --git a/cpp/src/Glacier2/ProxyVerifier.h b/cpp/src/Glacier2/ProxyVerifier.h index 9a281d7f176..38133aaa271 100644 --- a/cpp/src/Glacier2/ProxyVerifier.h +++ b/cpp/src/Glacier2/ProxyVerifier.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_VERIFIER_H -#define ICE_PROXY_VERIFIER_H +#pragma once #include <Ice/Ice.h> #include <vector> @@ -56,4 +55,3 @@ private: typedef IceUtil::Handle<ProxyVerifier> ProxyVerifierPtr; } -#endif diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h index 949b6bf1b2a..5fecdff2879 100644 --- a/cpp/src/Glacier2/RequestQueue.h +++ b/cpp/src/Glacier2/RequestQueue.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef REQUEST_H -#define REQUEST_H +#pragma once #include <IceUtil/Thread.h> #include <IceUtil/Monitor.h> @@ -114,5 +113,3 @@ private: }; } - -#endif diff --git a/cpp/src/Glacier2/RouterI.h b/cpp/src/Glacier2/RouterI.h index f0aeb23442b..619ef513b48 100644 --- a/cpp/src/Glacier2/RouterI.h +++ b/cpp/src/Glacier2/RouterI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_ROUTER_I_H -#define GLACIER2_ROUTER_I_H +#pragma once #include <Ice/Ice.h> #include <Glacier2/Router.h> @@ -75,5 +74,3 @@ private: }; } - -#endif diff --git a/cpp/src/Glacier2/RoutingTable.h b/cpp/src/Glacier2/RoutingTable.h index 20ab0b0d212..b49894d4e49 100644 --- a/cpp/src/Glacier2/RoutingTable.h +++ b/cpp/src/Glacier2/RoutingTable.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ROUTING_TABLE_H -#define ICE_ROUTING_TABLE_H +#pragma once #include <Ice/Ice.h> #include <IceUtil/Mutex.h> @@ -55,5 +54,3 @@ private: }; } - -#endif diff --git a/cpp/src/Glacier2/ServerBlobject.h b/cpp/src/Glacier2/ServerBlobject.h index 2d1481e44a4..56fabf9e88f 100644 --- a/cpp/src/Glacier2/ServerBlobject.h +++ b/cpp/src/Glacier2/ServerBlobject.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SERVER_BLOBJECT_H -#define SERVER_BLOBJECT_H +#pragma once #include <Glacier2/Blobject.h> @@ -30,5 +29,3 @@ public: }; } - -#endif diff --git a/cpp/src/Glacier2/SessionRouterI.h b/cpp/src/Glacier2/SessionRouterI.h index 3a45007c60d..a494d1158bf 100644 --- a/cpp/src/Glacier2/SessionRouterI.h +++ b/cpp/src/Glacier2/SessionRouterI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GLACIER2_SESSION_ROUTER_I_H -#define GLACIER2_SESSION_ROUTER_I_H +#pragma once #include <IceUtil/Thread.h> #include <IceUtil/Monitor.h> @@ -159,5 +158,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/Acceptor.h b/cpp/src/Ice/Acceptor.h index 27fdba1a1cb..bc6dba9c43c 100644 --- a/cpp/src/Ice/Acceptor.h +++ b/cpp/src/Ice/Acceptor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ACCEPTOR_H -#define ICE_ACCEPTOR_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/AcceptorF.h> @@ -34,5 +33,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/AcceptorF.h b/cpp/src/Ice/AcceptorF.h index 6e2bc1d60f8..d1dd06c669e 100644 --- a/cpp/src/Ice/AcceptorF.h +++ b/cpp/src/Ice/AcceptorF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ACCEPTOR_F_H -#define ICE_ACCEPTOR_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(Acceptor*); typedef Handle<Acceptor> AcceptorPtr; } - -#endif diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index c7abb540a69..2a879eeaaee 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -141,7 +141,7 @@ destroyOnInterruptCallback(int signal) // return; } - if(_nohup && signal == SIGHUP) + if(_nohup && signal == static_cast<int>(SIGHUP)) { return; } @@ -197,7 +197,7 @@ shutdownOnInterruptCallback(int signal) // return; } - if(_nohup && signal == SIGHUP) + if(_nohup && signal == static_cast<int>(SIGHUP)) { return; } diff --git a/cpp/src/Ice/Base64.h b/cpp/src/Ice/Base64.h index 64d16c04823..0de84d1b15c 100644 --- a/cpp/src/Ice/Base64.h +++ b/cpp/src/Ice/Base64.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_BASE_64_H -#define ICE_BASE_64_H +#pragma once #include <Ice/Config.h> #include <string> @@ -32,5 +31,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h index 565a5ccecd6..dc5580180b2 100644 --- a/cpp/src/Ice/CommunicatorI.h +++ b/cpp/src/Ice/CommunicatorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_COMMUNICATOR_I_H -#define ICE_COMMUNICATOR_I_H +#pragma once #include <IceUtil/RecMutex.h> @@ -98,5 +97,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ConnectRequestHandler.h b/cpp/src/Ice/ConnectRequestHandler.h index 491d5b6639a..35a9fe87216 100644 --- a/cpp/src/Ice/ConnectRequestHandler.h +++ b/cpp/src/Ice/ConnectRequestHandler.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECT_REQUEST_HANDLER_H -#define ICE_CONNECT_REQUEST_HANDLER_H +#pragma once #include <IceUtil/Monitor.h> #include <IceUtil/Mutex.h> @@ -89,5 +88,3 @@ private: typedef IceUtil::Handle<ConnectRequestHandler> ConnectRequestHandlerPtr; } - -#endif diff --git a/cpp/src/Ice/ConnectionFactory.h b/cpp/src/Ice/ConnectionFactory.h index 846248b8e40..1ca9233a7bf 100644 --- a/cpp/src/Ice/ConnectionFactory.h +++ b/cpp/src/Ice/ConnectionFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_FACTORY_H -#define ICE_CONNECTION_FACTORY_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Monitor.h> @@ -222,5 +221,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h index 8648f8f302c..1f448693a38 100644 --- a/cpp/src/Ice/ConnectionI.h +++ b/cpp/src/Ice/ConnectionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_I_H -#define ICE_CONNECTION_I_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Monitor.h> @@ -331,5 +330,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ConnectionMonitor.h b/cpp/src/Ice/ConnectionMonitor.h index 5f09f67405f..19e8a353280 100644 --- a/cpp/src/Ice/ConnectionMonitor.h +++ b/cpp/src/Ice/ConnectionMonitor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_MONITOR_H -#define ICE_CONNECTION_MONITOR_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Monitor.h> @@ -47,5 +46,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ConnectionRequestHandler.cpp b/cpp/src/Ice/ConnectionRequestHandler.cpp index 9a4c75122c0..d7571419139 100644 --- a/cpp/src/Ice/ConnectionRequestHandler.cpp +++ b/cpp/src/Ice/ConnectionRequestHandler.cpp @@ -21,19 +21,7 @@ using namespace IceInternal; ConnectionRequestHandler::ConnectionRequestHandler(const ReferencePtr& reference, const Ice::ObjectPrx& proxy) : RequestHandler(reference) { -// COMPILERFIX: Without the catch/rethrow C++Builder 2007 can get access violations. -#ifdef __BCPLUSPLUS__ - try - { -#endif - _connection = _reference->getConnection(_compress); -#ifdef __BCPLUSPLUS__ - } - catch(const Ice::LocalException&) - { - throw; - } -#endif + _connection = _reference->getConnection(_compress); RouterInfoPtr ri = reference->getRouterInfo(); if(ri) { diff --git a/cpp/src/Ice/ConnectionRequestHandler.h b/cpp/src/Ice/ConnectionRequestHandler.h index 45b5678d35f..c05f7d8bf5a 100644 --- a/cpp/src/Ice/ConnectionRequestHandler.h +++ b/cpp/src/Ice/ConnectionRequestHandler.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTION_REQUEST_HANDLER_H -#define ICE_CONNECTION_REQUEST_HANDLER_H +#pragma once #include <Ice/RequestHandler.h> #include <Ice/ReferenceF.h> @@ -43,5 +42,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/Connector.h b/cpp/src/Ice/Connector.h index 58bd62bf900..79e7060421a 100644 --- a/cpp/src/Ice/Connector.h +++ b/cpp/src/Ice/Connector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTOR_H -#define ICE_CONNECTOR_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/ConnectorF.h> @@ -32,5 +31,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/ConnectorF.h b/cpp/src/Ice/ConnectorF.h index 0e7872c4dbf..91318a048df 100644 --- a/cpp/src/Ice/ConnectorF.h +++ b/cpp/src/Ice/ConnectorF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_CONNECTOR_F_H -#define ICE_CONNECTOR_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(Connector*); typedef Handle<Connector> ConnectorPtr; } - -#endif diff --git a/cpp/src/Ice/DLLMain.cpp b/cpp/src/Ice/DLLMain.cpp index f45db86139a..7a67e55e6d6 100644 --- a/cpp/src/Ice/DLLMain.cpp +++ b/cpp/src/Ice/DLLMain.cpp @@ -16,10 +16,6 @@ extern "C" { BOOL WINAPI -#ifdef __BCPLUSPLUS__ -DllMain(HINSTANCE hDLL, DWORD reason, LPVOID reserved) -{ -#else ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) { // @@ -32,7 +28,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) return FALSE; } } -#endif if(reason == DLL_PROCESS_ATTACH) { @@ -43,7 +38,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) Ice::ImplicitContextI::cleanupThread(); } -#ifndef __BCPLUSPLUS__ // // During DETACH, we must call _CRT_INIT last. // @@ -54,7 +48,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) return FALSE; } } -#endif return TRUE; } diff --git a/cpp/src/Ice/DefaultsAndOverrides.h b/cpp/src/Ice/DefaultsAndOverrides.h index d2f624470d1..b0d7dee0f59 100644 --- a/cpp/src/Ice/DefaultsAndOverrides.h +++ b/cpp/src/Ice/DefaultsAndOverrides.h @@ -8,8 +8,7 @@ // // ********************************************************************** -#ifndef ICE_DEFAULTS_AND_OVERRIDES_H -#define ICE_DEFAULTS_AND_OVERRIDES_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/DefaultsAndOverridesF.h> @@ -48,5 +47,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/DefaultsAndOverridesF.h b/cpp/src/Ice/DefaultsAndOverridesF.h index 9d2b40287c4..845e2c0ca4a 100644 --- a/cpp/src/Ice/DefaultsAndOverridesF.h +++ b/cpp/src/Ice/DefaultsAndOverridesF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DEFAULTS_AND_OVERRIDES_F_H -#define ICE_DEFAULTS_AND_OVERRIDES_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(DefaultsAndOverrides*); typedef Handle<DefaultsAndOverrides> DefaultsAndOverridesPtr; } - -#endif diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 15c9007cb9b..5b690df5f2b 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -213,12 +213,7 @@ IceInternal::DynamicLibrary::getSymbol(const string& name) { assert(_hnd != 0); #ifdef _WIN32 -# ifdef __BCPLUSPLUS__ - string newName = "_" + name; - symbol_type result = GetProcAddress(_hnd, newName.c_str()); -# else symbol_type result = GetProcAddress(_hnd, name.c_str()); -# endif #else symbol_type result = dlsym(_hnd, name.c_str()); #endif diff --git a/cpp/src/Ice/EndpointFactoryManager.h b/cpp/src/Ice/EndpointFactoryManager.h index 89bdc493cef..cc8e5fdb21a 100644 --- a/cpp/src/Ice/EndpointFactoryManager.h +++ b/cpp/src/Ice/EndpointFactoryManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_FACTORY_MANAGER_H -#define ICE_ENDPOINT_FACTORY_MANAGER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -43,5 +42,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/EndpointFactoryManagerF.h b/cpp/src/Ice/EndpointFactoryManagerF.h index 9123c7dec89..570249ed5e7 100644 --- a/cpp/src/Ice/EndpointFactoryManagerF.h +++ b/cpp/src/Ice/EndpointFactoryManagerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_FACTORY_MANAGER_F_H -#define ICE_ENDPOINT_FACTORY_MANAGER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(EndpointFactoryManager*); typedef Handle<EndpointFactoryManager> EndpointFactoryManagerPtr; } - -#endif diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h index 02b194cd9e1..7a048bd6039 100644 --- a/cpp/src/Ice/EndpointI.h +++ b/cpp/src/Ice/EndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ENDPOINT_I_H -#define ICE_ENDPOINT_I_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Shared.h> @@ -215,5 +214,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/EventHandler.h b/cpp/src/Ice/EventHandler.h index da1df3b93a4..3c7ece52a57 100644 --- a/cpp/src/Ice/EventHandler.h +++ b/cpp/src/Ice/EventHandler.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_EVENT_HANDLER_H -#define ICE_EVENT_HANDLER_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/EventHandlerF.h> @@ -72,5 +71,3 @@ protected: }; } - -#endif diff --git a/cpp/src/Ice/EventHandlerF.h b/cpp/src/Ice/EventHandlerF.h index 9b16cb492dc..3947e19ca6f 100644 --- a/cpp/src/Ice/EventHandlerF.h +++ b/cpp/src/Ice/EventHandlerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_EVENT_HANDLER_F_H -#define ICE_EVENT_HANDLER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(EventHandler*); typedef Handle<EventHandler> EventHandlerPtr; } - -#endif diff --git a/cpp/src/Ice/EventLoggerMsg.h b/cpp/src/Ice/EventLoggerMsg.h index 5934c1f104f..be8c37e8213 100755 --- a/cpp/src/Ice/EventLoggerMsg.h +++ b/cpp/src/Ice/EventLoggerMsg.h @@ -1,11 +1,11 @@ - // ********************************************************************** - // - // Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. - // - // This copy of Ice is licensed to you under the terms described in the - // ICE_LICENSE file included in this distribution. - // - // ********************************************************************** +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** // // Values are 32 bit values laid out as follows: // diff --git a/cpp/src/Ice/GC.h b/cpp/src/Ice/GC.h index 90a7072e958..a73d8ff722b 100644 --- a/cpp/src/Ice/GC.h +++ b/cpp/src/Ice/GC.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GC_H -#define ICE_GC_H +#pragma once #include <Ice/Config.h> #include <IceUtil/Thread.h> @@ -47,5 +46,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/HashUtil.h b/cpp/src/Ice/HashUtil.h index fcc5644a99a..7b6c7f6a27b 100644 --- a/cpp/src/Ice/HashUtil.h +++ b/cpp/src/Ice/HashUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_HASH_UTIL_H -#define ICE_HASH_UTIL_H +#pragma once namespace IceInternal { @@ -55,6 +54,3 @@ hashAdd(Ice::Int& hashCode, const std::map<K, V>& map) } - -#endif - diff --git a/cpp/src/Ice/ImplicitContextI.h b/cpp/src/Ice/ImplicitContextI.h index 8125f7a92a3..b781db796bc 100644 --- a/cpp/src/Ice/ImplicitContextI.h +++ b/cpp/src/Ice/ImplicitContextI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_IMPLICIT_CONTEXT_I_H -#define ICE_IMPLICIT_CONTEXT_I_H +#pragma once #include <Ice/ImplicitContext.h> @@ -48,4 +47,3 @@ public: typedef IceInternal::Handle<ImplicitContextI> ImplicitContextIPtr; } -#endif diff --git a/cpp/src/Ice/IncomingRequest.h b/cpp/src/Ice/IncomingRequest.h index b163c86a39a..2cb1ca7e785 100644 --- a/cpp/src/Ice/IncomingRequest.h +++ b/cpp/src/Ice/IncomingRequest.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INCOMING_REQUEST_H -#define ICE_INCOMING_REQUEST_H +#pragma once #include <Ice/Incoming.h> #include <Ice/Object.h> @@ -34,5 +33,3 @@ public: Incoming& _in; }; } - -#endif diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h index b39e88ce838..91a97009de6 100644 --- a/cpp/src/Ice/Instance.h +++ b/cpp/src/Ice/Instance.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_INSTANCE_H -#define ICE_INSTANCE_H +#pragma once #include <IceUtil/Config.h> #include <IceUtil/Shared.h> @@ -159,5 +158,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/LocatorInfo.h b/cpp/src/Ice/LocatorInfo.h index 13bbb2f98bc..7ec892f1626 100644 --- a/cpp/src/Ice/LocatorInfo.h +++ b/cpp/src/Ice/LocatorInfo.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOCATOR_INFO_H -#define ICE_LOCATOR_INFO_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -181,5 +180,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/LocatorInfoF.h b/cpp/src/Ice/LocatorInfoF.h index 3666e182700..817aa6cb651 100644 --- a/cpp/src/Ice/LocatorInfoF.h +++ b/cpp/src/Ice/LocatorInfoF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOCATOR_INFO_F_H -#define ICE_LOCATOR_INFO_F_H +#pragma once #include <IceUtil/Shared.h> @@ -30,5 +29,3 @@ IceUtil::Shared* upCast(LocatorTable*); typedef Handle<LocatorTable> LocatorTablePtr; } - -#endif diff --git a/cpp/src/Ice/LoggerI.h b/cpp/src/Ice/LoggerI.h index dfab4451764..6f1ce6457b0 100644 --- a/cpp/src/Ice/LoggerI.h +++ b/cpp/src/Ice/LoggerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_LOGGER_I_H -#define ICE_LOGGER_I_H +#pragma once #include <Ice/Logger.h> #include <IceUtil/FileUtil.h> @@ -41,5 +40,3 @@ private: typedef IceUtil::Handle<LoggerI> LoggerIPtr; } - -#endif diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 70da4e66b31..d72a8c622f4 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -9,11 +9,17 @@ top_srcdir = ../.. -LIBFILENAME = $(call mklibfilename,Ice,$(VERSION)) -SONAME = $(call mksoname,Ice,$(SOVERSION)) -LIBNAME = $(call mklibname,Ice) - -TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +include $(top_srcdir)/config/Make.rules.common + +ifeq ($(MinGW), yes) + DLLNAME = $(top_srcdir)/bin/ice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX).dll + TARGETS = $(DLLNAME) $(LIBNAME) +else + LIBFILENAME = $(call mklibfilename,Ice,$(VERSION)) + SONAME = $(call mksoname,Ice,$(SOVERSION)) + LIBNAME = $(call mklibname,Ice) + TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +endif OBJS = Acceptor.o \ Application.o \ @@ -96,8 +102,7 @@ OBJS = Acceptor.o \ Stats.o \ StreamI.o \ Stream.o \ - StringConverter.o \ - SysLoggerI.o \ + StringConverter.o \ TcpAcceptor.o \ TcpConnector.o \ TcpEndpointI.o \ @@ -111,6 +116,12 @@ OBJS = Acceptor.o \ UdpTransceiver.o \ Version.o +ifneq ($(MinGW), yes) +OBJS := $(OBJS) \ + SysLoggerI.o +endif + + SRCS = $(OBJS:.o=.cpp) \ DLLMain.cpp @@ -160,8 +171,16 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) -DICE_API_EXPORTS $(BZIP2_FLAGS) SLICE2CPPFLAGS := --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) +ifeq ($(MinGW), yes) +CPPFLAGS := $(CPPFLAGS) -DCOMPSUFFIX=\"$(COMPSUFFIX)\" +LINKWITH := $(ICE_OS_LIBS) -l$(ICEUTIL_LIBNAME) $(BZIP2_LIBS) +$(DLLNAME): $(OBJS) + $(CXX) -shared $(LDFLAGS) -o $(DLLNAME) $(OBJS) $(LINKWITH) + +install:: all + $(call installprogram,$(DLLNAME),$(install_bindir)) +else LINKWITH := -lIceUtil $(BZIP2_LIBS) $(ICONV_LIBS) $(ICE_OS_LIBS) - $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) @@ -176,6 +195,7 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) +endif $(HDIR)/BuiltinSequences.h BuiltinSequences.cpp: $(SDIR)/BuiltinSequences.ice $(SLICE2CPP) $(SLICEPARSERLIB) rm -f $(HDIR)/BuiltinSequences.h BuiltinSequences.cpp diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak index 1a9a6367eb6..f3bc4c18258 100644 --- a/cpp/src/Ice/Makefile.mak +++ b/cpp/src/Ice/Makefile.mak @@ -159,14 +159,6 @@ Ice.res: EventLoggerMsg.rc #EventLoggerMsg.h EventLoggerMsg.rc: EventLoggerMsg.mc
# mc EventLoggerMsg.mc
-!if "$(CPP_COMPILER)" == "BCC2010" & "$(OPTIMIZE)" == "yes"
-#
-# Tests fail if GC.cpp is built with optimizations enabled
-#
-GC.obj: GC.cpp
- $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) -Od GC.cpp
-!endif
-
clean::
-del /q BuiltinSequences.cpp $(HDIR)\BuiltinSequences.h
-del /q CommunicatorF.cpp $(HDIR)\CommunicatorF.h
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index ed730a8bb88..c29cd00a78b 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -2277,7 +2277,7 @@ IceInternal::doFinishConnectAsync(SOCKET fd, AsyncInfo& info) // failure to connect. The socket isn't closed by this method. // - if(info.count == SOCKET_ERROR) + if(static_cast<int>(info.count) == SOCKET_ERROR) { WSASetLastError(info.error); if(connectionRefused()) diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index 66c700dbf23..1643c5eae8f 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_NETWORK_H -#define ICE_NETWORK_H +#pragma once #ifdef __hpux # define _XOPEN_SOURCE_EXTENDED @@ -25,7 +24,9 @@ #elif defined(_WIN32) # include <winsock2.h> # include <ws2tcpip.h> +# if !defined(__MINGW32__) typedef int ssize_t; +# endif #else # include <unistd.h> # include <fcntl.h> @@ -86,6 +87,21 @@ typedef int socklen_t; # define NETDB_SUCCESS 0 #endif +#if defined(__MINGW32__) && !defined WSAID_CONNECTEX +# define WSAID_CONNECTEX {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}} +# define WSAID_ACCEPTEX {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} +# define SO_UPDATE_ACCEPT_CONTEXT 0x700B +# define SO_UPDATE_CONNECT_CONTEXT 0x7010 + typedef BOOL (PASCAL FAR * LPFN_CONNECTEX) (IN SOCKET s, IN const struct sockaddr FAR *name, IN int namelen, + IN PVOID lpSendBuffer OPTIONAL, IN DWORD dwSendDataLength, + OUT LPDWORD lpdwBytesSent, IN LPOVERLAPPED lpOverlapped); + + typedef BOOL (PASCAL FAR * LPFN_ACCEPTEX)(IN SOCKET sListenSocket, IN SOCKET sAcceptSocket, + IN PVOID lpOutputBuffer, IN DWORD dwReceiveDataLength, + IN DWORD dwLocalAddressLength, IN DWORD dwRemoteAddressLength, + OUT LPDWORD lpdwBytesReceived, IN LPOVERLAPPED lpOverlapped); +#endif + namespace IceInternal { @@ -237,5 +253,3 @@ ICE_API void doConnectAsync(SOCKET, const Address&, AsyncInfo&); ICE_API void doFinishConnectAsync(SOCKET, AsyncInfo&); #endif } - -#endif diff --git a/cpp/src/Ice/ObjectAdapterFactory.h b/cpp/src/Ice/ObjectAdapterFactory.h index 9523f65748f..dc7003e7950 100644 --- a/cpp/src/Ice/ObjectAdapterFactory.h +++ b/cpp/src/Ice/ObjectAdapterFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OBJECT_ADAPTER_FACTORY_H -#define ICE_OBJECT_ADAPTER_FACTORY_H +#pragma once #include <Ice/ObjectAdapterI.h> #include <IceUtil/RecMutex.h> @@ -46,5 +45,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ObjectAdapterI.h b/cpp/src/Ice/ObjectAdapterI.h index d3eed147890..c74f8bec8ed 100644 --- a/cpp/src/Ice/ObjectAdapterI.h +++ b/cpp/src/Ice/ObjectAdapterI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_OBJECT_ADAPTER_I_H -#define ICE_OBJECT_ADAPTER_I_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/RecMutex.h> @@ -141,5 +140,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ObjectFactoryManager.h b/cpp/src/Ice/ObjectFactoryManager.h index 424610d5131..0c963b509eb 100644 --- a/cpp/src/Ice/ObjectFactoryManager.h +++ b/cpp/src/Ice/ObjectFactoryManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVANT_FACTORY_MANAGER_H -#define ICE_SERVANT_FACTORY_MANAGER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -39,5 +38,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ObjectFactoryManagerF.h b/cpp/src/Ice/ObjectFactoryManagerF.h index 9223e8290e8..5befe55a0d0 100644 --- a/cpp/src/Ice/ObjectFactoryManagerF.h +++ b/cpp/src/Ice/ObjectFactoryManagerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVANT_FACTORY_MANAGER_F_H -#define ICE_SERVANT_FACTORY_MANAGER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(ObjectFactoryManager*); typedef Handle<ObjectFactoryManager> ObjectFactoryManagerPtr; } - -#endif diff --git a/cpp/src/Ice/OpaqueEndpointI.h b/cpp/src/Ice/OpaqueEndpointI.h index c9e3e05a20d..d08f927af28 100644 --- a/cpp/src/Ice/OpaqueEndpointI.h +++ b/cpp/src/Ice/OpaqueEndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UNKNOWN_ENDPOINT_I_H -#define ICE_UNKNOWN_ENDPOINT_I_H +#pragma once #include <Ice/EndpointI.h> #include <Ice/EndpointFactory.h> @@ -60,5 +59,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/PluginManagerI.h b/cpp/src/Ice/PluginManagerI.h index 8918c3dfc33..ecb73fa3a43 100644 --- a/cpp/src/Ice/PluginManagerI.h +++ b/cpp/src/Ice/PluginManagerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PLUGIN_MANAGER_I_H -#define ICE_PLUGIN_MANAGER_I_H +#pragma once #include <Ice/Plugin.h> #include <Ice/InstanceF.h> @@ -59,6 +58,3 @@ private: typedef IceUtil::Handle<PluginManagerI> PluginManagerIPtr; } - - -#endif diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index fb2ca88bdb5..9bde5157184 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -171,9 +171,11 @@ Ice::PropertiesI::setProperty(const string& key, const string& value) // dot is an error. // assert(dotPos != string::npos); - + + bool mismatchCase = false; + string otherKey; string propPrefix = pattern.substr(0, dotPos); - if(propPrefix != prefix) + if(IceUtilInternal::toUpper(propPrefix) != IceUtilInternal::toUpper(prefix)) { continue; } @@ -193,11 +195,24 @@ Ice::PropertiesI::setProperty(const string& key, const string& value) currentKey = prop.deprecatedBy; } } + + if(!found && IceUtilInternal::match(IceUtilInternal::toUpper(currentKey), + IceUtilInternal::toUpper(prop.pattern))) + { + found = true; + mismatchCase = true; + otherKey = prop.pattern; + break; + } } if(!found) { logger->warning("unknown property: `" + currentKey + "'"); } + else if(mismatchCase) + { + logger->warning("unknown property: `" + currentKey + "'; did you mean `" + otherKey + "'"); + } } } diff --git a/cpp/src/Ice/PropertiesI.h b/cpp/src/Ice/PropertiesI.h index 79a94e7af37..ee6df06c1bb 100644 --- a/cpp/src/Ice/PropertiesI.h +++ b/cpp/src/Ice/PropertiesI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROPERTIES_I_H -#define ICE_PROPERTIES_I_H +#pragma once #include <IceUtil/Mutex.h> #include <Ice/Properties.h> @@ -89,5 +88,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index bc0c7f946f6..4cf079d262f 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -12,8 +12,7 @@ // IMPORTANT: Do not edit this file -- any edits made here will be lost! -#ifndef ICE_INTERNAL_PropertyNames_H -#define ICE_INTERNAL_PropertyNames_H +#pragma once #include <Ice/Config.h> @@ -75,5 +74,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/ProxyFactory.h b/cpp/src/Ice/ProxyFactory.h index 0c94420816c..80dcd548bb7 100644 --- a/cpp/src/Ice/ProxyFactory.h +++ b/cpp/src/Ice/ProxyFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PROXY_FACTORY_H -#define ICE_PROXY_FACTORY_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -53,5 +52,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/Reference.h b/cpp/src/Ice/Reference.h index 4fad67eab08..09737cde019 100644 --- a/cpp/src/Ice/Reference.h +++ b/cpp/src/Ice/Reference.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REFERENCE_H -#define ICE_REFERENCE_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/ReferenceF.h> @@ -298,5 +297,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ReferenceFactory.h b/cpp/src/Ice/ReferenceFactory.h index dd1982f96de..cafd428f07e 100644 --- a/cpp/src/Ice/ReferenceFactory.h +++ b/cpp/src/Ice/ReferenceFactory.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REFERENCE_FACTORY_H -#define ICE_REFERENCE_FACTORY_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/ReferenceFactoryF.h> @@ -76,5 +75,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ReferenceFactoryF.h b/cpp/src/Ice/ReferenceFactoryF.h index 52c8ea0a17c..4ed346064ca 100644 --- a/cpp/src/Ice/ReferenceFactoryF.h +++ b/cpp/src/Ice/ReferenceFactoryF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REFERENCE_FACTORY_F_H -#define ICE_REFERENCE_FACTORY_F_H +#pragma once #include <Ice/Handle.h> @@ -20,5 +19,3 @@ IceUtil::Shared* upCast(ReferenceFactory*); typedef Handle<ReferenceFactory> ReferenceFactoryPtr; } - -#endif diff --git a/cpp/src/Ice/ReplyStatus.h b/cpp/src/Ice/ReplyStatus.h index 0f3dccad897..ff6929ca72a 100644 --- a/cpp/src/Ice/ReplyStatus.h +++ b/cpp/src/Ice/ReplyStatus.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REPLY_STATUS_H -#define ICE_REPLY_STATUS_H +#pragma once #include <Ice/Config.h> @@ -25,5 +24,3 @@ static const Ice::Byte replyUnknownUserException = 6; static const Ice::Byte replyUnknownException = 7; } - -#endif diff --git a/cpp/src/Ice/RequestHandler.h b/cpp/src/Ice/RequestHandler.h index 3efd72108fb..1dd85e9ace3 100644 --- a/cpp/src/Ice/RequestHandler.h +++ b/cpp/src/Ice/RequestHandler.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_REQUEST_HANDLER_H -#define ICE_REQUEST_HANDLER_H +#pragma once #include <IceUtil/Shared.h> @@ -52,5 +51,3 @@ protected: }; } - -#endif diff --git a/cpp/src/Ice/RetryQueue.h b/cpp/src/Ice/RetryQueue.h index fdfcaa1fe70..b0a875d1a32 100644 --- a/cpp/src/Ice/RetryQueue.h +++ b/cpp/src/Ice/RetryQueue.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_RETRY_QUEUE_H -#define ICE_RETRY_QUEUE_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -57,6 +56,3 @@ private: }; } - -#endif - diff --git a/cpp/src/Ice/RetryQueueF.h b/cpp/src/Ice/RetryQueueF.h index 2cdea2a6c53..ca39e18b7e5 100644 --- a/cpp/src/Ice/RetryQueueF.h +++ b/cpp/src/Ice/RetryQueueF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_RETRY_QUEUE_F_H -#define ICE_RETRY_QUEUE_F_H +#pragma once #include <Ice/Handle.h> @@ -20,5 +19,3 @@ IceUtil::Shared* upCast(RetryQueue*); typedef Handle<RetryQueue> RetryQueuePtr; } - -#endif diff --git a/cpp/src/Ice/RouterInfo.h b/cpp/src/Ice/RouterInfo.h index 9e94bee435f..52801b57651 100644 --- a/cpp/src/Ice/RouterInfo.h +++ b/cpp/src/Ice/RouterInfo.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ROUTER_INFO_H -#define ICE_ROUTER_INFO_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -104,5 +103,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/RouterInfoF.h b/cpp/src/Ice/RouterInfoF.h index ecdb4074873..e05324c01cf 100644 --- a/cpp/src/Ice/RouterInfoF.h +++ b/cpp/src/Ice/RouterInfoF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_ROUTER_INFO_F_H -#define ICE_ROUTER_INFO_F_H +#pragma once #include <IceUtil/Shared.h> @@ -26,5 +25,3 @@ IceUtil::Shared* upCast(RouterInfo*); typedef Handle<RouterInfo> RouterInfoPtr; } - -#endif diff --git a/cpp/src/Ice/Selector.h b/cpp/src/Ice/Selector.h index 4ba45a9e4f3..cf3e152ff55 100644 --- a/cpp/src/Ice/Selector.h +++ b/cpp/src/Ice/Selector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SELECTOR_H -#define ICE_SELECTOR_H +#pragma once #include <IceUtil/StringUtil.h> @@ -225,5 +224,3 @@ private: #endif } - -#endif diff --git a/cpp/src/Ice/ServantManager.h b/cpp/src/Ice/ServantManager.h index 5ee56eb4e02..3f2f63402e8 100644 --- a/cpp/src/Ice/ServantManager.h +++ b/cpp/src/Ice/ServantManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVANT_MANAGER_H -#define ICE_SERVANT_MANAGER_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -70,5 +69,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 3a47db215e1..196e31ae6b7 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -852,16 +852,16 @@ Ice::Service::main(int argc, char* const argv[], const InitializationData& initi int Ice::Service::main(int& argc, wchar_t* argv[], const InitializationData& initializationData) { -#ifdef __BCPLUSPLUS__ // COMPILER FIX + +# ifdef __MINGW32__ // COMPILER FIX // - // BCC doesn't see the main overload if we don't create the temp args object here. + // MinGW doesn't see the main overload if we don't create the temp args object here. // Ice::StringSeq args = Ice::argsToStringSeq(argc, argv, initializationData.stringConverter); return main(args, initializationData); -#else +# else return main(Ice::argsToStringSeq(argc, argv, initializationData.stringConverter), initializationData); -#endif - +# endif } #endif diff --git a/cpp/src/Ice/SharedContext.h b/cpp/src/Ice/SharedContext.h index 48910f7270b..8e906d8527e 100644 --- a/cpp/src/Ice/SharedContext.h +++ b/cpp/src/Ice/SharedContext.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SHARED_CONTEXT_H -#define ICE_SHARED_CONTEXT_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -47,5 +46,3 @@ private: }; typedef IceUtil::Handle<SharedContext> SharedContextPtr; } - -#endif diff --git a/cpp/src/Ice/StreamI.h b/cpp/src/Ice/StreamI.h index 80b89408eac..299e8a2bf02 100644 --- a/cpp/src/Ice/StreamI.h +++ b/cpp/src/Ice/StreamI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STREAM_I_H -#define ICE_STREAM_I_H +#pragma once #include <Ice/Stream.h> @@ -175,5 +174,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp index f8e385e7a23..35269b6cf23 100644 --- a/cpp/src/Ice/StringConverter.cpp +++ b/cpp/src/Ice/StringConverter.cpp @@ -16,10 +16,15 @@ #include <Ice/LocalException.h> #include <Ice/LoggerUtil.h> #include <Ice/Communicator.h> + #ifndef _WIN32 #include <Ice/IconvStringConverter.h> #endif +#ifdef __MINGW32__ +# include <limits.h> +#endif + using namespace IceUtil; using namespace IceUtilInternal; using namespace std; diff --git a/cpp/src/Ice/SysLoggerI.h b/cpp/src/Ice/SysLoggerI.h index 5074f6af57f..7675fb77fe7 100644 --- a/cpp/src/Ice/SysLoggerI.h +++ b/cpp/src/Ice/SysLoggerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SYS_LOGGER_I_H -#define ICE_SYS_LOGGER_I_H +#pragma once #include <IceUtil/Mutex.h> #include <Ice/Logger.h> @@ -37,5 +36,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp index 0fc4fbc710c..8453863a25b 100644 --- a/cpp/src/Ice/TcpAcceptor.cpp +++ b/cpp/src/Ice/TcpAcceptor.cpp @@ -126,7 +126,7 @@ IceInternal::TcpAcceptor::startAccept() void IceInternal::TcpAcceptor::finishAccept() { - if(_info.count == SOCKET_ERROR || _fd == INVALID_SOCKET) + if(static_cast<int>(_info.count) == SOCKET_ERROR || _fd == INVALID_SOCKET) { closeSocketNoThrow(_acceptFd); _acceptFd = INVALID_SOCKET; diff --git a/cpp/src/Ice/TcpAcceptor.h b/cpp/src/Ice/TcpAcceptor.h index c54ae4dbb27..8f4a8f78cc6 100644 --- a/cpp/src/Ice/TcpAcceptor.h +++ b/cpp/src/Ice/TcpAcceptor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_ACCEPTOR_H -#define ICE_TCP_ACCEPTOR_H +#pragma once #include <Ice/TransceiverF.h> #include <Ice/InstanceF.h> @@ -64,5 +63,4 @@ private: }; } -#endif diff --git a/cpp/src/Ice/TcpConnector.h b/cpp/src/Ice/TcpConnector.h index 341696087ef..422c36083b0 100644 --- a/cpp/src/Ice/TcpConnector.h +++ b/cpp/src/Ice/TcpConnector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_CONNECTOR_H -#define ICE_TCP_CONNECTOR_H +#pragma once #include <Ice/TransceiverF.h> #include <Ice/InstanceF.h> @@ -52,5 +51,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/TcpEndpointI.h b/cpp/src/Ice/TcpEndpointI.h index c92f14c1374..389c94fc0cc 100644 --- a/cpp/src/Ice/TcpEndpointI.h +++ b/cpp/src/Ice/TcpEndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_ENDPOINT_I_H -#define ICE_TCP_ENDPOINT_I_H +#pragma once #include <IceUtil/Config.h> #include <Ice/EndpointI.h> @@ -85,5 +84,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp index 3d59ae68bf1..61fda069922 100644 --- a/cpp/src/Ice/TcpTransceiver.cpp +++ b/cpp/src/Ice/TcpTransceiver.cpp @@ -313,7 +313,7 @@ IceInternal::TcpTransceiver::finishWrite(Buffer& buf) return; } - if(_write.count == SOCKET_ERROR) + if(static_cast<int>(_write.count) == SOCKET_ERROR) { WSASetLastError(_write.error); if(connectionLost()) @@ -385,7 +385,7 @@ IceInternal::TcpTransceiver::startRead(Buffer& buf) void IceInternal::TcpTransceiver::finishRead(Buffer& buf) { - if(_read.count == SOCKET_ERROR) + if(static_cast<int>(_read.count) == SOCKET_ERROR) { WSASetLastError(_read.error); if(connectionLost()) diff --git a/cpp/src/Ice/TcpTransceiver.h b/cpp/src/Ice/TcpTransceiver.h index 82099820416..01fd7ac3d11 100644 --- a/cpp/src/Ice/TcpTransceiver.h +++ b/cpp/src/Ice/TcpTransceiver.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_TRANSCEIVER_H -#define ICE_TCP_TRANSCEIVER_H +#pragma once #include <Ice/InstanceF.h> #include <Ice/TraceLevelsF.h> @@ -81,5 +80,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index 3802d3a75e0..e46f244dce1 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_THREAD_POOL_H -#define ICE_THREAD_POOL_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Mutex.h> @@ -338,7 +337,7 @@ public: // of the event handler. We need to lock the event handler here to call // finishMessage. // -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) IceUtil::LockT<T> sync(_mutex); #else IceUtil::LockT<typename T> sync(_mutex); @@ -356,6 +355,3 @@ private: #endif }; - - -#endif diff --git a/cpp/src/Ice/ThreadPoolF.h b/cpp/src/Ice/ThreadPoolF.h index 0c44f48db9a..a658181cf6c 100644 --- a/cpp/src/Ice/ThreadPoolF.h +++ b/cpp/src/Ice/ThreadPoolF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_THREAD_POOL_F_H -#define ICE_THREAD_POOL_F_H +#pragma once #include <IceUtil/Shared.h> @@ -28,5 +27,3 @@ typedef Handle<ThreadPoolWorkItem> ThreadPoolWorkItemPtr; class ThreadPoolCurrent; } - -#endif diff --git a/cpp/src/Ice/TraceLevels.h b/cpp/src/Ice/TraceLevels.h index c562c3e4be4..34841ab0a9f 100644 --- a/cpp/src/Ice/TraceLevels.h +++ b/cpp/src/Ice/TraceLevels.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TRACE_LEVELS_H -#define ICE_TRACE_LEVELS_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/TraceLevelsF.h> @@ -46,5 +45,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/TraceLevelsF.h b/cpp/src/Ice/TraceLevelsF.h index da3a12d0b98..42dc6fc5380 100644 --- a/cpp/src/Ice/TraceLevelsF.h +++ b/cpp/src/Ice/TraceLevelsF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TRACE_LEVELS_F_H -#define ICE_TRACE_LEVELS_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(TraceLevels*); typedef Handle<TraceLevels> TraceLevelsPtr; } - -#endif diff --git a/cpp/src/Ice/TraceUtil.h b/cpp/src/Ice/TraceUtil.h index c45cb8b01a0..c0b787a4921 100644 --- a/cpp/src/Ice/TraceUtil.h +++ b/cpp/src/Ice/TraceUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TRACE_UTIL_H -#define ICE_TRACE_UTIL_H +#pragma once #include <Ice/LoggerF.h> #include <Ice/TraceLevelsF.h> @@ -24,5 +23,3 @@ void trace(const char*, const BasicStream&, const ::Ice::LoggerPtr&, const Trace void traceSlicing(const char*, const ::std::string&, const char *, const ::Ice::LoggerPtr&); } - -#endif diff --git a/cpp/src/Ice/Transceiver.h b/cpp/src/Ice/Transceiver.h index 3cf9b9d867a..5c48034ab45 100644 --- a/cpp/src/Ice/Transceiver.h +++ b/cpp/src/Ice/Transceiver.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TRANSCEIVER_H -#define ICE_TRANSCEIVER_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/TransceiverF.h> @@ -42,5 +41,3 @@ public: }; } - -#endif diff --git a/cpp/src/Ice/TransceiverF.h b/cpp/src/Ice/TransceiverF.h index 0c6eae51720..407540d0c9d 100644 --- a/cpp/src/Ice/TransceiverF.h +++ b/cpp/src/Ice/TransceiverF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TRANSCEIVER_F_H -#define ICE_TRANSCEIVER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ ICE_API IceUtil::Shared* upCast(Transceiver*); typedef Handle<Transceiver> TransceiverPtr; } - -#endif diff --git a/cpp/src/Ice/UdpConnector.h b/cpp/src/Ice/UdpConnector.h index 148c767407b..92011e4a9a5 100644 --- a/cpp/src/Ice/UdpConnector.h +++ b/cpp/src/Ice/UdpConnector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UDP_CONNECTOR_H -#define ICE_UDP_CONNECTOR_H +#pragma once #include <Ice/TransceiverF.h> #include <Ice/InstanceF.h> @@ -50,4 +49,3 @@ private: }; } -#endif diff --git a/cpp/src/Ice/UdpEndpointI.h b/cpp/src/Ice/UdpEndpointI.h index c82ef8aa2fb..7f278646416 100644 --- a/cpp/src/Ice/UdpEndpointI.h +++ b/cpp/src/Ice/UdpEndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UDP_ENDPOINT_I_H -#define ICE_UDP_ENDPOINT_I_H +#pragma once #include <IceUtil/Config.h> #include <Ice/EndpointI.h> @@ -87,5 +86,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index 855527b144d..b1aa39ddd96 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -545,7 +545,7 @@ IceInternal::UdpTransceiver::finishWrite(Buffer& buf) return; } - if(_write.count == SOCKET_ERROR) + if(static_cast<int>(_write.count) == SOCKET_ERROR) { #ifndef ICE_OS_WINRT WSASetLastError(_write.error); @@ -675,7 +675,7 @@ IceInternal::UdpTransceiver::finishRead(Buffer& buf) checkErrorCode(__FILE__, __LINE__, ex->HResult); } #else - if(_read.count == SOCKET_ERROR) + if(static_cast<int>(_read.count) == SOCKET_ERROR) { WSASetLastError(_read.error); diff --git a/cpp/src/Ice/UdpTransceiver.h b/cpp/src/Ice/UdpTransceiver.h index 0a1fc7155ba..a189f5263f9 100644 --- a/cpp/src/Ice/UdpTransceiver.h +++ b/cpp/src/Ice/UdpTransceiver.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_UDP_TRANSCEIVER_H -#define ICE_UDP_TRANSCEIVER_H +#pragma once #include <Ice/InstanceF.h> #include <Ice/TraceLevelsF.h> @@ -117,4 +116,4 @@ private: }; } -#endif + diff --git a/cpp/src/Ice/winrt/StreamAcceptor.h b/cpp/src/Ice/winrt/StreamAcceptor.h index d5f84422442..f18d5f3439e 100644 --- a/cpp/src/Ice/winrt/StreamAcceptor.h +++ b/cpp/src/Ice/winrt/StreamAcceptor.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STREAM_ACCEPTOR_H -#define ICE_STREAM_ACCEPTOR_H +#pragma once #include <Ice/TransceiverF.h> #include <Ice/InstanceF.h> @@ -65,5 +64,3 @@ private: }; } -#endif - diff --git a/cpp/src/Ice/winrt/StreamConnector.h b/cpp/src/Ice/winrt/StreamConnector.h index ab156177e55..6a316792c06 100644 --- a/cpp/src/Ice/winrt/StreamConnector.h +++ b/cpp/src/Ice/winrt/StreamConnector.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_CONNECTOR_H -#define ICE_TCP_CONNECTOR_H +#pragma once #include <Ice/TransceiverF.h> #include <Ice/InstanceF.h> @@ -52,5 +51,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/winrt/StreamEndpointI.h b/cpp/src/Ice/winrt/StreamEndpointI.h index 6d102ff3647..cd7a4cc6549 100644 --- a/cpp/src/Ice/winrt/StreamEndpointI.h +++ b/cpp/src/Ice/winrt/StreamEndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_TCP_ENDPOINT_I_H -#define ICE_TCP_ENDPOINT_I_H +#pragma once #include <IceUtil/Config.h> #include <Ice/EndpointI.h> @@ -86,5 +85,3 @@ private: }; } - -#endif diff --git a/cpp/src/Ice/winrt/StreamTransceiver.h b/cpp/src/Ice/winrt/StreamTransceiver.h index 11d27eee6ff..ffab6874589 100644 --- a/cpp/src/Ice/winrt/StreamTransceiver.h +++ b/cpp/src/Ice/winrt/StreamTransceiver.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STREAM_TRANSCEIVER_H -#define ICE_STREAM_TRANSCEIVER_H +#pragma once #include <Ice/InstanceF.h> #include <Ice/TraceLevelsF.h> @@ -89,5 +88,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 875ad497aef..89d8512c663 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -23,8 +23,7 @@ public: virtual int run(int, char*[]); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceBox/Service.cpp b/cpp/src/IceBox/Service.cpp index 0bf9dcf6b08..5f04478359d 100644 --- a/cpp/src/IceBox/Service.cpp +++ b/cpp/src/IceBox/Service.cpp @@ -136,8 +136,7 @@ IceBox::IceBoxService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceBox/ServiceManagerI.h b/cpp/src/IceBox/ServiceManagerI.h index 0d381d009b6..a613ae1b3f8 100644 --- a/cpp/src/IceBox/ServiceManagerI.h +++ b/cpp/src/IceBox/ServiceManagerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SERVICE_MANAGER_I_H -#define SERVICE_MANAGER_I_H +#pragma once #include <IceBox/IceBox.h> #include <Ice/LoggerF.h> @@ -86,5 +85,3 @@ private: typedef IceUtil::Handle<ServiceManagerI> ServiceManagerIPtr; } - -#endif diff --git a/cpp/src/IceDB/FreezeTypes.h b/cpp/src/IceDB/FreezeTypes.h index c454d1752fe..e09763cd232 100644 --- a/cpp/src/IceDB/FreezeTypes.h +++ b/cpp/src/IceDB/FreezeTypes.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_TYPES_H -#define FREEZE_TYPES_H +#pragma once #include <IceDB/IceDB.h> #include <Freeze/Freeze.h> @@ -204,6 +203,3 @@ protected: }; } - -#endif - diff --git a/cpp/src/IceDB/IceDB.h b/cpp/src/IceDB/IceDB.h index 86a671961cd..ea7ea21c073 100644 --- a/cpp/src/IceDB/IceDB.h +++ b/cpp/src/IceDB/IceDB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_DB_H -#define ICE_DB_H +#pragma once #include <IceUtil/Exception.h> #include <IceUtil/Shared.h> @@ -118,5 +117,3 @@ public: }; }; - -#endif diff --git a/cpp/src/IceDB/SqlTypes.h b/cpp/src/IceDB/SqlTypes.h index bdc37790091..764556699ff 100644 --- a/cpp/src/IceDB/SqlTypes.h +++ b/cpp/src/IceDB/SqlTypes.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_TYPES_H -#define SQL_TYPES_H +#pragma once #include <IceDB/IceDB.h> @@ -202,5 +201,3 @@ protected: }; } - -#endif diff --git a/cpp/src/IceGrid/Activator.h b/cpp/src/IceGrid/Activator.h index 99af1b1fa84..3e0ecc14c6e 100644 --- a/cpp/src/IceGrid/Activator.h +++ b/cpp/src/IceGrid/Activator.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ACTIVATOR_H -#define ICE_GRID_ACTIVATOR_H +#pragma once #include <IceUtil/Thread.h> #include <IceGrid/Internal.h> @@ -95,5 +94,3 @@ private: typedef IceUtil::Handle<Activator> ActivatorPtr; } - -#endif diff --git a/cpp/src/IceGrid/AdapterCache.h b/cpp/src/IceGrid/AdapterCache.h index 9a42d62b645..9a466b37933 100644 --- a/cpp/src/IceGrid/AdapterCache.h +++ b/cpp/src/IceGrid/AdapterCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ADAPTERCACHE_H -#define ICE_GRID_ADAPTERCACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -146,5 +145,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/AdminCallbackRouter.h b/cpp/src/IceGrid/AdminCallbackRouter.h index 1626ecc6718..0affceba9ef 100644 --- a/cpp/src/IceGrid/AdminCallbackRouter.h +++ b/cpp/src/IceGrid/AdminCallbackRouter.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ADMIN_CALLBACK_ROUTER_H -#define ICE_GRID_ADMIN_CALLBACK_ROUTER_H +#pragma once #include <Ice/Ice.h> #include <IceUtil/IceUtil.h> @@ -42,4 +41,3 @@ private: typedef IceUtil::Handle<AdminCallbackRouter> AdminCallbackRouterPtr; } -#endif diff --git a/cpp/src/IceGrid/AdminI.h b/cpp/src/IceGrid/AdminI.h index 14bb30ea639..5ed1c5ee11c 100644 --- a/cpp/src/IceGrid/AdminI.h +++ b/cpp/src/IceGrid/AdminI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ADMIN_I_H -#define ICE_GRID_ADMIN_I_H +#pragma once #include <IceGrid/Admin.h> @@ -102,5 +101,3 @@ private: typedef IceUtil::Handle<AdminI> AdminIPtr; } - -#endif diff --git a/cpp/src/IceGrid/AdminSessionI.h b/cpp/src/IceGrid/AdminSessionI.h index ff234953ab3..65a699fa3fd 100644 --- a/cpp/src/IceGrid/AdminSessionI.h +++ b/cpp/src/IceGrid/AdminSessionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_ADMINSESSIONI_H -#define ICEGRID_ADMINSESSIONI_H +#pragma once #include <IceGrid/SessionI.h> #include <IceGrid/Topics.h> @@ -147,5 +146,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/Allocatable.h b/cpp/src/IceGrid/Allocatable.h index bcbc018053e..12f1bd25f91 100644 --- a/cpp/src/IceGrid/Allocatable.h +++ b/cpp/src/IceGrid/Allocatable.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ALLOCATABLE_H -#define ICE_GRID_ALLOCATABLE_H +#pragma once #include <IceUtil/Handle.h> #include <IceUtil/Mutex.h> @@ -113,5 +112,3 @@ protected: }; }; - -#endif diff --git a/cpp/src/IceGrid/AllocatableObjectCache.h b/cpp/src/IceGrid/AllocatableObjectCache.h index ef304e712ea..a00c1dd24c6 100644 --- a/cpp/src/IceGrid/AllocatableObjectCache.h +++ b/cpp/src/IceGrid/AllocatableObjectCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_ALLOCATABLEOBJECTCACHE_H -#define ICE_GRID_ALLOCATABLEOBJECTCACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <Ice/CommunicatorF.h> @@ -114,5 +113,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/Cache.h b/cpp/src/IceGrid/Cache.h index 6e85ed1044c..e1bf02705e3 100644 --- a/cpp/src/IceGrid/Cache.h +++ b/cpp/src/IceGrid/Cache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_CACHE_H -#define ICE_GRID_CACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -155,5 +154,3 @@ public: }; }; - -#endif diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 7b32674b6fe..1b38c97dfbe 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -183,8 +183,7 @@ interruptCallback(int signal) } } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/DB.h b/cpp/src/IceGrid/DB.h index 0615f25eecc..eb9607b33f4 100644 --- a/cpp/src/IceGrid/DB.h +++ b/cpp/src/IceGrid/DB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef DATABASE_CACHE_H -#define DATABASE_CACHE_H +#pragma once #include <Ice/Plugin.h> #include <IceDB/IceDB.h> @@ -58,6 +57,3 @@ public: typedef IceUtil::Handle<DatabasePlugin> DatabasePluginPtr; } - - -#endif diff --git a/cpp/src/IceGrid/Database.h b/cpp/src/IceGrid/Database.h index 18c0b337fe5..bd437619dcf 100644 --- a/cpp/src/IceGrid/Database.h +++ b/cpp/src/IceGrid/Database.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_DATABASE_H -#define ICE_GRID_DATABASE_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -237,5 +236,3 @@ private: typedef IceUtil::Handle<Database> DatabasePtr; }; - -#endif diff --git a/cpp/src/IceGrid/DescriptorBuilder.h b/cpp/src/IceGrid/DescriptorBuilder.h index 8472e4bf4fd..3ce9b7ab64b 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.h +++ b/cpp/src/IceGrid/DescriptorBuilder.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_DESCRIPTOR_BUILDER_H -#define ICE_GRID_DESCRIPTOR_BUILDER_H +#pragma once #include <Ice/Logger.h> #include <IceXML/Parser.h> @@ -311,5 +310,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h index dbc72e919c9..b2b012c5e49 100644 --- a/cpp/src/IceGrid/DescriptorHelper.h +++ b/cpp/src/IceGrid/DescriptorHelper.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_DESCRIPTOR_HELPER_H -#define ICE_GRID_DESCRIPTOR_HELPER_H +#pragma once #include <IceUtil/OutputUtil.h> #include <IceXML/Parser.h> @@ -344,5 +343,3 @@ bool descriptorEqual(const ServerDescriptorPtr&, const ServerDescriptorPtr&); ServerHelperPtr createHelper(const ServerDescriptorPtr&); } - -#endif diff --git a/cpp/src/IceGrid/DescriptorParser.h b/cpp/src/IceGrid/DescriptorParser.h index ed808d01ad3..3404a87f7cb 100644 --- a/cpp/src/IceGrid/DescriptorParser.h +++ b/cpp/src/IceGrid/DescriptorParser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_DESCRIPTOR_PARSER_H -#define ICEGRID_DESCRIPTOR_PARSER_H +#pragma once namespace IceGrid { @@ -28,5 +27,3 @@ public: }; } - -#endif diff --git a/cpp/src/IceGrid/FileCache.h b/cpp/src/IceGrid/FileCache.h index eeded1132a2..70de97d1d09 100644 --- a/cpp/src/IceGrid/FileCache.h +++ b/cpp/src/IceGrid/FileCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_FILE_CACHE_H -#define ICE_GRID_FILE_CACHE_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/BuiltinSequences.h> @@ -33,5 +32,3 @@ private: typedef IceUtil::Handle<FileCache> FileCachePtr; }; - -#endif diff --git a/cpp/src/IceGrid/FileParserI.h b/cpp/src/IceGrid/FileParserI.h index 811236ed729..11c2b63f407 100644 --- a/cpp/src/IceGrid/FileParserI.h +++ b/cpp/src/IceGrid/FileParserI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_FILE_PARSERI_H -#define ICE_GRID_FILE_PARSERI_H +#pragma once #include <IceGrid/FileParser.h> @@ -19,5 +18,3 @@ public: IceGrid::ApplicationDescriptor parse(const std::string& file, const IceGrid::AdminPrx& admin, const Ice::Current&); }; - -#endif diff --git a/cpp/src/IceGrid/FileUserAccountMapperI.h b/cpp/src/IceGrid/FileUserAccountMapperI.h index f2e978ab102..4112621bd88 100644 --- a/cpp/src/IceGrid/FileUserAccountMapperI.h +++ b/cpp/src/IceGrid/FileUserAccountMapperI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_FILEUSERACCOUNTMAPPERI_H -#define ICE_GRID_FILEUSERACCOUNTMAPPERI_H +#pragma once #include <IceGrid/UserAccountMapper.h> @@ -29,5 +28,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/FreezeDB/FreezeDB.h b/cpp/src/IceGrid/FreezeDB/FreezeDB.h index e86c5bd3e69..47bcbb9fc22 100644 --- a/cpp/src/IceGrid/FreezeDB/FreezeDB.h +++ b/cpp/src/IceGrid/FreezeDB/FreezeDB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_DATABASE_CACHE_H -#define FREEZE_DATABASE_CACHE_H +#pragma once #include <IceDB/FreezeTypes.h> @@ -48,5 +47,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 91d1345ecfd..0c26b17ceda 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -833,8 +833,7 @@ NodeService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index 979e6a9331a..5bb1e4374dd 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -201,8 +201,7 @@ RegistryService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/InternalRegistryI.h b/cpp/src/IceGrid/InternalRegistryI.h index 613bbef367c..42400f346b3 100644 --- a/cpp/src/IceGrid/InternalRegistryI.h +++ b/cpp/src/IceGrid/InternalRegistryI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_INTERNALREGISTRYI_H -#define ICE_GRID_INTERNALREGISTRYI_H +#pragma once #include <IceGrid/Registry.h> #include <IceGrid/Internal.h> @@ -73,5 +72,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/LocatorI.h b/cpp/src/IceGrid/LocatorI.h index 6e5fb87618b..1ea9447380e 100644 --- a/cpp/src/IceGrid/LocatorI.h +++ b/cpp/src/IceGrid/LocatorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_LOCATOR_I_H -#define ICE_GRID_LOCATOR_I_H +#pragma once #include <IceGrid/Internal.h> #include <IceGrid/Locator.h> @@ -80,5 +79,3 @@ protected: }; } - -#endif diff --git a/cpp/src/IceGrid/LocatorRegistryI.h b/cpp/src/IceGrid/LocatorRegistryI.h index 7d4065034d8..44bc8e7007d 100644 --- a/cpp/src/IceGrid/LocatorRegistryI.h +++ b/cpp/src/IceGrid/LocatorRegistryI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_LOCATOR_REGISTRY_I_H -#define ICE_GRID_LOCATOR_REGISTRY_I_H +#pragma once #include <IceGrid/Internal.h> #include <Ice/Locator.h> @@ -55,5 +54,3 @@ private: typedef IceUtil::Handle<LocatorRegistryI> LocatorRegistryIPtr; } - -#endif diff --git a/cpp/src/IceGrid/NodeCache.h b/cpp/src/IceGrid/NodeCache.h index a00f2ce3ba2..03b3a1a914d 100644 --- a/cpp/src/IceGrid/NodeCache.h +++ b/cpp/src/IceGrid/NodeCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_NODECACHE_H -#define ICE_GRID_NODECACHE_H +#pragma once #include <IceUtil/RecMutex.h> #include <IceUtil/Shared.h> @@ -104,5 +103,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/NodeI.h b/cpp/src/IceGrid/NodeI.h index fa9a90c09f0..4d29d853147 100644 --- a/cpp/src/IceGrid/NodeI.h +++ b/cpp/src/IceGrid/NodeI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_NODE_I_H -#define ICE_GRID_NODE_I_H +#pragma once #include <IceUtil/Timer.h> #include <IcePatch2/FileServer.h> @@ -175,5 +174,3 @@ private: typedef IceUtil::Handle<NodeI> NodeIPtr; } - -#endif diff --git a/cpp/src/IceGrid/NodeServerAdminRouter.h b/cpp/src/IceGrid/NodeServerAdminRouter.h index c649a874152..744e13af22d 100644 --- a/cpp/src/IceGrid/NodeServerAdminRouter.h +++ b/cpp/src/IceGrid/NodeServerAdminRouter.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_NODE_SERVER_ADMIN_ROUTER_H -#define ICE_GRID_NODE_SERVER_ADMIN_ROUTER_H +#pragma once #include <IceGrid/NodeI.h> @@ -29,4 +28,3 @@ private: NodeIPtr _node; }; } -#endif diff --git a/cpp/src/IceGrid/NodeSessionI.h b/cpp/src/IceGrid/NodeSessionI.h index 4e813f26332..55c18fc8e81 100644 --- a/cpp/src/IceGrid/NodeSessionI.h +++ b/cpp/src/IceGrid/NodeSessionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_NODE_SESSION_H -#define ICEGRID_NODE_SESSION_H +#pragma once #include <IceGrid/Internal.h> #include <set> @@ -101,5 +100,3 @@ private: typedef IceUtil::Handle<NodeSessionI> NodeSessionIPtr; }; - -#endif diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h index 71bd1d032ea..2d8c4694345 100644 --- a/cpp/src/IceGrid/NodeSessionManager.h +++ b/cpp/src/IceGrid/NodeSessionManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_NODE_SESSION_MANAGER_H -#define ICE_GRID_NODE_SESSION_MANAGER_H +#pragma once #include <IceUtil/Handle.h> #include <IceUtil/Mutex.h> @@ -137,5 +136,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/ObjectCache.h b/cpp/src/IceGrid/ObjectCache.h index 523b90f231e..c1e77dd5e9c 100644 --- a/cpp/src/IceGrid/ObjectCache.h +++ b/cpp/src/IceGrid/ObjectCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_OBJECTCACHE_H -#define ICE_GRID_OBJECTCACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <Ice/CommunicatorF.h> @@ -81,5 +80,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h index f53b3a94002..fb5491a2c36 100644 --- a/cpp/src/IceGrid/Parser.h +++ b/cpp/src/IceGrid/Parser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_PARSER_H -#define ICE_GRID_PARSER_H +#pragma once #include <IceUtil/Handle.h> #include <IceGrid/Admin.h> @@ -165,5 +164,3 @@ private: extern Parser* parser; // The current parser for bison/flex } - -#endif diff --git a/cpp/src/IceGrid/PlatformInfo.h b/cpp/src/IceGrid/PlatformInfo.h index 1afc7bdb932..1eece75e606 100644 --- a/cpp/src/IceGrid/PlatformInfo.h +++ b/cpp/src/IceGrid/PlatformInfo.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_PLATFORM_INFO_H -#define ICE_GRID_PLATFORM_INFO_H +#pragma once #include <IceUtil/Thread.h> #include <IceGrid/Internal.h> @@ -88,5 +87,3 @@ private: }; - -#endif diff --git a/cpp/src/IceGrid/QueryI.h b/cpp/src/IceGrid/QueryI.h index b64e5cceaac..b1b8baa26c0 100644 --- a/cpp/src/IceGrid/QueryI.h +++ b/cpp/src/IceGrid/QueryI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_QUERY_I_H -#define ICE_GRID_QUERY_I_H +#pragma once #include <IceGrid/Query.h> #include <Ice/CommunicatorF.h> @@ -44,5 +43,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/ReapThread.h b/cpp/src/IceGrid/ReapThread.h index 9d4322dd3d6..2e7906cb6af 100644 --- a/cpp/src/IceGrid/ReapThread.h +++ b/cpp/src/IceGrid/ReapThread.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_REAPER_THREAD_H -#define ICEGRID_REAPER_THREAD_H +#pragma once #include <IceUtil/Thread.h> #include <IceUtil/Mutex.h> @@ -113,5 +112,3 @@ private: typedef IceUtil::Handle<ReapThread> ReapThreadPtr; }; - -#endif diff --git a/cpp/src/IceGrid/RegistryI.h b/cpp/src/IceGrid/RegistryI.h index a17dbb729f9..aa9c7fcb68c 100644 --- a/cpp/src/IceGrid/RegistryI.h +++ b/cpp/src/IceGrid/RegistryI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_REGISTRYI_H -#define ICE_GRID_REGISTRYI_H +#pragma once #include <IceUtil/Timer.h> #include <IceGrid/Registry.h> @@ -133,5 +132,3 @@ private: typedef IceUtil::Handle<RegistryI> RegistryIPtr; } - -#endif diff --git a/cpp/src/IceGrid/RegistryServerAdminRouter.h b/cpp/src/IceGrid/RegistryServerAdminRouter.h index 15ed8161626..e8bb41b7c91 100644 --- a/cpp/src/IceGrid/RegistryServerAdminRouter.h +++ b/cpp/src/IceGrid/RegistryServerAdminRouter.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_REGISTRY_SERVER_ADMIN_ROUTER_H -#define ICE_GRID_REGISTRY_SERVER_ADMIN_ROUTER_H +#pragma once #include <IceGrid/Database.h> @@ -31,4 +30,3 @@ private: }; } -#endif diff --git a/cpp/src/IceGrid/ReplicaCache.h b/cpp/src/IceGrid/ReplicaCache.h index 76c9fa5481e..2eaa7c38229 100644 --- a/cpp/src/IceGrid/ReplicaCache.h +++ b/cpp/src/IceGrid/ReplicaCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_REPLICACACHE_H -#define ICE_GRID_REPLICACACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -74,5 +73,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/ReplicaSessionI.h b/cpp/src/IceGrid/ReplicaSessionI.h index 9ca0ead61ac..27dfd08ee68 100644 --- a/cpp/src/IceGrid/ReplicaSessionI.h +++ b/cpp/src/IceGrid/ReplicaSessionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_REPLICA_SESSION_H -#define ICEGRID_REPLICA_SESSION_H +#pragma once #include <IceGrid/Registry.h> #include <IceGrid/Internal.h> @@ -72,5 +71,3 @@ private: typedef IceUtil::Handle<ReplicaSessionI> ReplicaSessionIPtr; }; - -#endif diff --git a/cpp/src/IceGrid/ReplicaSessionManager.h b/cpp/src/IceGrid/ReplicaSessionManager.h index 84d9da6aa61..28f626a45a0 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.h +++ b/cpp/src/IceGrid/ReplicaSessionManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_REPLICA_SESSION_MANAGER_H -#define ICE_GRID_REPLICA_SESSION_MANAGER_H +#pragma once #include <IceUtil/Handle.h> #include <IceUtil/Mutex.h> @@ -109,5 +108,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/ServerAdapterI.h b/cpp/src/IceGrid/ServerAdapterI.h index db4ce4cc3fb..c2ad30f8c9b 100644 --- a/cpp/src/IceGrid/ServerAdapterI.h +++ b/cpp/src/IceGrid/ServerAdapterI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_SERVER_ADAPTER_I_H -#define ICE_GRID_SERVER_ADAPTER_I_H +#pragma once #include <IceUtil/Mutex.h> #include <IceGrid/Internal.h> @@ -56,5 +55,3 @@ private: typedef IceUtil::Handle<ServerAdapterI> ServerAdapterIPtr; } - -#endif diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index c7986a9813e..f1db17fa9b6 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_SERVERCACHE_H -#define ICE_GRID_SERVERCACHE_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> @@ -143,5 +142,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index 591e78854c1..f033a4d8bec 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_SERVER_I_H -#define ICE_GRID_SERVER_I_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Timer.h> @@ -320,5 +319,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/SessionI.h b/cpp/src/IceGrid/SessionI.h index e7ca6f3b863..b1660792e13 100644 --- a/cpp/src/IceGrid/SessionI.h +++ b/cpp/src/IceGrid/SessionI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_SESSIONI_H -#define ICEGRID_SESSIONI_H +#pragma once #include <IceUtil/Mutex.h> #include <IceUtil/Timer.h> @@ -157,5 +156,3 @@ private: }; }; - -#endif diff --git a/cpp/src/IceGrid/SessionManager.h b/cpp/src/IceGrid/SessionManager.h index e23ed3aee6a..756c564cea5 100644 --- a/cpp/src/IceGrid/SessionManager.h +++ b/cpp/src/IceGrid/SessionManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_SESSION_MANAGER_H -#define ICE_GRID_SESSION_MANAGER_H +#pragma once #include <IceUtil/Handle.h> #include <IceUtil/Mutex.h> @@ -314,5 +313,3 @@ protected: }; }; - -#endif diff --git a/cpp/src/IceGrid/SessionServantManager.h b/cpp/src/IceGrid/SessionServantManager.h index 76dfd1f801a..411b9bde459 100644 --- a/cpp/src/IceGrid/SessionServantManager.h +++ b/cpp/src/IceGrid/SessionServantManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_SESSIONSERVANTLOCATOR_H -#define ICE_GRID_SESSIONSERVANTLOCATOR_H +#pragma once #include <IceGrid/AdminCallbackRouter.h> #include <IceUtil/Mutex.h> @@ -84,5 +83,3 @@ private: typedef IceUtil::Handle<SessionServantManager> SessionServantManagerPtr; }; - -#endif diff --git a/cpp/src/IceGrid/SqlDB/SqlDB.h b/cpp/src/IceGrid/SqlDB/SqlDB.h index 06b606d0560..ff3b5ba5110 100644 --- a/cpp/src/IceGrid/SqlDB/SqlDB.h +++ b/cpp/src/IceGrid/SqlDB/SqlDB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_DATABASE_CACHE_H -#define SQL_DATABASE_CACHE_H +#pragma once #include <IceGrid/DB.h> @@ -64,5 +63,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceGrid/SqlDB/SqlIdentityObjectInfoDict.h b/cpp/src/IceGrid/SqlDB/SqlIdentityObjectInfoDict.h index effb29dff56..dbe90d6509a 100644 --- a/cpp/src/IceGrid/SqlDB/SqlIdentityObjectInfoDict.h +++ b/cpp/src/IceGrid/SqlDB/SqlIdentityObjectInfoDict.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_IDENTITY_OBJECT_INFO_DICT_H -#define SQL_IDENTITY_OBJECT_INFO_DICT_H +#pragma once #include <Ice/CommunicatorF.h> #include <IceGrid/Admin.h> @@ -43,5 +42,3 @@ private: typedef IceUtil::Handle<SqlIdentityObjectInfoDict> SqlIdentityObjectInfoDictPtr; } - -#endif diff --git a/cpp/src/IceGrid/SqlDB/SqlStringAdapterInfoDict.h b/cpp/src/IceGrid/SqlDB/SqlStringAdapterInfoDict.h index ab846be3d1f..e30395789b9 100644 --- a/cpp/src/IceGrid/SqlDB/SqlStringAdapterInfoDict.h +++ b/cpp/src/IceGrid/SqlDB/SqlStringAdapterInfoDict.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_STRING_ADAPTER_INFO_DICT_H -#define SQL_STRING_ADAPTER_INFO_DICT_H +#pragma once #include <Ice/CommunicatorF.h> #include <IceGrid/Admin.h> @@ -43,5 +42,3 @@ private: typedef IceUtil::Handle<SqlStringAdapterInfoDict> SqlStringAdapterInfoDictPtr; } - -#endif diff --git a/cpp/src/IceGrid/SqlDB/SqlStringApplicationInfoDict.h b/cpp/src/IceGrid/SqlDB/SqlStringApplicationInfoDict.h index c92d3eb807a..f7452ab9ec0 100644 --- a/cpp/src/IceGrid/SqlDB/SqlStringApplicationInfoDict.h +++ b/cpp/src/IceGrid/SqlDB/SqlStringApplicationInfoDict.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_STRING_APPLICATION_INFO_DICT_H -#define SQL_STRING_APPLICATION_INFO_DICT_H +#pragma once #include <Ice/CommunicatorF.h> #include <IceGrid/Admin.h> @@ -42,5 +41,3 @@ private: typedef IceUtil::Handle<SqlStringApplicationInfoDict> SqlStringApplicationInfoDictPtr; } - -#endif diff --git a/cpp/src/IceGrid/Topics.h b/cpp/src/IceGrid/Topics.h index 7399457d35e..2ee85df44bb 100644 --- a/cpp/src/IceGrid/Topics.h +++ b/cpp/src/IceGrid/Topics.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICEGRID_TOPICS_H -#define ICEGRID_TOPICS_H +#pragma once #include <IceUtil/Mutex.h> #include <IceStorm/IceStorm.h> @@ -161,5 +160,3 @@ private: typedef IceUtil::Handle<ObjectObserverTopic> ObjectObserverTopicPtr; }; - -#endif diff --git a/cpp/src/IceGrid/TraceLevels.h b/cpp/src/IceGrid/TraceLevels.h index a3f687b0ebf..127f378fcec 100644 --- a/cpp/src/IceGrid/TraceLevels.h +++ b/cpp/src/IceGrid/TraceLevels.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_TRACE_LEVELS_H -#define ICE_GRID_TRACE_LEVELS_H +#pragma once #include <IceUtil/Shared.h> #include <Ice/CommunicatorF.h> @@ -60,5 +59,3 @@ public: typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; } // End namespace IceGrid - -#endif diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index 9ba84619693..c15ec35e0c3 100755 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_UTIL_H -#define ICE_GRID_UTIL_H +#pragma once #include <IceGrid/Descriptor.h> #include <IceUtil/StringUtil.h> @@ -118,5 +117,3 @@ inline getMatchingKeys(const T& m, const std::string& expression) } }; - -#endif diff --git a/cpp/src/IceGrid/WaitQueue.h b/cpp/src/IceGrid/WaitQueue.h index 09691c9c04b..83345b2f171 100644 --- a/cpp/src/IceGrid/WaitQueue.h +++ b/cpp/src/IceGrid/WaitQueue.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_WAIT_QUEUE_H -#define ICE_GRID_WAIT_QUEUE_H +#pragma once #include <IceUtil/Thread.h> #include <IceUtil/Monitor.h> @@ -58,5 +57,3 @@ private: typedef IceUtil::Handle<WaitQueue> WaitQueuePtr; } - -#endif diff --git a/cpp/src/IceGrid/WellKnownObjectsManager.h b/cpp/src/IceGrid/WellKnownObjectsManager.h index 5ef741840b4..fd1661150fc 100644 --- a/cpp/src/IceGrid/WellKnownObjectsManager.h +++ b/cpp/src/IceGrid/WellKnownObjectsManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_GRID_WELL_KNOWN_OBJECTS_MANAGER_H -#define ICE_GRID_WELL_KNOWN_OBJECTS_MANAGER_H +#pragma once #include <IceGrid/Internal.h> @@ -47,5 +46,3 @@ private: typedef IceUtil::Handle<WellKnownObjectsManager> WellKnownObjectsManagerPtr; }; - -#endif diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index e6c4c470e6e..549a07f2659 100755 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp @@ -111,8 +111,7 @@ usage(const string& appName) ; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp index 4fdad194b8a..e8ea78897b2 100644 --- a/cpp/src/IcePatch2/Client.cpp +++ b/cpp/src/IcePatch2/Client.cpp @@ -326,8 +326,7 @@ Client::usage(const string& appName) cerr << options << endl; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IcePatch2/FileServerI.h b/cpp/src/IcePatch2/FileServerI.h index 5f32dcddafd..ba9190b2b88 100644 --- a/cpp/src/IcePatch2/FileServerI.h +++ b/cpp/src/IcePatch2/FileServerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_PATCH2_FILE_SERVER_I_H -#define ICE_PATCH2_FILE_SERVER_I_H +#pragma once #include <IcePatch2/Util.h> #include <IcePatch2/FileServer.h> @@ -38,5 +37,3 @@ private: }; } - -#endif diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp index b7a871719fd..7bdc7376629 100644 --- a/cpp/src/IcePatch2/Server.cpp +++ b/cpp/src/IcePatch2/Server.cpp @@ -213,18 +213,8 @@ IcePatch2::PatcherService::usage(const string& appName) #ifdef _WIN32 -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#ifdef __BCCPLUSPLUS__ - -int -main(int argc, char* argv[]) - -#else - int wmain(int argc, wchar_t* argv[]) - -#endif { IcePatch2::PatcherService svc; int status = EXIT_FAILURE; diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index ad3cfc797eb..3f5713be7c1 100755 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -492,51 +492,13 @@ IcePatch2::readDirectory(const string& pa) StringSeq result; const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); -# ifdef __BCPLUSPLUS__ - struct _wffblk data; - int h = _wfindfirst(fs.c_str(), &data, FA_DIREC); - if(h == -1) - { - if(_doserrno == ENMFILE) - { - return result; - } - throw "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - } - - - while(true) - { - string name = IceUtil::wstringToString(data.ff_name); - assert(!name.empty()); - - if(name != ".." && name != ".") - { - result.push_back(name); - } - - if(_wfindnext(&data) == -1) - { - if(errno == ENOENT) - { - break; - } - - string ex = "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - _wfindclose(&data); - throw ex; - } - } - - _wfindclose(&data); -# else struct _wfinddata_t data; -# if defined(_MSC_VER) && (_MSC_VER < 1300) +# if defined(_MSC_VER) && (_MSC_VER < 1300) long h = _wfindfirst(fs.c_str(), &data); -# else +# else intptr_t h = _wfindfirst(fs.c_str(), &data); -# endif +# endif if(h == -1) { throw "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); @@ -566,7 +528,6 @@ IcePatch2::readDirectory(const string& pa) } _findclose(h); -# endif sort(result.begin(), result.end()); return result; @@ -729,54 +690,6 @@ IcePatch2::decompressFile(const string& pa) throw "cannot open `" + pathBZ2 + "' for reading:\n" + IceUtilInternal::lastErrorToString(); } -#ifdef __BCPLUSPLUS__ - // - // The BZ2_bzReadOpen/BZ2_bzRead/BZ2_bzReadClose functions fail with BCC - // - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(pathBZ2, &buf) == -1) - { - throw "cannot stat `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq compressedBytes(buf.st_size); - if(fread(&compressedBytes[0], buf.st_size, 1, stdioFileBZ2) != 1) - { - throw "cannot read from `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq uncompressedBytes; - unsigned int uncompressedLen = buf.st_size * 2; - while(true) - { - uncompressedBytes.resize(uncompressedLen); - int bzError = BZ2_bzBuffToBuffDecompress(&uncompressedBytes[0], &uncompressedLen, &compressedBytes[0], - buf.st_size, 0, 0); - if(bzError == BZ_OK) - { - break; - } - else if(bzError == BZ_OUTBUFF_FULL) - { - uncompressedLen *= 2; - continue; - } - else - { - string ex = "BZ2_bzBuffToBuffDecompress failed"; - if(bzError == BZ_IO_ERROR) - { - ex += string(": ") + IceUtilInternal::lastErrorToString(); - } - throw ex; - } - } - - if(fwrite(&uncompressedBytes[0], uncompressedLen, 1, fp) != 1) - { - throw "cannot write to `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - } -#else bzFile = BZ2_bzReadOpen(&bzError, stdioFileBZ2, 0, 0, 0, 0); if(bzError != BZ_OK) { @@ -830,7 +743,6 @@ IcePatch2::decompressFile(const string& pa) } throw ex; } -#endif } catch(...) { @@ -1021,66 +933,12 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G if(buf.st_size != 0) { -#ifdef __BCPLUSPLUS__ - // - // The BZ2_bzWriteOpen/BZ2_bzWrite/BZ2_bzWriteClose functions fail with BCC - // - if(doCompress) - { - int fd = IceUtilInternal::open(path.c_str(), O_BINARY|O_RDONLY); - if(fd == -1) - { - throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq uncompressedBytes(buf.st_size); - - if(read(fd, &uncompressedBytes[0], buf.st_size) == -1) - { - close(fd); - throw "cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - } - - unsigned int compressedLen = buf.st_size * 1.01 + 600; - ByteSeq compressedBytes(compressedLen); - - int bzError = BZ2_bzBuffToBuffCompress(&compressedBytes[0], &compressedLen, - &uncompressedBytes[0], buf.st_size, 5, 0, 0); - if(bzError != BZ_OK) - { - string ex = "BZ2_bzBuffToBuffCompress failed"; - if(bzError == BZ_IO_ERROR) - { - ex += string(": ") + IceUtilInternal::lastErrorToString(); - } - close(fd); - throw ex; - } - close(fd); - - const string pathBZ2Temp = path + ".bz2temp"; - - FILE* stdioFile = IceUtilInternal::fopen(pathBZ2Temp, "wb"); - if(fwrite(&compressedBytes[0], compressedLen, 1, stdioFile) != 1) - { - fclose(stdioFile); - throw "cannot write to `" + pathBZ2Temp + "':\n" + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - - rename(pathBZ2Temp, pathBZ2); - - info.size = compressedLen; - } -#endif - int fd = IceUtilInternal::open(path.c_str(), O_BINARY|O_RDONLY); if(fd == -1) { throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); } -#ifndef __BCPLUSPLUS__ const string pathBZ2Temp = path + ".bz2temp"; FILE* stdioFile = 0; int bzError = 0; @@ -1107,7 +965,6 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G throw ex; } } -#endif unsigned int bytesLeft = static_cast<unsigned int>(buf.st_size); while(bytesLeft > 0) @@ -1121,18 +978,16 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G #endif == -1) { -#ifndef __BCPLUSPLUS__ if(doCompress) { fclose(stdioFile); } -#endif + IceUtilInternal::close(fd); throw "cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } bytesLeft -= static_cast<unsigned int>(bytes.size()); -#ifndef __BCPLUSPLUS__ if(doCompress) { BZ2_bzWrite(&bzError, bzFile, const_cast<Byte*>(&bytes[0]), static_cast<int>(bytes.size())); @@ -1149,14 +1004,12 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G throw ex; } } -#endif SHA1_Update(&ctx, reinterpret_cast<const void*>(&bytes[0]), bytes.size()); } IceUtilInternal::close(fd); -#ifndef __BCPLUSPLUS__ if(doCompress) { BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); @@ -1182,7 +1035,6 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G info.size = static_cast<Int>(bufBZ2.st_size); } -#endif } SHA1_Final(reinterpret_cast<unsigned char*>(&bytesSHA[0]), &ctx); diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index 96fc56f2d19..f1b45d6afc7 100644 --- a/cpp/src/IceSSL/AcceptorI.cpp +++ b/cpp/src/IceSSL/AcceptorI.cpp @@ -132,7 +132,7 @@ IceSSL::AcceptorI::startAccept() void IceSSL::AcceptorI::finishAccept() { - if(_info.count == SOCKET_ERROR || _fd == INVALID_SOCKET) + if(static_cast<int>(_info.count) == SOCKET_ERROR || _fd == INVALID_SOCKET) { IceInternal::closeSocketNoThrow(_acceptFd); _acceptFd = INVALID_SOCKET; diff --git a/cpp/src/IceSSL/AcceptorI.h b/cpp/src/IceSSL/AcceptorI.h index 7a4fab4df00..44daa2f261f 100644 --- a/cpp/src/IceSSL/AcceptorI.h +++ b/cpp/src/IceSSL/AcceptorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_ACCEPTOR_I_H -#define ICE_SSL_ACCEPTOR_I_H +#pragma once #include <Ice/LoggerF.h> #include <Ice/TransceiverF.h> @@ -67,5 +66,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/ConnectorI.h b/cpp/src/IceSSL/ConnectorI.h index 5e00e714678..ffa8a0c41e3 100644 --- a/cpp/src/IceSSL/ConnectorI.h +++ b/cpp/src/IceSSL/ConnectorI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_CONNECTOR_I_H -#define ICE_SSL_CONNECTOR_I_H +#pragma once #include <Ice/LoggerF.h> #include <Ice/TransceiverF.h> @@ -58,5 +57,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/EndpointI.h b/cpp/src/IceSSL/EndpointI.h index d551bd0626a..732a2c2949c 100644 --- a/cpp/src/IceSSL/EndpointI.h +++ b/cpp/src/IceSSL/EndpointI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_ENDPOINT_I_H -#define ICE_SSL_ENDPOINT_I_H +#pragma once #include <Ice/EndpointI.h> #include <Ice/EndpointFactory.h> @@ -85,5 +84,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/Instance.h b/cpp/src/IceSSL/Instance.h index 55af46a6c99..8c42ab53b86 100644 --- a/cpp/src/IceSSL/Instance.h +++ b/cpp/src/IceSSL/Instance.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_INSTANCE_H -#define ICE_SSL_INSTANCE_H +#pragma once #include <IceSSL/InstanceF.h> #include <IceSSL/UtilF.h> @@ -88,5 +87,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/InstanceF.h b/cpp/src/IceSSL/InstanceF.h index 0f731a0c174..3fd831308ad 100644 --- a/cpp/src/IceSSL/InstanceF.h +++ b/cpp/src/IceSSL/InstanceF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_INSTANCE_F_H -#define ICE_SSL_INSTANCE_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(IceSSL::Instance*); typedef IceInternal::Handle<Instance> InstancePtr; } - -#endif diff --git a/cpp/src/IceSSL/Makefile b/cpp/src/IceSSL/Makefile index 868cdb0acaa..ab2d6ca690b 100644 --- a/cpp/src/IceSSL/Makefile +++ b/cpp/src/IceSSL/Makefile @@ -10,11 +10,17 @@ top_srcdir = ../.. -LIBFILENAME = $(call mklibfilename,IceSSL,$(VERSION)) -SONAME = $(call mksoname,IceSSL,$(SOVERSION)) -LIBNAME = $(call mklibname,IceSSL) - -TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +include $(top_srcdir)/config/Make.rules.common + +ifeq ($(MinGW), yes) + DLLNAME = $(top_srcdir)/bin/icessl$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX).dll + TARGETS = $(DLLNAME) $(LIBNAME) +else + LIBFILENAME = $(call mklibfilename,IceSSL,$(VERSION)) + SONAME = $(call mksoname,IceSSL,$(SOVERSION)) + LIBNAME = $(call mklibname,IceSSL) + TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +endif OBJS = AcceptorI.o \ Certificate.o \ @@ -42,6 +48,17 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) -DICE_SSL_API_EXPORTS $(OPENSSL_FLAGS) SLICE2CPPFLAGS := --ice --include-dir IceSSL --dll-export ICE_SSL_API $(SLICE2CPPFLAGS) +ifeq ($(MinGW), yes) + +LINKWITH := -lice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) -liceutil$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) $(ICE_OS_LIBS) $(OPENSSL_LIBS) + +$(DLLNAME): $(OBJS) + $(CXX) -shared $(LDFLAGS) -o $(DLLNAME) $(OBJS) $(LINKWITH) + +install:: all + $(call installprogram,$(DLLNAME),$(install_bindir)) + +else LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil $(OPENSSL_LIBS) $(CXXLIBS) $(libdir)/$(LIBFILENAME): $(OBJS) @@ -58,5 +75,6 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) +endif include .depend diff --git a/cpp/src/IceSSL/PluginI.h b/cpp/src/IceSSL/PluginI.h index 10488ad6226..9b54513d38d 100644 --- a/cpp/src/IceSSL/PluginI.h +++ b/cpp/src/IceSSL/PluginI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_PLUGIN_I_H -#define ICE_SSL_PLUGIN_I_H +#pragma once #include <IceSSL/Plugin.h> #include <IceSSL/InstanceF.h> @@ -43,5 +42,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/RFC2253.h b/cpp/src/IceSSL/RFC2253.h index c70fb157d9f..0e769c20bb2 100644 --- a/cpp/src/IceSSL/RFC2253.h +++ b/cpp/src/IceSSL/RFC2253.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_RFC_2253_H -#define ICE_SSL_RFC_2253_H +#pragma once #include <IceUtil/Config.h> #include <list> @@ -63,5 +62,3 @@ std::string unescape(const std::string&); } } - -#endif diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp index 3c75c6331bc..a052fbd8f00 100644 --- a/cpp/src/IceSSL/TransceiverI.cpp +++ b/cpp/src/IceSSL/TransceiverI.cpp @@ -692,7 +692,7 @@ IceSSL::TransceiverI::finishWrite(IceInternal::Buffer& buf) return; } - if(_write.count == SOCKET_ERROR) + if(static_cast<int>(_write.count) == SOCKET_ERROR) { WSASetLastError(_write.error); if(IceInternal::connectionLost()) @@ -763,7 +763,7 @@ IceSSL::TransceiverI::startRead(IceInternal::Buffer& buf) void IceSSL::TransceiverI::finishRead(IceInternal::Buffer& buf) { - if(_read.count == SOCKET_ERROR) + if(static_cast<int>(_read.count) == SOCKET_ERROR) { WSASetLastError(_read.error); if(IceInternal::connectionLost()) diff --git a/cpp/src/IceSSL/TransceiverI.h b/cpp/src/IceSSL/TransceiverI.h index dd94b787a7c..d932895736f 100644 --- a/cpp/src/IceSSL/TransceiverI.h +++ b/cpp/src/IceSSL/TransceiverI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_TRANSCEIVER_I_H -#define ICE_SSL_TRANSCEIVER_I_H +#pragma once #include <IceSSL/InstanceF.h> #include <IceSSL/Plugin.h> @@ -105,5 +104,3 @@ private: typedef IceUtil::Handle<TransceiverI> TransceiverIPtr; } - -#endif diff --git a/cpp/src/IceSSL/TrustManager.h b/cpp/src/IceSSL/TrustManager.h index 5db65c2e978..25cb1a4714a 100644 --- a/cpp/src/IceSSL/TrustManager.h +++ b/cpp/src/IceSSL/TrustManager.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_TRUST_MANAGER_H -#define ICE_SSL_TRUST_MANAGER_H +#pragma once #include <Ice/CommunicatorF.h> #include <IceSSL/TrustManagerF.h> @@ -47,5 +46,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceSSL/TrustManagerF.h b/cpp/src/IceSSL/TrustManagerF.h index e715c188ea8..43333664258 100644 --- a/cpp/src/IceSSL/TrustManagerF.h +++ b/cpp/src/IceSSL/TrustManagerF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_TRUST_MANAGER_F_H -#define ICE_SSL_TRUST_MANAGER_F_H +#pragma once #include <IceUtil/Shared.h> @@ -22,5 +21,3 @@ IceUtil::Shared* upCast(IceSSL::TrustManager*); typedef IceInternal::Handle<TrustManager> TrustManagerPtr; } - -#endif diff --git a/cpp/src/IceSSL/Util.h b/cpp/src/IceSSL/Util.h index 80f5625a63b..1e9f39dea91 100644 --- a/cpp/src/IceSSL/Util.h +++ b/cpp/src/IceSSL/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_UTIL_H -#define ICE_SSL_UTIL_H +#pragma once #include <IceSSL/UtilF.h> #include <Ice/Network.h> @@ -58,5 +57,3 @@ bool checkPath(std::string&, const std::string&, bool); std::string getSslErrors(bool); } - -#endif diff --git a/cpp/src/IceSSL/UtilF.h b/cpp/src/IceSSL/UtilF.h index ee49435777d..acb311f7595 100644 --- a/cpp/src/IceSSL/UtilF.h +++ b/cpp/src/IceSSL/UtilF.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SSL_UTIL_F_H -#define ICE_SSL_UTIL_F_H +#pragma once #include <IceUtil/Shared.h> @@ -26,5 +25,3 @@ typedef IceInternal::Handle<DHParams> DHParamsPtr; } #endif - -#endif diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 0cd2197dfc6..b0b5a0eb7c4 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -25,8 +25,7 @@ public: virtual int run(int, char*[]); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceStorm/DB.h b/cpp/src/IceStorm/DB.h index b7848e075d2..78b5b605280 100644 --- a/cpp/src/IceStorm/DB.h +++ b/cpp/src/IceStorm/DB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef DATABASE_CACHE_H -#define DATABASE_CACHE_H +#pragma once #include <Ice/Plugin.h> #include <IceDB/IceDB.h> @@ -57,6 +56,3 @@ public: typedef IceUtil::Handle<DatabasePlugin> DatabasePluginPtr; } - - -#endif diff --git a/cpp/src/IceStorm/FreezeDB/FreezeDB.h b/cpp/src/IceStorm/FreezeDB/FreezeDB.h index 9bc2393035c..17744ec5e1b 100644 --- a/cpp/src/IceStorm/FreezeDB/FreezeDB.h +++ b/cpp/src/IceStorm/FreezeDB/FreezeDB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef FREEZE_DATABASE_CACHE_H -#define FREEZE_DATABASE_CACHE_H +#pragma once #include <IceDB/FreezeTypes.h> @@ -45,5 +44,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceStorm/FreezeDB/Migrate.cpp b/cpp/src/IceStorm/FreezeDB/Migrate.cpp index 8647eff1353..0cc861b0339 100644 --- a/cpp/src/IceStorm/FreezeDB/Migrate.cpp +++ b/cpp/src/IceStorm/FreezeDB/Migrate.cpp @@ -34,8 +34,7 @@ private: void v31migrate(const Freeze::ConnectionPtr&, SubscriberMap&); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceStorm/Instance.h b/cpp/src/IceStorm/Instance.h index fbc3bbffae6..0f6b0540258 100644 --- a/cpp/src/IceStorm/Instance.h +++ b/cpp/src/IceStorm/Instance.h @@ -7,9 +7,7 @@ // // ********************************************************************** -#ifndef INSTANCE_H -#define INSTANCE_H - +#pragma once #include <Ice/CommunicatorF.h> #include <Ice/ObjectAdapterF.h> @@ -104,5 +102,3 @@ private: typedef IceUtil::Handle<Instance> InstancePtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/NodeI.h b/cpp/src/IceStorm/NodeI.h index f32de3a5d6a..e8387da2961 100644 --- a/cpp/src/IceStorm/NodeI.h +++ b/cpp/src/IceStorm/NodeI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ELECTION_I_H -#define ELECTION_I_H +#pragma once #include <IceUtil/IceUtil.h> #include <Ice/Ice.h> @@ -198,5 +197,3 @@ private: }; } - -#endif // ELECTION_I_H diff --git a/cpp/src/IceStorm/Observers.h b/cpp/src/IceStorm/Observers.h index 5d328420701..d7c51f9020f 100644 --- a/cpp/src/IceStorm/Observers.h +++ b/cpp/src/IceStorm/Observers.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef OBSERVERS_H -#define OBSERVERS_H +#pragma once #include <Ice/Ice.h> #include <IceUtil/IceUtil.h> @@ -82,5 +81,3 @@ private: typedef IceUtil::Handle<Observers> ObserversPtr; } - -#endif // OBSERVERS_H diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h index aba6bd522fc..2649be8a6db 100644 --- a/cpp/src/IceStorm/Parser.h +++ b/cpp/src/IceStorm/Parser.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STORM_PARSER_H -#define ICE_STORM_PARSER_H +#pragma once #include <IceUtil/Handle.h> #include <IceStorm/IceStorm.h> @@ -105,5 +104,3 @@ private: extern Parser* parser; // The current parser for bison/flex } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/Replica.h b/cpp/src/IceStorm/Replica.h index 2c6eb6f3e4b..60600c778d8 100644 --- a/cpp/src/IceStorm/Replica.h +++ b/cpp/src/IceStorm/Replica.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef REPLICA_H -#define REPLICA_H +#pragma once #include <Ice/Ice.h> #include <IceStorm/Election.h> @@ -43,5 +42,3 @@ public: typedef IceUtil::Handle<Replica> ReplicaPtr; } - -#endif // RELICA_H diff --git a/cpp/src/IceStorm/Service.h b/cpp/src/IceStorm/Service.h index 9b9753e5db0..f514f1b0040 100644 --- a/cpp/src/IceStorm/Service.h +++ b/cpp/src/IceStorm/Service.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICESTORM_SERVICE_H -#define ICESTORM_SERVICE_H +#pragma once #include <IceBox/IceBox.h> #include <IceStorm/IceStorm.h> @@ -44,5 +43,3 @@ public: }; }; - -#endif diff --git a/cpp/src/IceStorm/SqlDB/SqlDB.h b/cpp/src/IceStorm/SqlDB/SqlDB.h index ad84f1e6356..0ea16233ec0 100644 --- a/cpp/src/IceStorm/SqlDB/SqlDB.h +++ b/cpp/src/IceStorm/SqlDB/SqlDB.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_DATABASE_CACHE_H -#define SQL_DATABASE_CACHE_H +#pragma once #include <IceStorm/DB.h> @@ -57,5 +56,3 @@ private: }; } - -#endif diff --git a/cpp/src/IceStorm/SqlDB/SqlLLU.h b/cpp/src/IceStorm/SqlDB/SqlLLU.h index b2f70652f55..5fbdd87f067 100644 --- a/cpp/src/IceStorm/SqlDB/SqlLLU.h +++ b/cpp/src/IceStorm/SqlDB/SqlLLU.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_LLU_H -#define SQL_LLU_H +#pragma once #include <IceDB/SqlTypes.h> @@ -34,5 +33,3 @@ private: typedef IceUtil::Handle<SqlLLU> SqlLLUPtr; } - -#endif diff --git a/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.h b/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.h index 397e88bce12..6509941b499 100644 --- a/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.h +++ b/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SQL_SUBSCRIBER_MAP_H -#define SQL_SUBSCRIBER_MAP_H +#pragma once #include <Ice/CommunicatorF.h> #include <IceStorm/SubscriberRecord.h> @@ -64,5 +63,3 @@ private: typedef IceUtil::Handle<SqlSubscriberMap> SqlSubscriberMapPtr; } - -#endif diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h index 906fec3cf4e..75b7e0ea056 100644 --- a/cpp/src/IceStorm/Subscriber.h +++ b/cpp/src/IceStorm/Subscriber.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SUBSCRIBER_H -#define SUBSCRIBER_H +#pragma once #include <IceStorm/IceStormInternal.h> #include <IceStorm/SubscriberRecord.h> @@ -93,5 +92,3 @@ bool operator!=(const IceStorm::Subscriber&, const IceStorm::Subscriber&); bool operator<(const IceStorm::Subscriber&, const IceStorm::Subscriber&); } - -#endif // SUBSCRIBER_H diff --git a/cpp/src/IceStorm/TopicI.h b/cpp/src/IceStorm/TopicI.h index 9d7f497865d..11c4d4c6e2f 100644 --- a/cpp/src/IceStorm/TopicI.h +++ b/cpp/src/IceStorm/TopicI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef TOPIC_I_H -#define TOPIC_I_H +#pragma once #include <IceStorm/IceStormInternal.h> #include <IceStorm/Election.h> @@ -104,5 +103,3 @@ private: typedef IceUtil::Handle<TopicImpl> TopicImplPtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/TopicManagerI.h b/cpp/src/IceStorm/TopicManagerI.h index 8a313a67868..6c560fd3d0a 100644 --- a/cpp/src/IceStorm/TopicManagerI.h +++ b/cpp/src/IceStorm/TopicManagerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef TOPIC_MANAGER_I_H -#define TOPIC_MANAGER_I_H +#pragma once #include <IceStorm/IceStorm.h> @@ -91,5 +90,3 @@ private: typedef IceUtil::Handle<TopicManagerImpl> TopicManagerImplPtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/TraceLevels.h b/cpp/src/IceStorm/TraceLevels.h index bd860b4256f..b232bb9505a 100644 --- a/cpp/src/IceStorm/TraceLevels.h +++ b/cpp/src/IceStorm/TraceLevels.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_STORM_TRACE_LEVELS_H -#define ICE_STORM_TRACE_LEVELS_H +#pragma once #include <IceUtil/Shared.h> #include <IceUtil/Handle.h> @@ -46,5 +45,3 @@ public: typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/TransientTopicI.h b/cpp/src/IceStorm/TransientTopicI.h index f051ba3e5e0..ac19a9493f0 100644 --- a/cpp/src/IceStorm/TransientTopicI.h +++ b/cpp/src/IceStorm/TransientTopicI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef TRANSIENT_TOPIC_I_H -#define TRANSIENT_TOPIC_I_H +#pragma once #include <IceStorm/IceStormInternal.h> @@ -76,5 +75,3 @@ private: typedef IceUtil::Handle<TransientTopicImpl> TransientTopicImplPtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/TransientTopicManagerI.h b/cpp/src/IceStorm/TransientTopicManagerI.h index 9edb2ec3c77..a00988a7a81 100644 --- a/cpp/src/IceStorm/TransientTopicManagerI.h +++ b/cpp/src/IceStorm/TransientTopicManagerI.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef TRANSIENT_TOPIC_MANAGER_I_H -#define TRANSIENT_TOPIC_MANAGER_I_H +#pragma once #include <IceStorm/IceStormInternal.h> @@ -55,5 +54,3 @@ private: typedef IceUtil::Handle<TransientTopicManagerImpl> TransientTopicManagerImplPtr; } // End namespace IceStorm - -#endif diff --git a/cpp/src/IceStorm/Util.h b/cpp/src/IceStorm/Util.h index 128133e3bac..cb73d662280 100644 --- a/cpp/src/IceStorm/Util.h +++ b/cpp/src/IceStorm/Util.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef UTIL_H -#define UTIL_H +#pragma once #include <string> @@ -21,4 +20,3 @@ std::string describeEndpoints(const Ice::ObjectPrx&); } -#endif diff --git a/cpp/src/IceUtil/ConvertUTF.h b/cpp/src/IceUtil/ConvertUTF.h index 46155f9fa22..ae4e3d1c989 100644 --- a/cpp/src/IceUtil/ConvertUTF.h +++ b/cpp/src/IceUtil/ConvertUTF.h @@ -29,8 +29,7 @@ // // ********************************************************************** -#ifndef ICE_UTIL_CONVERT_UTF_H -#define ICE_UTIL_CONVERT_UTF_H +#pragma once #include <IceUtil/Unicode.h> @@ -141,4 +140,3 @@ ConversionResult ConvertUTF32toUTF8( /* --------------------------------------------------------------------- */ } -#endif diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 399cecd678b..b6c75231f5a 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -14,7 +14,7 @@ #include <ostream> #include <cstdlib> -#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) +#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) # include <execinfo.h> # include <cxxabi.h> #endif @@ -52,7 +52,7 @@ public: Init init; -#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) +#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) string getStackTrace() { @@ -183,7 +183,7 @@ getStackTrace() IceUtil::Exception::Exception() : _file(0), _line(0) -#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) +#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) , _stackTrace(getStackTrace()) #endif { @@ -192,7 +192,7 @@ IceUtil::Exception::Exception() : IceUtil::Exception::Exception(const char* file, int line) : _file(file), _line(line) -#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) +#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) , _stackTrace(getStackTrace()) #endif { diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp index 2ecc670051f..b69e8d6b20a 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/IceUtil/FileUtil.cpp @@ -22,10 +22,6 @@ # include <io.h> #endif -#ifdef __BCPLUSPLUS__ -# include <dir.h> -#endif - using namespace std; // @@ -174,7 +170,7 @@ IceUtilInternal::unlink(const string& path) int IceUtilInternal::close(int fd) { -#if defined(_MSC_VER) && (_MSC_VER >= 1400) +#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW32__) return _close(fd); #else return ::close(fd); @@ -201,6 +197,12 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) : throw IceUtil::FileLockException(__FILE__, __LINE__, GetLastError(), _path); } +#ifdef __MINGW32__ + if(::LockFile(_fd, 0, 0, 0, 0) == 0) + { + throw IceUtil::FileLockException(__FILE__, __LINE__, GetLastError(), _path); + } +#else OVERLAPPED overlaped; overlaped.Internal = 0; overlaped.InternalHigh = 0; @@ -212,6 +214,7 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) : ::CloseHandle(_fd); throw IceUtil::FileLockException(__FILE__, __LINE__, GetLastError(), _path); } +#endif // // In Windows implementation we don't write the process pid to the file, as is // not posible to read the file from other process while it is locked here. @@ -314,14 +317,23 @@ IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) #else -IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : std::ifstream(IceUtil::stringToWstring(path).c_str(), mode) +IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : +#ifdef __MINGW32__ + std::ifstream(path.c_str(), mode) +#else + std::ifstream(IceUtil::stringToWstring(path).c_str(), mode) +#endif { } void IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) { +#ifdef __MINGW32__ + std::ifstream::open(path.c_str(), mode); +#else std::ifstream::open(IceUtil::stringToWstring(path).c_str(), mode); +#endif } #endif @@ -375,14 +387,23 @@ IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) #else -IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : std::ofstream(IceUtil::stringToWstring(path).c_str(), mode) +IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : +#ifdef __MINGW32__ + std::ofstream(path.c_str(), mode) +#else + std::ofstream(IceUtil::stringToWstring(path).c_str(), mode) +#endif { } void IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) { +#ifdef __MINGW32__ + std::ofstream::open(path.c_str(), mode); +#else std::ofstream::open(IceUtil::stringToWstring(path).c_str(), mode); +#endif } #endif diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index 530d6dfe494..8f5edab81f9 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -11,7 +11,7 @@ #include <stdlib.h> #include <errno.h> -#if defined(_MSC_VER) && (_MSC_VER < 1300) +#if (defined(_MSC_VER) && (_MSC_VER < 1300) ) || (__MINGW32__) #include <limits.h> #endif @@ -25,7 +25,9 @@ using namespace IceUtil; namespace IceUtilInternal { -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) + +#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) + // // The VC60 runtime does not include _strtoi64, so we provide our own implementation // @@ -177,7 +179,7 @@ Int64 strToInt64(const char* s, char** endptr, int base) { #if defined(_WIN32) -# if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +# if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) return strToInt64Impl(s, endptr, base); # else return _strtoi64(s, endptr, base); diff --git a/cpp/src/IceUtil/Makefile b/cpp/src/IceUtil/Makefile index 4fb25718adf..a3e19c0914f 100644 --- a/cpp/src/IceUtil/Makefile +++ b/cpp/src/IceUtil/Makefile @@ -9,11 +9,17 @@ top_srcdir = ../.. -LIBFILENAME = $(call mklibfilename,IceUtil,$(VERSION)) -SONAME = $(call mksoname,IceUtil,$(SOVERSION)) -LIBNAME = $(call mklibname,IceUtil) +include $(top_srcdir)/config/Make.rules.common -TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +ifeq ($(MinGW), yes) + DLLNAME = $(top_srcdir)/bin/iceutil$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX).dll + TARGETS = $(DLLNAME) $(LIBNAME) +else + LIBFILENAME = $(call mklibfilename,IceUtil,$(VERSION)) + SONAME = $(call mksoname,IceUtil,$(SOVERSION)) + LIBNAME = $(call mklibname,IceUtil) + TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +endif OBJS = ArgVector.o \ Cond.o \ @@ -21,7 +27,6 @@ OBJS = ArgVector.o \ CountDownLatch.o \ CtrlCHandler.o \ Exception.o \ - FileUtil.o \ InputUtil.o \ Options.o \ OutputUtil.o \ @@ -35,7 +40,8 @@ OBJS = ArgVector.o \ Timer.o \ UUID.o \ Unicode.o \ - MutexProtocol.o + MutexProtocol.o \ + FileUtil.o SRCS = $(OBJS:.o=.cpp) @@ -43,8 +49,15 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := $(CPPFLAGS) $(ICEUTIL_FLAGS) -DICE_UTIL_API_EXPORTS -I.. -LINKWITH := $(STLPORT_LIBS) $(ICEUTIL_OS_LIBS) +LINKWITH := $(ICEUTIL_OS_LIBS) +ifeq ($(MinGW), yes) +$(DLLNAME): $(OBJS) + $(CXX) -shared $(LDFLAGS) -o $(DLLNAME) $(OBJS) $(LINKWITH) + +install:: all + $(call installprogram,$(DLLNAME),$(install_bindir)) +else ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ @@ -62,9 +75,9 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) rm -f $@ ln -s $(SONAME) $@ endif - install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) +endif include .depend diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index e82a55d93ab..d47d424357f 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -44,7 +44,7 @@ namespace // Mutex* staticMutex = 0; #ifdef _WIN32 -HCRYPTPROV context = NULL; +HCRYPTPROV context = 0; #else int fd = -1; #endif @@ -61,10 +61,10 @@ public: ~Init() { #ifdef _WIN32 - if(context != NULL) + if(context != 0) { CryptReleaseContext(context, 0); - context = NULL; + context = 0; } #else if(fd != -1) @@ -102,7 +102,7 @@ IceUtilInternal::generateRandom(char* buffer, int size) // IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(staticMutex); - if(context == NULL) + if(context == 0) { if(!CryptAcquireContext(&context, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp index c632f4b7b63..9558a6fed2b 100644 --- a/cpp/src/IceUtil/RecMutex.cpp +++ b/cpp/src/IceUtil/RecMutex.cpp @@ -33,7 +33,11 @@ IceUtil::RecMutex::RecMutex(const IceUtil::MutexProtocol protocol) : void IceUtil::RecMutex::init(const MutexProtocol) { +# ifdef ICE_OS_WINRT InitializeCriticalSectionEx(&_mutex, 0, 0); +# else + InitializeCriticalSection(&_mutex); +# endif } IceUtil::RecMutex::~RecMutex() diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index a629586a43b..4c63bd7b0e2 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -251,7 +251,7 @@ IceUtil::Thread::start(size_t stackSize, int priority) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } - if(ResumeThread(_handle) == -1) + if(static_cast<int>(ResumeThread(_handle)) == -1) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index b830d32412c..bef48d9ab3d 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -98,7 +98,7 @@ IceUtil::Time::now(Clock clock) # if defined(_MSC_VER) struct _timeb tb; _ftime(&tb); -# elif defined(__BCPLUSPLUS__) +# elif defined(__MINGW32__) struct timeb tb; ftime(&tb); # endif @@ -131,7 +131,7 @@ IceUtil::Time::now(Clock clock) # if defined(_MSC_VER) struct _timeb tb; _ftime(&tb); -# elif defined(__BCPLUSPLUS__) +# elif defined(__MINGW32__) struct timeb tb; ftime(&tb); # endif diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index a95287489db..d72164c5c5c 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -44,11 +44,7 @@ IceXML::ParserException::ice_name() const void IceXML::ParserException::ice_print(std::ostream& out) const { -#ifdef __BCPLUSPLUS__ - IceUtil::Exception::ice_print(out); -#else Exception::ice_print(out); -#endif if(!_reason.empty()) { out << "\n" << _reason; diff --git a/cpp/src/Makefile b/cpp/src/Makefile index a7930b2e6ec..4917e0a96ef 100644 --- a/cpp/src/Makefile +++ b/cpp/src/Makefile @@ -11,33 +11,42 @@ top_srcdir = .. include $(top_srcdir)/config/Make.rules -SUBDIRS = IceUtil \ - Slice \ - slice2cpp \ - slice2cs \ - slice2freeze \ - slice2freezej \ - slice2java \ - slice2php \ - slice2py \ - slice2rb \ - slice2html \ - Ice \ - IceXML \ - IceSSL \ - Freeze \ - FreezeScript \ - IceBox \ - Glacier2Lib \ - Glacier2 \ - IceDB \ - IcePatch2Lib \ - IcePatch2 \ - IceStormLib \ - IceGridLib \ - IceStorm \ - IceGrid \ - ca +ifeq ($(MinGW), yes) + SUBDIRS = IceUtil \ + Slice \ + slice2cpp \ + slice2rb \ + Ice \ + IceSSL +else + SUBDIRS = IceUtil \ + Slice \ + slice2cpp \ + slice2cs \ + slice2freeze \ + slice2freezej \ + slice2java \ + slice2php \ + slice2py \ + slice2rb \ + slice2html \ + Ice \ + IceXML \ + IceSSL \ + Freeze \ + FreezeScript \ + IceBox \ + Glacier2Lib \ + Glacier2 \ + IceDB \ + IcePatch2Lib \ + IcePatch2 \ + IceStormLib \ + IceGridLib \ + IceStorm \ + IceGrid \ + ca +endif $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/src/Slice/GrammarUtil.h b/cpp/src/Slice/GrammarUtil.h index c803152dd24..756eda5d17b 100644 --- a/cpp/src/Slice/GrammarUtil.h +++ b/cpp/src/Slice/GrammarUtil.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_GRAMMAR_UTIL_H -#define SLICE_GRAMMAR_UTIL_H +#pragma once #include <Slice/Parser.h> @@ -215,5 +214,3 @@ int slice_parse(); // yyoverflow. // #define yyoverflow(a, b, c, d, e, f) yyerror(a) - -#endif diff --git a/cpp/src/Slice/MD5.h b/cpp/src/Slice/MD5.h index ac9c02e2af0..e9bad070237 100644 --- a/cpp/src/Slice/MD5.h +++ b/cpp/src/Slice/MD5.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef SLICE_MD5_H -#define SLICE_MD5_H +#pragma once #include <IceUtil/Config.h> @@ -40,5 +39,3 @@ private: }; } - -#endif diff --git a/cpp/src/Slice/MD5I.h b/cpp/src/Slice/MD5I.h index 66588283e83..2ab51829250 100644 --- a/cpp/src/Slice/MD5I.h +++ b/cpp/src/Slice/MD5I.h @@ -47,8 +47,7 @@ 1999-05-03 lpd Original version. */ -#ifndef md5_INCLUDED -# define md5_INCLUDED +#pragma once /* * This package supports both compile-time and run-time determination of CPU @@ -87,5 +86,3 @@ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus } /* end extern "C" */ #endif - -#endif /* md5_INCLUDED */ diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile index c6e5718f866..f07c97d1340 100644 --- a/cpp/src/Slice/Makefile +++ b/cpp/src/Slice/Makefile @@ -9,11 +9,17 @@ top_srcdir = ../.. -LIBFILENAME = $(call mklibfilename,Slice,$(VERSION)) -SONAME = $(call mksoname,Slice,$(SOVERSION)) -LIBNAME = $(call mklibname,Slice) +include $(top_srcdir)/config/Make.rules.common -TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +ifeq ($(MinGW), yes) + DLLNAME = $(top_srcdir)/bin/slice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX).dll + TARGETS = $(DLLNAME) $(LIBNAME) +else + LIBFILENAME = $(call mklibfilename,Slice,$(VERSION)) + SONAME = $(call mksoname,Slice,$(SOVERSION)) + LIBNAME = $(call mklibname,Slice) + TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) +endif OBJS = Scanner.o \ ../Slice/Grammar.o \ @@ -36,10 +42,19 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules + CPPFLAGS := -I.. $(CPPFLAGS) -DSLICE_API_EXPORTS -LINKWITH := -lIceUtil $(MCPP_LIBS) BISONFLAGS := --name-prefix "slice_" $(BISONFLAGS) +ifeq ($(MinGW), yes) +LINKWITH := -l$(ICEUTIL_LIBNAME) $(MCPP_LIBS) +$(DLLNAME): $(OBJS) + $(CXX) -shared $(LDFLAGS) -o $(DLLNAME) $(OBJS) $(LINKWITH) + +install:: all + $(call installprogram,$(DLLNAME),$(install_bindir)) +else +LINKWITH := -lIceUtil $(MCPP_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ @@ -57,9 +72,8 @@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) rm -f $@ ln -s $(SONAME) $@ endif - install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) - +endif include .depend diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 3afb6a29eb5..c8d98fc400f 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -15,10 +15,6 @@ #include <unistd.h> // For readlink() -#ifdef __BCPLUSPLUS__ -# include <dir.h> -#endif - using namespace std; using namespace Slice; diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp index 2656f7e607a..2c360418ea1 100644 --- a/cpp/src/iceserviceinstall/Install.cpp +++ b/cpp/src/iceserviceinstall/Install.cpp @@ -34,18 +34,8 @@ private: bool _pause; }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#ifdef __BCPLUSPLUS__ - -int -main(int argc, char* argv[]) - -#else - int wmain(int argc, wchar_t* argv[]) - -#endif { Install app; InitializationData id; diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.h b/cpp/src/iceserviceinstall/ServiceInstaller.h index e867c9cb31f..3c852931e9e 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.h +++ b/cpp/src/iceserviceinstall/ServiceInstaller.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef ICE_SERVICE_INSTALLER_H -#define ICE_SERVICE_INSTALLER_H +#pragma once #include <Ice/Ice.h> #include <AccCtrl.h> @@ -76,5 +75,3 @@ private: bool _debug; }; - -#endif diff --git a/cpp/src/slice2confluence/ConfluenceOutput.h b/cpp/src/slice2confluence/ConfluenceOutput.h index 90d02809368..5caa7521e50 100644 --- a/cpp/src/slice2confluence/ConfluenceOutput.h +++ b/cpp/src/slice2confluence/ConfluenceOutput.h @@ -1,5 +1,13 @@ -#ifndef CONFLUENCE_OUTPUT -#define CONFLUENCE_OUTPUT +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#pragma once #include <IceUtil/OutputUtil.h> #include <list> @@ -188,5 +196,3 @@ operator<<(ConfluenceOutput& o, const EndEscapes&) ConfluenceOutput& operator<<(ConfluenceOutput&, std::ios_base& (*)(std::ios_base&)); } - -#endif diff --git a/cpp/src/slice2confluence/Gen.h b/cpp/src/slice2confluence/Gen.h index 65469d5dc05..2b563fe04b4 100644 --- a/cpp/src/slice2confluence/Gen.h +++ b/cpp/src/slice2confluence/Gen.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GEN_H -#define GEN_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -292,5 +291,3 @@ private: }; } - -#endif diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index fd34162a680..44e4b501637 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -214,12 +214,12 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& Slice::Gen::~Gen() { - H << "\n\n#endif\n"; + H << '\n'; C << '\n'; if(_impl) { - implH << "\n\n#endif\n"; + implH << '\n'; implC << '\n'; } } @@ -280,15 +280,7 @@ Slice::Gen::generate(const UnitPtr& p) } FileTracker::instance()->addFile(fileImplC); - string s = fileImplH; - if(_include.size()) - { - s = _include + '/' + s; - } - transform(s.begin(), s.end(), s.begin(), ToIfdef()); - implH << "#ifndef __" << s << "__"; - implH << "\n#define __" << s << "__"; - implH << '\n'; + implH << "#pragma once\n"; } string fileH = _base + "." + _headerExtension; @@ -322,16 +314,7 @@ Slice::Gen::generate(const UnitPtr& p) printHeader(C); printGeneratedHeader(C, _base + ".ice"); - - string s = fileH; - if(_include.size()) - { - s = _include + '/' + s; - } - transform(s.begin(), s.end(), s.begin(), ToIfdef()); - H << "\n#ifndef __" << s << "__"; - H << "\n#define __" << s << "__"; - H << '\n'; + H << "#pragma once\n"; validateMetaData(p); @@ -6045,18 +6028,6 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) H << nl << "// COMPILERFIX: The using directive avoid compiler warnings with -Woverloaded-virtual"; H << nl << "using ::IceInternal::IncomingAsync::ice_exception;"; H << nl << "virtual void ice_exception(const ::std::exception&);"; - - H.zeroIndent(); - H << nl << "#if defined(__BCPLUSPLUS__)"; - H.restoreIndent(); - H << nl << "// COMPILERFIX: Avoid compiler warnings with C++Builder 2010"; - H << nl << "virtual void ice_exception()"; - H << sb; - H << nl << "::IceInternal::IncomingAsync::ice_exception();"; - H << eb; - H.zeroIndent(); - H << nl << "#endif"; - H.restoreIndent(); } H << eb << ';'; diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h index 9d05ca2a8b5..941b2a90e12 100644 --- a/cpp/src/slice2cpp/Gen.h +++ b/cpp/src/slice2cpp/Gen.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GEN_H -#define GEN_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -451,5 +450,3 @@ private: }; } - -#endif diff --git a/cpp/src/slice2cpp/Makefile b/cpp/src/slice2cpp/Makefile index dc15e514e7e..167f35e7dc8 100644 --- a/cpp/src/slice2cpp/Makefile +++ b/cpp/src/slice2cpp/Makefile @@ -9,7 +9,13 @@ top_srcdir = ../.. -NAME = $(top_srcdir)/bin/slice2cpp +include $(top_srcdir)/config/Make.rules.common + +ifeq ($(MinGW), yes) + NAME = $(top_srcdir)/bin/slice2cpp.exe +else + NAME = $(top_srcdir)/bin/slice2cpp +endif TARGETS = $(NAME) @@ -22,10 +28,15 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) +ifeq ($(MinGW), yes) +$(NAME): $(OBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) -lslice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) $(BASELIBS) $(MCPP_RPATH_LINK) +else $(NAME): $(OBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) -lSlice $(BASELIBS) $(MCPP_RPATH_LINK) - +endif install:: all $(call installprogram,$(NAME),$(install_bindir)) diff --git a/cpp/src/slice2cs/Gen.h b/cpp/src/slice2cs/Gen.h index 77e0c3ba90c..bec13760eaf 100644 --- a/cpp/src/slice2cs/Gen.h +++ b/cpp/src/slice2cs/Gen.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GEN_H -#define GEN_H +#pragma once #include <Slice/CsUtil.h> @@ -308,5 +307,3 @@ private: }; } - -#endif diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 04026196d4f..9cf0e4477e3 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -1454,11 +1454,7 @@ gen(const string& name, const UnitPtr& u, const vector<string>& includePaths, co } } - string s = fileH; - transform(s.begin(), s.end(), s.begin(), ToIfdef()); - H << "\n#ifndef __" << s << "__"; - H << "\n#define __" << s << "__"; - H << '\n'; + H << "#pragma once\n"; if(dicts.size() > 0) { @@ -1507,7 +1503,7 @@ gen(const string& name, const UnitPtr& u, const vector<string>& includePaths, co } } - H << "\n\n#endif\n"; + H << "\n\n"; CPP << '\n'; H.close(); diff --git a/cpp/src/slice2html/Gen.h b/cpp/src/slice2html/Gen.h index e0ecdc58651..1d526ccd15c 100644 --- a/cpp/src/slice2html/Gen.h +++ b/cpp/src/slice2html/Gen.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GEN_H -#define GEN_H +#pragma once #include <Slice/Parser.h> #include <IceUtil/OutputUtil.h> @@ -267,5 +266,3 @@ private: }; } - -#endif diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h index 94f0dc95a2d..e8b12e3743b 100644 --- a/cpp/src/slice2java/Gen.h +++ b/cpp/src/slice2java/Gen.h @@ -7,8 +7,7 @@ // // ********************************************************************** -#ifndef GEN_H -#define GEN_H +#pragma once #include <Slice/Parser.h> #include <Slice/JavaUtil.h> @@ -337,5 +336,3 @@ private: }; } - -#endif diff --git a/cpp/src/slice2rb/Makefile b/cpp/src/slice2rb/Makefile index 7e014004b32..1e4df68e074 100644 --- a/cpp/src/slice2rb/Makefile +++ b/cpp/src/slice2rb/Makefile @@ -9,7 +9,13 @@ top_srcdir = ../.. -NAME = $(top_srcdir)/bin/slice2rb +include $(top_srcdir)/config/Make.rules.common + +ifeq ($(MinGW), yes) + NAME = $(top_srcdir)/bin/slice2rb.exe +else + NAME = $(top_srcdir)/bin/slice2rb +endif TARGETS = $(NAME) @@ -21,9 +27,15 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) +ifeq ($(MinGW), yes) +$(NAME): $(OBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) -lslice$(COMPSUFFIX)$(SOVERSION)$(LIBSUFFIX) $(BASELIBS) $(MCPP_RPATH_LINK) +else $(NAME): $(OBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) -lSlice $(BASELIBS) $(MCPP_RPATH_LINK) +endif install:: all $(call installprogram,$(NAME),$(install_bindir)) diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak index 4b61e7d7d66..12a0b8186de 100644 --- a/cpp/test/Ice/Makefile.mak +++ b/cpp/test/Ice/Makefile.mak @@ -38,7 +38,7 @@ SUBDIRS = $(SUBDIRS) \ checksum \
stringConverter \
background \
- threadPoolPriority
+ threadPoolPriority \
custom \
properties \
servantLocator \
diff --git a/cpp/test/Ice/info/Makefile b/cpp/test/Ice/info/Makefile index fabbe5521b0..5df66daac71 100644 --- a/cpp/test/Ice/info/Makefile +++ b/cpp/test/Ice/info/Makefile @@ -31,14 +31,18 @@ SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules +ifneq ($(MinGW), yes) + ICESSL_LIBNAME = IceSSL +endif + CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(OPENSSL_RPATH_LINK) -lIceSSL $(LIBS) + $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(OPENSSL_RPATH_LINK) -l$(ICESSL_LIBNAME) $(LIBS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) + $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) -l$(ICESSL_LIBNAME) include .depend diff --git a/cpp/test/Ice/info/Makefile.mak b/cpp/test/Ice/info/Makefile.mak index e13d2019e6b..683d8b5d0b8 100644 --- a/cpp/test/Ice/info/Makefile.mak +++ b/cpp/test/Ice/info/Makefile.mak @@ -40,6 +40,7 @@ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN !if "$(WINRT)" != "yes"
LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+LIBS = $(LIBS) icessl$(LIBSUFFIX).lib
!else
LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
!endif
diff --git a/cpp/test/IceGrid/distribution/run.py b/cpp/test/IceGrid/distribution/run.py index 5bd5a77abd1..53b01e90a9c 100755 --- a/cpp/test/IceGrid/distribution/run.py +++ b/cpp/test/IceGrid/distribution/run.py @@ -21,11 +21,7 @@ sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceGridAdmin def icepatch2Calc(datadir, dirname): - icePatch2Calc = "" - if TestUtil.isBCC2010(): - icePatch2Calc = os.path.join(TestUtil.getServiceDir(), "icepatch2calc") - else: - icePatch2Calc = os.path.join(TestUtil.getCppBinDir(), "icepatch2calc") + icePatch2Calc = os.path.join(TestUtil.getCppBinDir(), "icepatch2calc") commandProc = TestUtil.spawn('"%s" "%s"' % (icePatch2Calc, os.path.join(datadir, dirname))) commandProc.waitTestSuccess() diff --git a/cpp/test/IceGrid/fileLock/run.py b/cpp/test/IceGrid/fileLock/run.py index b3eaad29b32..2b75cd0d533 100755 --- a/cpp/test/IceGrid/fileLock/run.py +++ b/cpp/test/IceGrid/fileLock/run.py @@ -27,7 +27,7 @@ IceGridAdmin.nreplicas = 0 def runIceGridRegistry(): iceGrid = "" - if TestUtil.isBCC2010() or TestUtil.isVC6(): + if TestUtil.isVC6(): iceGrid = os.path.join(TestUtil.getServiceDir(), "icegridregistry") else: iceGrid = os.path.join(TestUtil.getCppBinDir(), "icegridregistry") diff --git a/cpp/test/IceSSL/configuration/Makefile b/cpp/test/IceSSL/configuration/Makefile index e8b3203729c..776f8219eea 100644 --- a/cpp/test/IceSSL/configuration/Makefile +++ b/cpp/test/IceSSL/configuration/Makefile @@ -31,14 +31,18 @@ GENPIC = no include $(top_srcdir)/config/Make.rules +ifneq ($(MinGW), yes) +ICESSL_LIBNAME = IceSSL +endif + CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(LIBS) $(OPENSSL_RPATH_LINK) -lIceSSL + $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(LIBS) $(OPENSSL_RPATH_LINK) -l$(ICESSL_LIBNAME) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) $(OPENSSL_RPATH_LINK) -lIceSSL + $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS) $(OPENSSL_RPATH_LINK) -l$(ICESSL_LIBNAME) include .depend diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py index 96a89fb70b0..02439681c4f 100755 --- a/cpp/test/IceStorm/federation2/run.py +++ b/cpp/test/IceStorm/federation2/run.py @@ -20,11 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceStormUtil, Expect -iceStormAdmin = "" -if TestUtil.isBCC2010(): - iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") -else: - iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") +iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") publisher = os.path.join(os.getcwd(), "publisher") subscriber = os.path.join(os.getcwd(), "subscriber") diff --git a/cpp/test/IceStorm/stress/run.py b/cpp/test/IceStorm/stress/run.py index aa6634d1aaa..bfa6b739de4 100755 --- a/cpp/test/IceStorm/stress/run.py +++ b/cpp/test/IceStorm/stress/run.py @@ -20,11 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceStormUtil -iceStormAdmin = "" -if TestUtil.isBCC2010(): - iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") -else: - iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") +iceStormAdmin = TestUtil.getIceStormAdmin() publisher = os.path.join(os.getcwd(), "publisher") subscriber = os.path.join(os.getcwd(), "subscriber") diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp index 4f649c7e5ae..73543bb4a19 100644 --- a/cpp/test/IceUtil/inputUtil/Client.cpp +++ b/cpp/test/IceUtil/inputUtil/Client.cpp @@ -21,10 +21,7 @@ using namespace std; #define WS " \f\n\r\t\v" -#if defined(__BCPLUSPLUS__) -Int64 Int64Min = -9223372036854775808i64; -Int64 Int64Max = 9223372036854775807i64; -#elif defined(_MSC_VER) +#if defined(_MSC_VER) const Int64 Int64Min = -9223372036854775808i64; const Int64 Int64Max = 9223372036854775807i64; #elif defined(ICE_64) diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp index 32425cc7454..f05cb7646b7 100644 --- a/cpp/test/IceUtil/unicode/Client.cpp +++ b/cpp/test/IceUtil/unicode/Client.cpp @@ -23,8 +23,8 @@ using namespace std; // converts these BOMs back and forth. // -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32) && !defined(__BCPLUSPLUS__) +//COMPILERFIX: MINGW doesn't support wmain for console applications. +#if defined(_WIN32) && !defined(__MINGW32__) int wmain(int argc, wchar_t* argv[]) @@ -42,11 +42,11 @@ main(int argc, char* argv[]) { #ifdef _WIN32 -#ifdef __BCPLUSPLUS__ +# ifdef __MINGW32__ dir = argv[1]; -#else +# else dir = IceUtil::wstringToString(argv[1]); -#endif +# endif dir += "\\"; #else dir = argv[1]; @@ -179,7 +179,8 @@ main(int argc, char* argv[]) cout << "ok" << endl; } -#ifndef __BCPLUSPLUS__ + +#ifndef __MINGW32__ { cout << "testing UTF-8 filename... "; IceUtilInternal::ifstream fn(dir + "filename.txt"); @@ -206,11 +207,11 @@ main(int argc, char* argv[]) int fd = IceUtilInternal::open(filepath, O_RDONLY); test(fd > 0); -#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# if defined(_MSC_VER) && (_MSC_VER >= 1400) test(_close(fd) == 0); -#else +# else test(close(fd) == 0); -#endif +# endif FILE* f = IceUtilInternal::fopen(filepath, "r"); test(f != 0); diff --git a/cpp/test/Makefile b/cpp/test/Makefile index 4dbb8f55c7e..a56cf17c9f0 100644 --- a/cpp/test/Makefile +++ b/cpp/test/Makefile @@ -14,13 +14,17 @@ include $(top_srcdir)/config/Make.rules SUBDIRS = IceUtil \ Slice \ Ice \ - IceSSL \ - IceBox \ - IceStorm \ - Freeze \ - FreezeScript \ - Glacier2 \ - IceGrid + IceSSL + +ifneq ($(MinGW), yes) +SUBDIRS := $(SUBDIRS) \ + IceBox \ + IceStorm \ + Freeze \ + FreezeScript \ + Glacier2 \ + IceGrid +endif $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak index 8a7eac2d2f8..88280361582 100644 --- a/cpp/test/Makefile.mak +++ b/cpp/test/Makefile.mak @@ -20,12 +20,12 @@ SUBDIRS = Ice SUBDIRS = IceUtil \
Slice \
Ice \
- IceSSL
+ IceSSL \
Glacier2 \
Freeze \
IceStorm \
FreezeScript \
- IceGrid
+ IceGrid \
IceBox
!endif
diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h index 02d2adba199..c834907c00f 100644 --- a/cpp/test/include/TestCommon.h +++ b/cpp/test/include/TestCommon.h @@ -19,10 +19,6 @@ #include <cstdlib> -#ifdef __BCPLUSPLUS__ -#include <stdlib.h> -#endif - void inline print(const std::string& msg) { @@ -168,41 +164,41 @@ int mainEntryPoint(int, char**); } -class TestFailedException : public ::Ice::LocalException
-{
-public:
-
- TestFailedException(const char* file, int line) :
- LocalException(file, line)
- {
- }
-
- TestFailedException(const char* file, int line, const ::std::string& r) :
- LocalException(file, line),
- reason(r)
- {
- }
-
- virtual ~TestFailedException() throw()
- {
- }
-
- virtual ::std::string ice_name() const
- {
- return "::TestFailedException";
- }
-
- virtual ::Ice::Exception* ice_clone() const
- {
- return new TestFailedException(*this);
- }
-
- virtual void ice_throw() const
- {
- throw *this;
- }
-
- ::std::string reason;
+class TestFailedException : public ::Ice::LocalException +{ +public: + + TestFailedException(const char* file, int line) : + LocalException(file, line) + { + } + + TestFailedException(const char* file, int line, const ::std::string& r) : + LocalException(file, line), + reason(r) + { + } + + virtual ~TestFailedException() throw() + { + } + + virtual ::std::string ice_name() const + { + return "::TestFailedException"; + } + + virtual ::Ice::Exception* ice_clone() const + { + return new TestFailedException(*this); + } + + virtual void ice_throw() const + { + throw *this; + } + + ::std::string reason; }; void |