From f8f63c4dbd4774860455d0f7630b182052d034e1 Mon Sep 17 00:00:00 2001 From: nanbor Date: Fri, 3 May 2002 21:21:43 +0000 Subject: ChangeLogTag:Fri May 3 15:48:11 2002 Nanbor Wang --- ACEXML/Makefile | 1 + ACEXML/Makefile.bor | 3 +- ACEXML/apps/Makefile | 17 ++++++++++++ ACEXML/apps/Makefile.bor | 8 ++++++ ACEXML/apps/svcconf/Makefile | 40 +++++++++++++++++++++++++++ ACEXML/apps/svcconf/Makefile.bor | 20 ++++++++++++++ ACEXML/apps/svcconf/Svcconf.cpp | 4 +-- ACEXML/apps/svcconf/Svcconf_Handler.cpp | 20 +++++++++----- ACEXML/parser/parser/Makefile | 2 +- ChangeLog | 22 +++++++++++++++ ChangeLogs/ChangeLog-02a | 22 +++++++++++++++ ChangeLogs/ChangeLog-03a | 22 +++++++++++++++ ace/Makefile | 1 + ace/Makefile.am | 2 ++ ace/Makefile.bor | 1 + ace/Service_Config.cpp | 10 +++++-- ace/Service_Config.h | 1 + ace/ace.icc | 5 +++- examples/ASX/CCM_App/Makefile | 16 +++++++++++ examples/ASX/CCM_App/Makefile.CCM_App | 49 +++++++++++++++++++++++++++++++++ 20 files changed, 251 insertions(+), 15 deletions(-) create mode 100644 ACEXML/apps/Makefile create mode 100644 ACEXML/apps/Makefile.bor create mode 100644 ACEXML/apps/svcconf/Makefile create mode 100644 ACEXML/apps/svcconf/Makefile.bor create mode 100644 examples/ASX/CCM_App/Makefile.CCM_App diff --git a/ACEXML/Makefile b/ACEXML/Makefile index e355ff86344..ccba2b77d1c 100644 --- a/ACEXML/Makefile +++ b/ACEXML/Makefile @@ -6,6 +6,7 @@ DIRS = common \ parser \ + apps \ tests \ examples diff --git a/ACEXML/Makefile.bor b/ACEXML/Makefile.bor index 0e25ede588e..85ed6f2c300 100644 --- a/ACEXML/Makefile.bor +++ b/ACEXML/Makefile.bor @@ -4,6 +4,7 @@ DIRS = \ common \ - parser + parser \ + apps !include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/ACEXML/apps/Makefile b/ACEXML/apps/Makefile new file mode 100644 index 00000000000..a5f05b99ae5 --- /dev/null +++ b/ACEXML/apps/Makefile @@ -0,0 +1,17 @@ +#---------------------------------------------------------------------------- +# $Id$ +# +# Makefile for the client programs that test the ACE network services +#---------------------------------------------------------------------------- + +DIRS = svcconf + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/ACEXML/apps/Makefile.bor b/ACEXML/apps/Makefile.bor new file mode 100644 index 00000000000..1da5c84407c --- /dev/null +++ b/ACEXML/apps/Makefile.bor @@ -0,0 +1,8 @@ +# +# Makefile for building the ACE XML Library +# + +DIRS = \ + svcconf + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/ACEXML/apps/svcconf/Makefile b/ACEXML/apps/svcconf/Makefile new file mode 100644 index 00000000000..fced65f587e --- /dev/null +++ b/ACEXML/apps/svcconf/Makefile @@ -0,0 +1,40 @@ +#---------------------------------------------------------------------------- +# $Id$ +# +# Makefile for the server-side ACE network services +#---------------------------------------------------------------------------- + +LIB = libACEXML_XML_Svc_Conf_Parser.a +SHLIB = libACEXML_XML_Svc_Conf_Parser.$(SOEXT) + +FILES = Svcconf_Handler \ + Svcconf + +DEFS = $(addsuffix .h,$(FILES)) +LSRC = $(addsuffix .cpp,$(FILES)) + +LIBS += -lACEXML_Parser -lACEXML $(ACELIB) +CCFLAGS += -I../.. + +BUILD = $(VLIB) $(VSHLIB) + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/ACEXML/apps/svcconf/Makefile.bor b/ACEXML/apps/svcconf/Makefile.bor new file mode 100644 index 00000000000..0f40444b564 --- /dev/null +++ b/ACEXML/apps/svcconf/Makefile.bor @@ -0,0 +1,20 @@ +# Makefile for building the parser + +NAME = ACEXML_XML_Svc_Conf_Parser + +OBJFILES = \ + $(OBJDIR)\Svcconf.obj \ + $(OBJDIR)\Svcconf_Handler.obj + +CFLAGS = \ + $(ACE_CFLAGS) \ + $(ACE_XML_CFLAGS) + +CPPDIR = .;.. + +LIBFILES = \ + $(ACE_LIB) \ + $(ACE_XML_LIB) +# WE need both -lACEXML and -lACEXML_Parser here + +!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor> diff --git a/ACEXML/apps/svcconf/Svcconf.cpp b/ACEXML/apps/svcconf/Svcconf.cpp index 86b15fa65ac..919b5f39818 100644 --- a/ACEXML/apps/svcconf/Svcconf.cpp +++ b/ACEXML/apps/svcconf/Svcconf.cpp @@ -1,7 +1,7 @@ // $Id$ -#include "SvcConf.h" +#include "Svcconf.h" #include "common/FileCharStream.h" #include "common/StrCharStream.h" #include "parser/parser/Parser.h" @@ -40,7 +40,7 @@ ACEXML_Svcconf_Parser::operator new (size_t s) void ACEXML_Svcconf_Parser::operator delete (void *p) { - delete[] p; + delete[] (char *)p; } int diff --git a/ACEXML/apps/svcconf/Svcconf_Handler.cpp b/ACEXML/apps/svcconf/Svcconf_Handler.cpp index 0c70eda05e4..87a908f067e 100644 --- a/ACEXML/apps/svcconf/Svcconf_Handler.cpp +++ b/ACEXML/apps/svcconf/Svcconf_Handler.cpp @@ -518,7 +518,7 @@ ACEXML_Svcconf_Handler::get_stream_id (ACEXML_Attributes *alist, } else { - // @@ Exception... + xmlenv.exception (new ACEXML_SAXException ("Invalid stream attribute\n")); return -1; } } @@ -538,7 +538,7 @@ ACEXML_Svcconf_Handler::get_id (ACEXML_Attributes *alist, } else { - // @@ Exception... + xmlenv.exception (new ACEXML_SAXException ("Invalid attribute, expecting 'id'\n")); return -1; } } @@ -564,13 +564,17 @@ ACEXML_Svcconf_Handler::get_dynamic_attrs (ACEXML_Attributes *alist, { if (ACE_OS_String::strcmp (alist->getValue (i), ACE_TEXT ("inactive")) == 0) { + info->active (0); } else if (ACE_OS_String::strcmp (alist->getValue (i), ACE_TEXT ("active")) == 0) { + info->active (1); } else { - // @@ error, invalid 'status' value. + xmlenv.exception + (new ACEXML_SAXException ("Invalid attribute value, expecting 'active' or 'inactive'\n")); + return -1; } } else if (ACE_OS_String::strcmp (alist->getQName (i), ACE_TEXT ("type")) == 0) @@ -589,12 +593,14 @@ ACEXML_Svcconf_Handler::get_dynamic_attrs (ACEXML_Attributes *alist, } else { - // @@ error, invalid 'type' value. + xmlenv.exception + (new ACEXML_SAXException ("Invalid Service_Object attribute value\n")); + return -1; } } else { - // @@ Exception... + xmlenv.exception (new ACEXML_SAXException ("Invalid attribute\n")); return -1; } } @@ -627,7 +633,7 @@ ACEXML_Svcconf_Handler::get_initializer_attrs (ACEXML_Attributes *alist, } else { - // @@ Exception... + xmlenv.exception (new ACEXML_SAXException ("Invalid initializer attribute.\n")); return -1; } } @@ -656,7 +662,7 @@ ACEXML_Svcconf_Handler::get_static_attrs (ACEXML_Attributes *alist, } else { - // @@ Exception... + xmlenv.exception (new ACEXML_SAXException ("Invalid static attribute.\n")); return -1; } } diff --git a/ACEXML/parser/parser/Makefile b/ACEXML/parser/parser/Makefile index 7eaddca72de..dcc47e84914 100644 --- a/ACEXML/parser/parser/Makefile +++ b/ACEXML/parser/parser/Makefile @@ -13,7 +13,7 @@ FILES = Entity_Manager \ DEFS = $(addsuffix .h,$(FILES)) LSRC = $(addsuffix .cpp,$(FILES)) -LIBS += $(ACELIB) +LIBS += -lACEXML $(ACELIB) CCFLAGS += -I../.. BUILD = $(VLIB) $(VSHLIB) diff --git a/ChangeLog b/ChangeLog index e0ce3b99e56..41166911a4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +Fri May 3 15:48:11 2002 Nanbor Wang + + * ace/Service_Config.h: + * ACEXML/apps/svcconf/Svcconf.cpp: Fixed Linux compilation warnings. + + * ACEXML/apps/svcconf/Svcconf_Handler.cpp: + * ace/Service_Config.cpp: Added more comprehensive error messages. + + * ACEXML/Makefile: + * ACEXML/Makefile.bor: + * ACEXML/apps/Makefile: + * ACEXML/apps/Makefile.bor: + * ACEXML/apps/svcconf/Makefile: + * ACEXML/apps/svcconf/Makefile.bor: + * ACEXML/parser/parser/Makefile: + * ace/Makefile: + * ace/Makefile.am: + * ace/Makefile.bor: + * ace/ace.icc: + * examples/ASX/CCM_App/Makefile: + * examples/ASX/CCM_App/Makefile.CCM_App: Added or Updated Makefiles. + Wed May 01 16:08:45 2002 Nanbor Wang * bin/svcconf-convert.pl: Added more debugging info printout. diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index e0ce3b99e56..41166911a4c 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,25 @@ +Fri May 3 15:48:11 2002 Nanbor Wang + + * ace/Service_Config.h: + * ACEXML/apps/svcconf/Svcconf.cpp: Fixed Linux compilation warnings. + + * ACEXML/apps/svcconf/Svcconf_Handler.cpp: + * ace/Service_Config.cpp: Added more comprehensive error messages. + + * ACEXML/Makefile: + * ACEXML/Makefile.bor: + * ACEXML/apps/Makefile: + * ACEXML/apps/Makefile.bor: + * ACEXML/apps/svcconf/Makefile: + * ACEXML/apps/svcconf/Makefile.bor: + * ACEXML/parser/parser/Makefile: + * ace/Makefile: + * ace/Makefile.am: + * ace/Makefile.bor: + * ace/ace.icc: + * examples/ASX/CCM_App/Makefile: + * examples/ASX/CCM_App/Makefile.CCM_App: Added or Updated Makefiles. + Wed May 01 16:08:45 2002 Nanbor Wang * bin/svcconf-convert.pl: Added more debugging info printout. diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index e0ce3b99e56..41166911a4c 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,25 @@ +Fri May 3 15:48:11 2002 Nanbor Wang + + * ace/Service_Config.h: + * ACEXML/apps/svcconf/Svcconf.cpp: Fixed Linux compilation warnings. + + * ACEXML/apps/svcconf/Svcconf_Handler.cpp: + * ace/Service_Config.cpp: Added more comprehensive error messages. + + * ACEXML/Makefile: + * ACEXML/Makefile.bor: + * ACEXML/apps/Makefile: + * ACEXML/apps/Makefile.bor: + * ACEXML/apps/svcconf/Makefile: + * ACEXML/apps/svcconf/Makefile.bor: + * ACEXML/parser/parser/Makefile: + * ace/Makefile: + * ace/Makefile.am: + * ace/Makefile.bor: + * ace/ace.icc: + * examples/ASX/CCM_App/Makefile: + * examples/ASX/CCM_App/Makefile.CCM_App: Added or Updated Makefiles. + Wed May 01 16:08:45 2002 Nanbor Wang * bin/svcconf-convert.pl: Added more debugging info printout. diff --git a/ace/Makefile b/ace/Makefile index 976ce20de35..3c7eda53f96 100644 --- a/ace/Makefile +++ b/ace/Makefile @@ -188,6 +188,7 @@ SVCCONF_FILES = \ Service_Types \ Service_Templates \ Shared_Object \ + XML_Svc_Conf \ Svc_Conf_l \ Svc_Conf_y \ Svc_Conf_Lexer_Guard diff --git a/ace/Makefile.am b/ace/Makefile.am index 2f45abac6d5..068008d1e90 100644 --- a/ace/Makefile.am +++ b/ace/Makefile.am @@ -322,6 +322,7 @@ libACE_Svcconf_la_SOURCES = \ Service_Types.cpp \ Service_Templates.cpp \ Shared_Object.cpp \ + XML_Svc_Conf.cpp \ Svc_Conf_l.cpp \ Svc_Conf_y.cpp \ Svc_Conf_Lexer_Guard.cpp @@ -803,6 +804,7 @@ HEADER_FILES = \ WFMO_Reactor.h \ WIN32_Asynch_IO.h \ WIN32_Proactor.h \ + XML_Svc_Conf.h \ XTI_ATM_Mcast.h \ XtReactor.h \ ace_wchar.h \ diff --git a/ace/Makefile.bor b/ace/Makefile.bor index 0cc613f4843..d1b2014b99c 100644 --- a/ace/Makefile.bor +++ b/ace/Makefile.bor @@ -232,6 +232,7 @@ OBJFILES = \ $(OBJDIR)\WFMO_Reactor.obj \ $(OBJDIR)\WIN32_Asynch_IO.obj \ $(OBJDIR)\WIN32_Proactor.obj \ + $(OBJDIR)\XML_Svc_Conf.obj \ $(OBJDIR)\XtReactor.obj RESOURCE = $(OBJDIR)\ace.res diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 30fac1174e4..be58c86edde 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -384,7 +384,11 @@ ACE_Service_Config::process_directives_i (ACE_Svc_Conf_Param *param) ACE_XML_Svc_Conf * ACE_Service_Config::get_xml_svc_conf (ACE_DLL &xmldll) { - xmldll.open (ACE_LIB_TEXT ("ACEXML_XML_Svc_Conf_Parser")); + if (xmldll.open (ACE_LIB_TEXT ("ACEXML_XML_Svc_Conf_Parser")) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_LIB_TEXT ("Fail to open ACEXML_XML_Svc_Conf_Parser: %p\n"), + "ACE_Service_Config::get_xml_svc_conf"), + 0); void *foo; @@ -398,7 +402,7 @@ ACE_Service_Config::get_xml_svc_conf (ACE_DLL &xmldll) ACE_XML_Svc_Conf::Factory factory = ACE_reinterpret_cast (ACE_XML_Svc_Conf::Factory, tmp); if (factory == 0) ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), + ACE_TEXT ("Unable to resolve factory: %p\n"), xmldll.error ()), 0); @@ -411,9 +415,9 @@ ACE_Service_Config::process_file (const ACE_TCHAR file[]) { ACE_TRACE ("ACE_Service_Config::process_file"); +#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) int result = 0; -#if defined (ACE_USES_CLASSIC_SVC_CONF) && (ACE_USES_CLASSIC_SVC_CONF == 1) FILE *fp = ACE_OS::fopen (file, ACE_LIB_TEXT ("r")); diff --git a/ace/Service_Config.h b/ace/Service_Config.h index 8a43bd44b21..64305340b1f 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -13,6 +13,7 @@ #ifndef ACE_SERVICE_CONFIG_H #define ACE_SERVICE_CONFIG_H #include "ace/pre.h" +#include "ace/config-all.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/ace/ace.icc b/ace/ace.icc index 9d34417e22e..a034dc7966d 100755 --- a/ace/ace.icc +++ b/ace/ace.icc @@ -386,6 +386,7 @@ group SVCCONF_FILES = "Service_Types.cpp", "Service_Templates.cpp", "Shared_Object.cpp", + "XML_Svc_Conf.cpp", "Svc_Conf_l.cpp", "Svc_Conf_y.cpp", "Svc_Conf_Lexer_Guard.cpp" @@ -399,7 +400,9 @@ group SVCCONF_INCLUDES = "Service_Repository.h", "Service_Types.h", "Service_Templates.h", - "Shared_Object.h" + "Shared_Object.h", + "Svc_Conf.h", + "XML_Svc_Conf.h" group STREAMS_FILES = "CDR_Base.cpp", diff --git a/examples/ASX/CCM_App/Makefile b/examples/ASX/CCM_App/Makefile index a52c2beba14..9d796f84d39 100644 --- a/examples/ASX/CCM_App/Makefile +++ b/examples/ASX/CCM_App/Makefile @@ -9,6 +9,8 @@ # Local macros #---------------------------------------------------------------------------- +LIBS += $(ACELIB) -lACEXML_Parser -lACEXML + BIN = SC_Client \ SC_Server @@ -30,11 +32,25 @@ include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU + +ifdef shared_libs + ifndef VXWORKS + #### Build libCCM_App library first, + #### so that they don't see the template instantiations from all + #### of the tests. + BUILD := \ + libCCM_App.$(SOEXT) \ + $(BUILD) + endif # ! VXWORKS +endif # shared_libs + include $(ACE_ROOT)/include/makeinclude/rules.local.GNU #---------------------------------------------------------------------------- # Local targets #---------------------------------------------------------------------------- +libCCM_App.$(SOEXT): CCM_App.cpp + @$(MAKE) -f Makefile.CCM_App #---------------------------------------------------------------------------- # Dependencies diff --git a/examples/ASX/CCM_App/Makefile.CCM_App b/examples/ASX/CCM_App/Makefile.CCM_App new file mode 100644 index 00000000000..3a5f20e1e4b --- /dev/null +++ b/examples/ASX/CCM_App/Makefile.CCM_App @@ -0,0 +1,49 @@ +#---------------------------------------------------------------------------- +# $Id$ +# +# Makefile for the DLL library in the DLL_Test example +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +LIB = libCCM_App.a +SHLIB = libCCM_App.$(SOEXT) +FILES = CCM_App +LSRC = $(addsuffix .cpp,$(FILES)) + +LIBS += $(ACELIB) + +BUILD = $(VLIB) $(VSHLIB) + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +# To remake the DLL_Test source with xlC on AIX, it works +# best to wipe out any previously-created tempinc directory. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc) +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -- cgit v1.2.1