Patches for ILU 2.0alpha11

Revised $Date: 1997/11/11 00:22:42 $ GMT

About Patches

Getting the "patch" program

The program "patch" is distributed from a number of places, and odds are you already have it on your system. If not, try ftp://gatekeeper.dec.com/pub/BSD/FreeBSD/FreeBSD-current/src/gnu/usr.bin/patch/ for the sources. On Windows platforms, there appears to be a version in the Win32 distribution of the GNU tools.

Applying a patch

To patch your sources, copy any patch listed below into a patch file. If you're going to apply more than one, apply them in order, and put each patch in a separate patch file. Then change your working directory to the top of the ILU source tree (ILUSRC), and use the command "patch -p", redirecting standard input to come from this file. For example, if you had put the ILU sources in /usr/local/ilu/src, and had put the patch in /usr/local/ilu/src/this-patch, you'd type
  % cd /usr/local/ilu/src
  % patch -p < /usr/local/ilu/src/this-patch
  [...various output from the patch program...]
  %
NOTE: On a fresh (unpatched) distribution, it usually works to just feed this entire patch.html file into the patch program, e.g. patch -l -p < patch.html
WARNING: copying these files from a browser may produce problems with some patches due to a conversion of tabs to spaces. If you have a patch application fail, try specifying the -l switch to patch. Also, when ftp'ing this page, use binary transfer. On Windows, some patches may be reported as malformed if you transfer the file in ascii mode.

Actual Patches


  • An automatic buffer in the C stubber was being returned from a function. This could cause a variety of problems depending on the platform. Patch courtesy of Martin Cracauer!

    *** stubbers/c/names.c.original	Sat Sep 27 20:46:30 1997
    --- stubbers/c/names.c	Sat Sep 27 20:46:47 1997
    ***************
    *** 270,276 ****
        string n;
      
        if ((n = name_lang_name (type->name, "C-typecode")) == NULL) {
    !     char buf[ 500 ];
          char *tname;
      
          tname = c_type_name(type);
    --- 270,276 ----
        string n;
      
        if ((n = name_lang_name (type->name, "C-typecode")) == NULL) {
    !     static char buf[ 500 ];
          char *tname;
      
          tname = c_type_name(type);
    

  • IDL files that include other idl files can cause a stubber to core dump. Thanks to Ted Phelps and Martin Loewis! (Note that if you for some reason rerun bison on the idlparser.y file, it's that file where you should change the #define for HAVE_SCOPING)

    *** stubbers/idl/idlparser.c.orig Thu Sep 25 14:35:55 1997
    --- stubbers/idl/idlparser.c	Mon Sep 29 10:47:43 1997
    ***************
    *** 79,85 ****
      
      /* tunable parameters. For 2.0a10 compatibility, all should be 0 */
      #define LOCAL_TYPES_HAVE_REP_IDS  0
    ! #define HAVE_SCOPING              0
      #define HAVE_STRNDUP              0
      
      /* Make the Bison parser produce better error messages */
    --- 79,85 ----
      
      /* tunable parameters. For 2.0a10 compatibility, all should be 0 */
      #define LOCAL_TYPES_HAVE_REP_IDS  0
    ! #define HAVE_SCOPING              1
      #define HAVE_STRNDUP              0
      
      /* Make the Bison parser produce better error messages */
    
    *** stubbers/parser/util.c.orig	Thu Sep 25 14:29:52 1997
    --- stubbers/parser/util.c	Mon Sep 29 10:57:02 1997
    ***************
    *** 80,86 ****
            fprintf (stderr, "Couldn't find interface \"%s\".\n", s->name);
            exit(1);
          }
    !   else
          fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, i->filename, ModTime(i->filename));
      }
      
    --- 80,86 ----
            fprintf (stderr, "Couldn't find interface \"%s\".\n", s->name);
            exit(1);
          }
    !   if (i->filename)
          fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, i->filename, ModTime(i->filename));
      }
    
    

  • On Win32, the makefile for the Java runtime using Javasoft was missing a directory specifier when building in 'Release' mode. Thanks to Jeff Bauer!

    *** runtime/java/ilujsoft.mak.orig	Thu Sep 25 14:31:46 1997
    --- runtime/java/ilujsoft.mak	Mon Sep 29 17:29:58 1997
    ***************
    *** 477,483 ****
      !IF  "$(CFG)" == "Win32 Release"
      
      DEP_CPP_ILUJA=\
    ! 	"\runtime\java\build\xerox_ilu_ilucall.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_iluclassrep.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_ilugcclient.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_ilumethodrep.h"\
    --- 477,483 ----
      !IF  "$(CFG)" == "Win32 Release"
      
      DEP_CPP_ILUJA=\
    ! 	"$(ILUSRC)\runtime\java\build\xerox_ilu_ilucall.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_iluclassrep.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_ilugcclient.h"\
      	"$(ILUSRC)\runtime\java\build\xerox_ilu_ilumethodrep.h"\
    

  • The Imakefile for the Java runtime was replacing rather than adding to the CLASSPATH environment variable, causing javac errors for some folks. Thanks to Martin Kaul!

    *** runtime/java/Imakefile.orig	Thu Sep 25 14:31:32 1997
    --- runtime/java/Imakefile	Tue Sep 30 09:28:51 1997
    ***************
    *** 34,40 ****
      all:: compiled extraSources								@@\
      											@@\
      compiled : sources									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAC) -g -d "$(JAVA_CLASS_DIR)" sources @@\
      											@@\
      install:: compiled									@@\
      	@sh -c 'for i in compiled;  do  \						@@\
    --- 34,40 ----
      all:: compiled extraSources								@@\
      											@@\
      compiled : sources									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAC) -g -d "$(JAVA_CLASS_DIR)" sources @@\
      											@@\
      install:: compiled									@@\
      	@sh -c 'for i in compiled;  do  \						@@\
    ***************
    *** 60,67 ****
      											@@\
      stubfiles : className.java								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAH) -d stubdir -stubs packagePrefix.className @@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAH) -d stubdir packagePrefix.className	@@\
      											@@\
      CleanTarget(stubfiles)
      
    --- 60,67 ----
      											@@\
      stubfiles : className.java								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAH) -d stubdir -stubs packagePrefix.className @@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAH) -d stubdir packagePrefix.className	@@\
      											@@\
      CleanTarget(stubfiles)
      
    ***************
    *** 78,84 ****
      											@@\
      stubfile : className.java								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAH) -d stubdir packagePrefix.className	@@\
      											@@\
      CleanTarget(stubfile)
      
    --- 78,84 ----
      											@@\
      stubfile : className.java								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAH) -d stubdir packagePrefix.className	@@\
      											@@\
      CleanTarget(stubfile)
      
    ***************
    *** 93,99 ****
      											@@\
      stubfile : fileName								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAH) -d stubdir className	@@\
      											@@\
      CleanTarget(stubfile)
      
    --- 93,99 ----
      											@@\
      stubfile : fileName								@@\
      	$(RM) $@									@@\
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAH) -d stubdir className	@@\
      											@@\
      CleanTarget(stubfile)
      
    ***************
    *** 129,138 ****
       */
      
      make.gnh:	ilunative.in
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVAC) -d "$(JAVA_CLASS_DIR)" gnh.java
      	rm -f ilunative.h
      	rm -f ilunative.c
    ! 	CLASSPATH="$(JAVA_CLASS_DIR)"; export CLASSPATH ; $(JAVA_HOME)/bin/java xerox.ilu.tools.gnh -oni ilunative.in
      	rm -f $(JAVA_CLASS_DIR)/xerox/ilu/tools/gnh.class
      	touch make.gnh
      
    --- 129,138 ----
       */
      
      make.gnh:	ilunative.in
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVAC) -d "$(JAVA_CLASS_DIR)" gnh.java
      	rm -f ilunative.h
      	rm -f ilunative.c
    ! 	CLASSPATH="$(JAVA_CLASS_DIR):$(CLASSPATH)"; export CLASSPATH ; $(JAVA_HOME)/bin/java xerox.ilu.tools.gnh -oni ilunative.in
      	rm -f $(JAVA_CLASS_DIR)/xerox/ilu/tools/gnh.class
      	touch make.gnh
      
    

  • Use of the C++ 'class' keyword in one of the C header files can cause problems when attempting to mix C and C++ code. Thanks to Ole Vilmann!

    *** runtime/c/ilucstub.h.orig	Thu Sep 25 14:32:01 1997
    --- runtime/c/ilucstub.h	Wed Oct  1 11:10:04 1997
    ***************
    *** 381,387 ****
      } _ILU_C_ParmDesc;
      
      ILU_RUNTIME_PUBLIC void
    !   _ILU_C_VectorCall (ilu_Class class, ilu_Method method,
      		     _ILU_C_ExceptionDescription *evec,
      		     ILU_C_Object *discriminant,
      		     ILU_C_ENVIRONMENT *status,
    --- 381,387 ----
      } _ILU_C_ParmDesc;
      
      ILU_RUNTIME_PUBLIC void
    !   _ILU_C_VectorCall (ilu_Class pclass, ilu_Method method,
      		     _ILU_C_ExceptionDescription *evec,
      		     ILU_C_Object *discriminant,
      		     ILU_C_ENVIRONMENT *status,
    

  • C stubber was generating incorrect Sequence Pop code for sequences whose elements were not normally pointers (e.g. longs). Thanks to Robert Wamble!

    *** stubbers/c/cheaders.c.orig	Thu Sep 25 14:29:54 1997
    --- stubbers/c/cheaders.c	Wed Oct  1 15:27:45 1997
    ***************
    *** 866,872 ****
            fprintf (c->file, "void %s_Every (%s *h, void (*f)(%s%s, void *), void *);\n", tn, tn, st, nr ? "" : "*");
            fprintf (c->file, "void %s_Append (%s *h, %s item);\n", tn, tn, st);
            fprintf (c->file, "void %s_Push (%s *h, %s item);\n", tn, tn, st);
    !       fprintf (c->file, "void %s_Pop (%s *h, %s item);\n", tn, tn, st);
            fprintf (c->file, "CORBA_unsigned_long %s_Length (%s *);\n", tn, tn);
            fprintf (c->file, "%s * %s_Nth (%s *, CORBA_unsigned_long);\n", rtn, tn, tn);
            fprintf (c->file, "%s * %s_Create (CORBA_unsigned_long /* size */, %s %s /* init val */);\n", tn, tn, st, (nr) ? "" : "*");
    --- 866,872 ----
            fprintf (c->file, "void %s_Every (%s *h, void (*f)(%s%s, void *), void *);\n", tn, tn, st, nr ? "" : "*");
            fprintf (c->file, "void %s_Append (%s *h, %s item);\n", tn, tn, st);
            fprintf (c->file, "void %s_Push (%s *h, %s item);\n", tn, tn, st);
    !       fprintf (c->file, "void %s_Pop (%s *h, %s %sitem);\n", tn, tn, st, (nr) ? "" : "*");
            fprintf (c->file, "CORBA_unsigned_long %s_Length (%s *);\n", tn, tn);
            fprintf (c->file, "%s * %s_Nth (%s *, CORBA_unsigned_long);\n", rtn, tn, tn);
            fprintf (c->file, "%s * %s_Create (CORBA_unsigned_long /* size */, %s %s /* init val */);\n", tn, tn, st, (nr) ? "" : "*");
    *** stubbers/c/code.c.orig	Thu Sep 25 14:29:55 1997
    --- stubbers/c/code.c	Wed Oct  1 15:27:29 1997
    ***************
    *** 1960,1969 ****
      	    rtn);
          fprintf(f, "}\n\n");
      
    !     fprintf(f, "void %s_Pop (%s *h, %s item)\n{\n", tn, tn, st);
          fprintf(f, "  _ILU_C_PopGeneric (%s, %s, sizeof(%s));\n}\n\n",
      	    "(ILU_C_Sequence) h",
    ! 	    (hasReferent) ? "(char *) item" : "(char *) &item",
      	    rtn);
      
          fprintf(f, "CORBA_unsigned_long %s_Length (%s *h)\n{\n", tn, tn);
    --- 1960,1969 ----
      	    rtn);
          fprintf(f, "}\n\n");
      
    !     fprintf(f, "void %s_Pop (%s *h, %s %sitem)\n{\n", tn, tn, st, (hasReferent) ? "" : "*");
          fprintf(f, "  _ILU_C_PopGeneric (%s, %s, sizeof(%s));\n}\n\n",
      	    "(ILU_C_Sequence) h",
    ! 	    "(char *) item",
      	    rtn);
      
          fprintf(f, "CORBA_unsigned_long %s_Length (%s *h)\n{\n", tn, tn);
    

  • IIOP has problems working with ORBs which do not define the CODE_SET tag in their IOR, due to an uninitialized data structure. This should alleviate that problem.

    *** 1.149	1997/09/23 17:48:13
    --- runtime/kernel/iiop.c	1997/10/07 02:47:51
    ***************
    *** 522,527 ****
    --- 522,529 ----
        p->objKeyLen = 0;
        p->principal = NIL;
        p->principalLen = 0;
    +   p->short_char_codeset = ilu_IIOP_NATIVE_SHORT_CHAR_CODE_SET_ID;
    +   p->char_codeset = 0;
        return (p);
      }
      
    ***************
    *** 1725,1732 ****
      		*mstid = _ilu_Strdup(ior->type_id);
      	      stat = parse_ILU_Profile (&ior->Profile[i],
      					ih, sid, NIL, cinfo, cinfolen, err);
    ! 	      if (stat)
      		break;
      	    }
      	}
            if (! stat) {
    --- 1727,1739 ----
      		*mstid = _ilu_Strdup(ior->type_id);
      	      stat = parse_ILU_Profile (&ior->Profile[i],
      					ih, sid, NIL, cinfo, cinfolen, err);
    ! 	      if (stat) {
    ! 		if ((short_char_codeset != NIL) && (*short_char_codeset == 0))
    ! 		  *short_char_codeset = ilu_IIOP_NATIVE_SHORT_CHAR_CODE_SET_ID;
    ! 		if ((char_codeset != NIL) && (*char_codeset == 0))
    ! 		  *char_codeset = ilu_IIOP_NATIVE_CHAR_CODE_SET_ID;
      		break;
    + 	      };
      	    }
      	}
            if (! stat) {
    ***************
    *** 1754,1759 ****
    --- 1761,1769 ----
            /* XXX -- if no character codesets were specified, use defaults */
            if ((short_char_codeset != NIL) && (*short_char_codeset == 0))
      	*short_char_codeset = ilu_IIOP_NATIVE_SHORT_CHAR_CODE_SET_ID;
    +       /* XXX -- this is wrong; it should be 0, but that means that we should
    + 	 check all interfaces of the object being reified to see that they
    + 	 don't use wchar or wstring, and that's too expensive */
            if ((char_codeset != NIL) && (*char_codeset == 0))
      	*char_codeset = ilu_IIOP_NATIVE_CHAR_CODE_SET_ID;
      
    ***************
    *** 1799,1804 ****
    --- 1809,1818 ----
          {
            if (((short_char_codeset != ilu_IIOP_NATIVE_SHORT_CHAR_CODE_SET_ID) &&
      	   (codeset_err = ilu_iom_short_char_codeset)) ||
    + 	  /* XXX - this next clause is wrong; we should really allow a value
    + 	     of 0 as well, but that means we'd have to grovel over the interfaces
    + 	     of the object to ensure they don't use wchar or wstring, and that's
    + 	     too painful. */
      	  ((char_codeset != ilu_IIOP_NATIVE_CHAR_CODE_SET_ID) &&
      	   (codeset_err = ilu_iom_char_codeset))) {
      	ilu_free(sid);
    ***************
    *** 2051,2056 ****
    --- 2065,2074 ----
        ilu_free(p);
        if (((short_char_codeset != ilu_IIOP_NATIVE_SHORT_CHAR_CODE_SET_ID) &&
             (codeset_err = ilu_iom_short_char_codeset)) ||
    +       /* XXX - this next clause is wrong; we should really allow a value
    + 	 of 0 as well, but that means we'd have to grovel over the interfaces
    + 	 of the object to ensure they don't use wchar or wstring, and that's
    + 	 too painful. */
            ((char_codeset != ilu_IIOP_NATIVE_CHAR_CODE_SET_ID) &&
             (codeset_err = ilu_iom_char_codeset))) {
          ilu_free(sid);
    

  • Collection of a Collectible object in Python when running threaded could cause the interpreter lock to remain held, blocking further progress.

    *** runtime/python/iluPrmodule.c.orig	Thu Sep 25 14:32:03 1997
    --- runtime/python/iluPrmodule.c	Thu Oct 23 13:54:20 1997
    ***************
    *** 1520,1526 ****
      }
      
      static void
    !   setupGCCleanupAlarm (void)
      {
        if (gcAlarmSet)
          return;
    --- 1520,1526 ----
      }
      
      static void
    !   setupGCCleanupAlarm (ilu_boolean b_calling_from_kernel)
      {
        if (gcAlarmSet)
          return;
    ***************
    *** 1531,1537 ****
        _ilu_Assert(gcAlarm != ILU_NIL, "failed to create GC alarm");
      
      #ifdef ILU_PYTHON_THREADS
    !   if (ilupython_threaded_operation)
          {
            CALL_KERNEL(ilupython_threaded_operation, ilu_SetAlarm(gcAlarm, ilu_FineTime_Add(ilu_FineTime_Now(), plus1Minute), bootstrapAlarm, (void *)&gc_alarm_rock));
          }
    --- 1531,1543 ----
        _ilu_Assert(gcAlarm != ILU_NIL, "failed to create GC alarm");
      
      #ifdef ILU_PYTHON_THREADS
    !   /* if we're running threaded and we're Not calling from the kernel i.e. calling from ilumod_Delete, 
    !      we know we should be (un)grabbing the interpreter lock via the CALL_KERNEL
    !      macro.  If we are calling from the kernel, i.e. from trackKernelInterest,
    !      we don't want to use CALL_KERNEL because it will release the lock, do the call 
    !      and then grab the lock, preventing anything else from using the interpreter.
    !      */
    !   if (ilupython_threaded_operation && !b_calling_from_kernel)
          {
            CALL_KERNEL(ilupython_threaded_operation, ilu_SetAlarm(gcAlarm, ilu_FineTime_Add(ilu_FineTime_Now(), plus1Minute), bootstrapAlarm, (void *)&gc_alarm_rock));
          }
    ***************
    *** 1609,1615 ****
      		gcList = PyList_New(1);
      
      	      addObjToGCList (gcList, (PyObject *) inst);
    ! 	      setupGCCleanupAlarm();
      	    }
      	  Py_DECREF(inst);
      	  /*
    --- 1615,1621 ----
      		gcList = PyList_New(1);
      
      	      addObjToGCList (gcList, (PyObject *) inst);
    ! 	      setupGCCleanupAlarm(ilu_TRUE);
      	    }
      	  Py_DECREF(inst);
      	  /*
    ***************
    *** 2208,2214 ****
      	gcList = PyList_New(1);
      
            addObjToGCList (gcList, (PyObject *) inst);
    !       setupGCCleanupAlarm();
          }
      #ifdef ILU_OLD_PYTHON_GC_BEHAVIOR
        Py_DECREF(inst);
    --- 2214,2220 ----
      	gcList = PyList_New(1);
      
            addObjToGCList (gcList, (PyObject *) inst);
    !       setupGCCleanupAlarm(ilu_FALSE);
          }
      #ifdef ILU_OLD_PYTHON_GC_BEHAVIOR
        Py_DECREF(inst);
    

  • It's possible (and legal) for iluparser_GetProgramName() to return NIL. But the stubbers don't like that. This patches fixes that dislike.

    *** 1.21	1996/11/08 03:56:12
    --- stubbers/lisp/lisp.c	1997/10/24 02:30:10
    ***************
    *** 213,219 ****
        char **filename;
        extern Interface GetInterface(string, string);
      
    !   ProgramName = iluparser_GetProgramName(av[0]);
      
        if (ac < 2)
          {
    --- 213,220 ----
        char **filename;
        extern Interface GetInterface(string, string);
      
    !   if ((ProgramName = iluparser_GetProgramName(av[0])) == NULL)
    !     ProgramName = av[0];
      
        if (ac < 2)
          {
    *** 1.13	1997/08/30 00:38:32
    --- stubbers/python/isl2python.c	1997/10/24 02:29:15
    ***************
    *** 249,255 ****
      	int	optind	= 1;
      	char *	pathDir = NULL;
      
    ! 	programName = iluparser_GetProgramName(argv[0]);
      
      	while (optind < argc && argv[optind][0] == '-')
      	{
    --- 249,256 ----
      	int	optind	= 1;
      	char *	pathDir = NULL;
      
    ! 	if ((programName = iluparser_GetProgramName(argv[0])) == NULL)
    ! 	  programName = argv[0];
      
      	while (optind < argc && argv[optind][0] == '-')
      	{
    

  • The OMG has decided to retroactively change the TypeID of the CosNaming type, so we follow suit:

    *** 1.1	1997/08/05 06:17:40
    --- etc/CosNaming/CosNaming.idl	1997/10/24 03:00:29
    ***************
    *** 13,16 ****
      
      
      module CosNaming {
      
    --- 13,18 ----
      
    + 
    + #pragma prefix	"omg.org"
      
      module CosNaming {
      
    

  • runtime/guile/Imakefile used ILUHOME where it meant DESTDIR...

    *** 1.6	1997/09/16 23:50:47
    --- runtime/guile/Imakefile	1997/10/24 02:09:40
    ***************
    *** 21,27 ****
      
      NormalObjectRule()
      
    ! MkdirTarget($(ILUHOME)/guile)
      
      ILU_SCHEME_LIB = libilu-guile.a
      
    --- 21,27 ----
      
      NormalObjectRule()
      
    ! MkdirTarget($(DESTDIR)/guile)
      
      ILU_SCHEME_LIB = libilu-guile.a
      
    

  • It's a good idea to make the directories before installing in them...

    *** 1.35	1997/09/10 01:42:43
    --- examples/test1/Imakefile	1997/10/24 03:48:22
    ***************
    *** 2,8 ****
      /* Last edited by Mike Spreitzer June 5, 1996 5:44 pm PDT */
      
      all:: Test1.isl
      
      #ifdef ADD_COMMONLISP_LANGUAGE
      load-lisp-example.lisp : load-lisp-example.lisp.dist
      	-rm -f load-lisp-example.lisp
    --- 2,11 ----
      /* Last edited by Mike Spreitzer June 5, 1996 5:44 pm PDT */
      
      all:: Test1.isl
      
    + MkdirTarget($(DESTDIR)/examples)
    + MkdirTarget($(DESTDIR)/examples/test1)
    + 
      #ifdef ADD_COMMONLISP_LANGUAGE
      load-lisp-example.lisp : load-lisp-example.lisp.dist
      	-rm -f load-lisp-example.lisp
    ***************
    *** 13,21 ****
      InstallRO(client.lisp server.lisp load-lisp-example.lisp, $(DESTDIR)/examples/test1)
      CleanTarget(load-lisp-example.lisp)
      #endif
    - 
    - MkdirTarget($(DESTDIR)/examples)
    - MkdirTarget($(DESTDIR)/examples/test1)
      
      InstallRO(Test1.isl Test2.isl Test3.isl, $(DESTDIR)/examples/test1)
      InstallRO(clnt.c clnt.h clntu.c clntw.c srvrw.c srvr.c srvr.h srvru.c test1srv.key test1srv.crt, $(DESTDIR)/examples/test1)
    --- 16,21 ----
    

  • Python Threaded GC needed to call threadsafe alarm setup.

    *** runtime/python/iluPrmodule.c.orig	Mon Oct 27 10:35:06 1997
    --- runtime/python/iluPrmodule.c	Mon Oct 27 10:51:41 1997
    ***************
    *** 1537,1546 ****
           we don't want to use CALL_KERNEL because it will release the lock, do the call 
           and then grab the lock, preventing anything else from using the interpreter.
           */
    !   if (ilupython_threaded_operation && !b_calling_from_kernel)
    !     {
    !       CALL_KERNEL(ilupython_threaded_operation, ilu_SetAlarm(gcAlarm, ilu_FineTime_Add(ilu_FineTime_Now(), plus1Minute), bootstrapAlarm, (void *)&gc_alarm_rock));
          }
        else
      #endif /* ILU_PYTHON_THREADS */
          {
    --- 1537,1550 ----
           we don't want to use CALL_KERNEL because it will release the lock, do the call 
           and then grab the lock, preventing anything else from using the interpreter.
           */
    !   if (ilupython_threaded_operation){
    !     if (!b_calling_from_kernel) {
    ! 	CALL_KERNEL(ilupython_threaded_operation, 
    ! 		    ilu_SetAlarm(gcAlarm, ilu_FineTime_Add(ilu_FineTime_Now(), plus1Minute), bootstrapAlarm, (void *)&gc_alarm_rock));
          }
    +     else 
    +       ilu_SetAlarm (gcAlarm, ilu_FineTime_Add(ilu_FineTime_Now(), plus1Minute), bootstrapAlarm, (void *)&gc_alarm_rock);
    +   }
        else
      #endif /* ILU_PYTHON_THREADS */
          {
    

  • From: Joachim Achtzehnter (joachim@mercury.bc.ca)

    When the reply of the first method call of an ILU server program that uses the IIOP protocol requires marshalling of a NIL object the program enters an infinite sleep loop.

    This happens because the function FindIORForObject in iiop.c returns nil when the ObjectIors variable is nil. When called with a NIL object it can happen that this variable is nil, but it should still return &NilObjectIOR instead of nil.

    Here is a patch that fixes the bug:

    *** runtime/kernel/iiop.c	1997/10/07 22:57:51	1.6
    --- runtime/kernel/iiop.c	1997/10/29 21:21:04	1.7
    ***************
    *** 2102,2111 ****
      {
        iorhash ior;
      
    -   if (ObjectIors == NIL)
    -     return NIL;
        if (h == NIL)
          return &NilObjectIOR;
        if ((ior = (iorhash) ilu_hash_FindInTable(ObjectIors, h)) == NIL)
          return NIL;
        if ((h->ob_server != ior->s) OR
    --- 2102,2111 ----
      {
        iorhash ior;
      
        if (h == NIL)
          return &NilObjectIOR;
    +   if (ObjectIors == NIL)
    +     return NIL;
        if ((ior = (iorhash) ilu_hash_FindInTable(ObjectIors, h)) == NIL)
          return NIL;
        if ((h->ob_server != ior->s) OR
    

  • Certain java compilers where reported to generate error messages claiming ec wasn't initialized. The same java compiler also needed an empty line at the end of the stubs.
    This patch avoids generating stubs which cause these error messages at compile time.

    *** stubbers/java/genobj.c   Thu Sep 25 14:30:46 1997
    --- stubbers/java/genobj.c    Mon Nov  3 09:13:45 1997
    ***************
    *** 592,598 ****
          printf("        xerox.ilu.IluCall _call;\n");
          printf("        xerox.ilu.IluUserException _userException = null;\n");
          if (! async) {
    !         printf("        int _ec;\n");
          }
      
          if (! returnsVoid(m)) {
    --- 592,598 ----
          printf("        xerox.ilu.IluCall _call;\n");
          printf("        xerox.ilu.IluUserException _userException = null;\n");
          if (! async) {
    !         printf("        int _ec = 0;\n");
          }
      
          if (! returnsVoid(m)) {
    ***************
    *** 777,783 ****
          printf("      default:\n");
          printf("    }\n");
          printf("  } //serveRequest\n\n");
    !     printf("} //_%s_skeletonClass\n", objShortName(t));
      }
      
      
    --- 777,783 ----
          printf("      default:\n");
          printf("    }\n");
          printf("  } //serveRequest\n\n");
    !     printf("} //_%s_skeletonClass\n\n", objShortName(t));
      }
      
    
    

  • The purpose of the IluJava_JTypes.h file is to enable identical runtime for a wide range of java architectures. The Jint and Jboolean abstractions should match the types genmerated by the java native stubber. The previous values were incorrect for some systems; the new values work on more systems.

    *** runtime/java/IluJava_JTypes.h    Thu Sep 25 14:31:43 1997
    --- runtime/java/IluJava_JTypes.h    Tue Oct 14 10:11:02 1997
    ***************
    *** 55,63 ****
        
      #else
      
    !   #define Jint int32_t
        #define Jshort short
    !   #define Jboolean int32_t
        #define Jbyte char
        #define Jlong int64_t
        #define Jfloat float
    --- 55,63 ----
        
      #else
      
    !   #define Jint long
        #define Jshort short
    !   #define Jboolean long
        #define Jbyte char
        #define Jlong int64_t
        #define Jfloat float
    

  • The parser (part of stubber) uses special names to designate anonymous records. For an unknown reason the java stubber was using a wrong prefix. This patch fixes that bug.

    *** stubbers/java/name.h     Thu Sep 25 14:30:42 1997
    --- stubbers/java/name.h      Mon Nov  3 19:35:45 1997
    ***************
    *** 91,98 ****
      
      extern void initName(); /*initialize the file name.c*/
      
    ! #define idlExceptionPrefix "ilu--prefix-idlExcType-"
    ! #define idlExceptionPrefixCleaned "ilu__prefix_idlExcType_"
      #define idlExceptionSuffix "__omgidl_exctype"
      
      #define idlAttributePrefixCleaned "ilu__prefix_idlAttribute__"
    --- 91,98 ----
      
      extern void initName(); /*initialize the file name.c*/
      
    ! #define idlExceptionPrefix "ilu--prefix-idlExceptionType-"
    ! #define idlExceptionPrefixCleaned "ilu__prefix_idlExceptionType_"
      #define idlExceptionSuffix "__omgidl_exctype"
      
      #define idlAttributePrefixCleaned "ilu__prefix_idlAttribute__"
    
    

  • The java runtime had a wrong uuid for CORBA::Object. This patch fixes that problem.

    *** runtime/java/CORBA_ObjectStub.java       Thu Sep 25 14:31:50 1997
    --- runtime/java/CORBA_ObjectStub.java       Mon Nov  3 23:30:11 1997
    ***************
    *** 39,46 ****
          static {
              CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass(
                  "org.omg.CORBA.Object", //java reference interface
    !             "ilu.org.omg.CORBA.Object", //ilu object type
    !             "IDL:org.omg.CORBA.Object:1.0", //uuid
                  0); //method count
              CORBA_Object_classRep.setOptional();
              CORBA_Object_classRep.setSurrClass(
    --- 39,46 ----
          static {
              CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass(
                  "org.omg.CORBA.Object", //java reference interface
    !             "ilu.CORBA-Object", //ilu object type
    !             "IDL:omg.org/CORBA/Object:1.0", //uuid
                  0); //method count
              CORBA_Object_classRep.setOptional();
              CORBA_Object_classRep.setSurrClass(
    

  • The java runtime works with green threads. With this patch and a minor amount of twiddling it can be made to work with native threads. This has not been well tested and is experimental.
    Change the Imake file to add a -DNATIVE switch to cc. This switch is necessary to work around a bug in the java header files for the experimental jdk1.1.4 native thread jdk. Ilu is piggybacking that switch for this patch.
    A runtime compiled for native threads will not work on green threads and vice verse. To make matters more fun, the native thread jdk does not tell the java program whether it is using green threads or native threads.

    *** runtime/java/IluJava_pollwt.c    Thu Sep 25 14:31:35 1997
    --- runtime/java/IluJava_pollwt.c    Thu Nov  6 13:27:41 1997
    ***************
    *** 42,49 ****
    --- 42,53 ----
      /* Introduce the fd because the java vm
       * wants a call to initialize_monitors.
       * Beats me why it doesn't do that itself.
    +  * However with native threads it looks like this
    +  * is neither necessary nor is the symbol
    +  * initialize_monitors defined.  
       */
      {
    + #ifndef NATIVE
          extern int initialize_monitors(int);
              /* defined in java...iomgr.c 
               * (With different return arg, but we ignore it)
    ***************
    *** 58,63 ****
    --- 62,68 ----
              } 
              highestFd = fd;
          }
    + #endif
      }
      
      
    

  • The java jdk 1.1.4 starts to garbage collect classes. Ilu carefully stuffs data into static variables to prevent garbage collection. These two paradigms do not work nicely together. To prevent memory smashes, the -noclassgc switch is recommended whenever executing any java program with jdk 1.1.4 if it uses ilu.
  • Java stubber generated bad identifiers if enumerated types had a dash in their name. This patch fixes that problem. This patch also adds an extra set of parenthesis when marshalling enumerations to fix a bug with unions.

    *** stubbers/java/genstub.c  Thu Sep 25 14:30:44 1997
    --- stubbers/java/genstub.c   Thu Nov  6 22:41:34 1997
    ***************
    *** 201,207 ****
                  if (vtk != shortcharacter_Type) badConst();
                  printf("%s.", enumerationJavaClass(myUrType(t))); 
                      /* use class! (not type; type is int) */
    !             printString(v->val.s);
                  break;
              case sequence_Type:
                  if (vtk != shortcharacter_Type) badConst();
    --- 201,207 ----
                  if (vtk != shortcharacter_Type) badConst();
                  printf("%s.", enumerationJavaClass(myUrType(t))); 
                      /* use class! (not type; type is int) */
    !             printString(javaizeString(v->val.s));
                  break;
              case sequence_Type:
                  if (vtk != shortcharacter_Type) badConst();
    *** stubbers/java/genenum.c  Thu Sep 25 14:30:47 1997
    --- stubbers/java/genenum.c   Thu Nov  6 22:47:09 1997
    ***************
    *** 78,84 ****
          switch (ctk) {
              case enumeration_Type:
                  if (vtk != shortcharacter_Type) fatal("bad enumeration const");
    !             return cat3(baseTypeName, "._", v->val.s);
              default: fatal("bad enumeration const");
          }
      }
    --- 78,84 ----
          switch (ctk) {
              case enumeration_Type:
                  if (vtk != shortcharacter_Type) fatal("bad enumeration const");
    !             return cat3(baseTypeName, "._", javaizeString(v->val.s));
              default: fatal("bad enumeration const");
          }
      }
    ***************
    *** 86,98 ****
      
      PUBLIC char * enm_ioSzPiece(Type t, const char *arg) {
          t = enm_assert(t);
    !     return cat3("_call.szEnum(", arg, ".value())");
      }
      
      
      PUBLIC char * enm_ioOutPiece(Type t, const char *arg) {
          t = enm_assert(t);
    !     return cat3("_call.outEnum(", arg, ".value())");
      }
      
      
    --- 86,98 ----
      
      PUBLIC char * enm_ioSzPiece(Type t, const char *arg) {
          t = enm_assert(t);
    !     return cat3("_call.szEnum((", arg, ").value())");
      }
      
      
      PUBLIC char * enm_ioOutPiece(Type t, const char *arg) {
          t = enm_assert(t);
    !     return cat3("_call.outEnum((", arg, ").value())");
      }
      
      
    

  • Java support for CosNaming doesn't build properly when Java ILU hasn't been previously installed.

    *** 1.4	1997/09/25 21:16:33
    --- etc/CosNaming/Imakefile	1997/11/07 06:33:22
    ***************
    *** 95,97 ****
    --- 97,177 ----
      InstallRO(cos-naming-sysdcl.lisp cos-naming-basics.lisp, $(DESTDIR)/lisp)
      CleanTarget(cos-naming-basics.lisp cos-naming-server-procs.lisp cos-naming-sysdcl.lisp)
      #endif
    + 
    + 
    + #ifdef ADD_JAVA_LANGUAGE
    + /*************************************************************************
    + /*************************************************************************
    + /*************************************************************************
    + /******  java
    + /******
    + /******/
    + 
    + #ifdef ILUJavaCompileTarget
    + #undef ILUJavaCompileTarget
    + #endif
    + 
    + 
    + #define ILUJavaCompileTarget(touchtarget,sources,extrapendencies)	@@\
    + all:: touchtarget 								@@\
    + 										@@\
    + touchtarget: sources extrapendencies					@@\
    + 	CLASSPATH="$(JAVA_CLASS_DIR):$(JAVA_ILU_CLASS_DIR)"; export CLASSPATH ; $(JAVAC) -d "$(JAVA_CLASS_DIR)" sources @@\
    + 	touch touchtarget							@@\
    + 										@@\
    + clean::									@@\
    + 	-rm -f touchtarget							@@\
    + 	-rm -rf $(JAVA_CLASS_DIR)*.class
    + 
    + 
    + #ifdef ILUJavaStubTarget
    + #undef ILUJavaStubTarget
    + #endif
    + 
    + 
    + #define ILUJavaStubTarget(touchtarget,islfiles)				@@\
    + 										@@\
    + all:: touchtarget								@@\
    + 										@@\
    + touchtarget: islfiles $(JAVA_STUBBER)					@@\
    + 	ILUPATH=.:../../stubbers/parser $(JAVA_STUBBER) $(JAVA_STUB_SWITCHES) islfiles	@@\
    + 	touch touchtarget							@@\
    + 										@@\
    + clean::									@@\
    + 	-rm -f touchtarget
    + 
    + 
    + JAVA_CLASS_DIR = ./classes
    + JAVA_STUB_DIR = ./javastubs
    + JAVA_STUB_SWITCHES = -prefix org.omg
    + 
    + BuildDir($(JAVA_CLASS_DIR))
    + BuildDir($(JAVA_STUB_DIR))
    + 
    + ALL_JAVA_FILES = *java
    + STUB_SOURCES = \
    + 	$(JAVA_STUB_DIR)/org/omg/CosNaming/$(ALL_JAVA_FILES) \
    + 	$(JAVA_STUB_DIR)/org/omg/CosNaming/NamingContextPackage/$(ALL_JAVA_FILES)
    + 
    + ILUJavaStubTarget(make.java_has_been_stubbed, CosNaming.idl)
    + 
    + ILUJavaCompileTarget(make.java_stubs_compiled, $(STUB_SOURCES), make.java_has_been_stubbed)
    + 
    + 
    + /*
    +  * make a java jar file...
    +  */
    + 
    + CleanTarget(CosNaming.jar)
    + 
    + all:: CosNaming.jar
    + 
    + CosNaming.jar:
    + 	cd $(JAVA_CLASS_DIR); $(JAR) -0cf ../CosNaming.jar *
    + 
    + InstallRO(CosNaming.jar, $(DESTDIR)/lib)
    + 
    + CleanTarget(make.java_has_been_stubbed make.java_stubs_compiled CosNaming.jar)
    + #endif
    + 
    + 
    

  • Joachim Achtzehnter was kind enough to identify and fix a number of problems in the ILU implementation of CosNaming. His patch appears below.

    *** 1.13	1997/08/30 03:01:31
    --- etc/CosNaming/NamingImpl.c	1997/11/07 22:24:57
    ***************
    *** 6,11 ****
    --- 6,15 ----
      #include 
      #include 
      
    + #ifdef WIN32
    + #include 
    + #endif
    + 
      #include "CosNaming.h"
      
      #include "iluhash.h"
    ***************
    *** 18,23 ****
    --- 22,28 ----
      /* number of slots in hash table (shrug) */ 
      #define CONTEXT_NBUCKETS	23
      
    + static ILU_C_Server theServer;
      static void UpdateBackingStore (void);
      static void AddObject (CosNaming_NamingContext);
      static void RemoveObject (CosNaming_NamingContext);
    ***************
    *** 26,35 ****
      static ilu_boolean	Verbose	= ilu_FALSE;
      
      static void *
    !   MyMalloc (ilu_cardinal size, ILU_C_ENVIRONMENT *env)
      {
        void *ptr;
    -   ilu_Error lerr;
      
        if ((ptr = ilu_malloc(size)) == ILU_NIL)
          ILU_C_RAISE_SYSTEM(env, NO_MEMORY, size, NO);
    --- 31,39 ----
      static ilu_boolean	Verbose	= ilu_FALSE;
      
      static void *
    ! MyMalloc (ilu_cardinal size, ILU_C_ENVIRONMENT *env)
      {
        void *ptr;
      
        if ((ptr = ilu_malloc(size)) == ILU_NIL)
          ILU_C_RAISE_SYSTEM(env, NO_MEMORY, size, NO);
    ***************
    *** 39,47 ****
      }
      
      static char *
    !   MyStrdup (char *str, ILU_C_ENVIRONMENT *env)
      {
    -   ilu_Error lerr;
        unsigned        len, fullen, i;
        ilu_CString     s2;
      
    --- 43,50 ----
      }
      
      static char *
    ! MyStrdup (char *str, ILU_C_ENVIRONMENT *env)
      {
        unsigned        len, fullen, i;
        ilu_CString     s2;
      
    ***************
    *** 62,68 ****
      }
      
      static CosNaming_Name
    !   NameFromNameComponent (CosNaming_NameComponent *s, ILU_C_ENVIRONMENT *env)
      {
        CosNaming_Name newname;
        newname._maximum = 1;
    --- 65,71 ----
      }
      
      static CosNaming_Name
    ! NameFromNameComponent (CosNaming_NameComponent *s, ILU_C_ENVIRONMENT *env)
      {
        CosNaming_Name newname;
        newname._maximum = 1;
    ***************
    *** 79,85 ****
      }
      
      static CosNaming_Name
    !   CopyName (CosNaming_Name *in, ilu_cardinal offset, ILU_C_ENVIRONMENT *env)
      {
        CosNaming_Name newname;
        CosNaming_NameComponent *new_component, *in_component;
    --- 82,88 ----
      }
      
      static CosNaming_Name
    ! CopyName (CosNaming_Name *in, ilu_cardinal offset, ILU_C_ENVIRONMENT *env)
      {
        CosNaming_Name newname;
        CosNaming_NameComponent *new_component, *in_component;
    ***************
    *** 100,106 ****
          return newname;
        } else {
          for (i = 0;  i < limit;  i++) {
    !       new_component = CosNaming_Name_Nth(&newname, i);
            in_component = CosNaming_Name_Nth(in, i + offset);
            new_component->id = MyStrdup(in_component->id, env);
            if (! ILU_C_SUCCESSFUL(env)) return newname;
    --- 103,109 ----
          return newname;
        } else {
          for (i = 0;  i < limit;  i++) {
    !       new_component = newname._buffer + i;
            in_component = CosNaming_Name_Nth(in, i + offset);
            new_component->id = MyStrdup(in_component->id, env);
            if (! ILU_C_SUCCESSFUL(env)) return newname;
    ***************
    *** 118,155 ****
      /*************************************************************************/
      
      static void
    !   RaiseNotFound (ILU_C_ENVIRONMENT *env,
    ! 		 CosNaming_Name *bad_name, ilu_cardinal bad_segment, CosNaming_NamingContext_NotFoundReason why)
      {
        CosNaming_NamingContext_NotFound *nf;
    !   CosNaming_Name *newname;
    !   ilu_cardinal j;
      
        env->returnCode = ex_CosNaming_NamingContext_NotFound;
        env->_major = ILU_C_USER_EXCEPTION;
        env->freeRoutine = (ILU_C_FreeFn) CosNaming_NamingContext_NotFound__Free;
    !   if ((nf = MyMalloc(sizeof(CosNaming_NamingContext_NotFound), env)) == ILU_NIL) {
          return;
        } else {
          nf->why = why;
    !     nf->rest_of_name = CopyName(bad_name, bad_segment, env);
          env->ptr = (ilu_refany) nf;
        }
      }
      
      static void
    !   RaiseCannotProceed (ILU_C_ENVIRONMENT *env,
    ! 		      CosNaming_Name *bad_name, ilu_cardinal bad_segment, CosNaming_NamingContext ctx)
      {
        CosNaming_NamingContext_CannotProceed *cp;
    -   CosNaming_Name *newname;
        ILU_C_ENVIRONMENT localenv;
    -   ilu_cardinal j;
      
        env->returnCode = ex_CosNaming_NamingContext_NotFound;
        env->_major = ILU_C_USER_EXCEPTION;
        env->freeRoutine = (ILU_C_FreeFn) CosNaming_NamingContext_CannotProceed__Free;
    !   if ((cp = MyMalloc(sizeof(CosNaming_NamingContext_NotFound), env)) == ILU_NIL) {
          return;
        } else {
          cp->cxt = (CosNaming_NamingContext) CORBA_Object_duplicate(ctx, &localenv);
    --- 121,161 ----
      /*************************************************************************/
      
      static void
    ! RaiseNotFound (ILU_C_ENVIRONMENT *env,
    ! 	       CosNaming_Name *bad_name,
    ! 	       ilu_cardinal bad_segment,
    ! 	       CosNaming_NamingContext_NotFoundReason why)
      {
        CosNaming_NamingContext_NotFound *nf;
    !   CORBA_Environment localenv;
      
        env->returnCode = ex_CosNaming_NamingContext_NotFound;
        env->_major = ILU_C_USER_EXCEPTION;
        env->freeRoutine = (ILU_C_FreeFn) CosNaming_NamingContext_NotFound__Free;
    !   nf = MyMalloc(sizeof(CosNaming_NamingContext_NotFound), &localenv);
    !   if (nf == ILU_NIL) {
          return;
        } else {
          nf->why = why;
    !     nf->rest_of_name = CopyName(bad_name, bad_segment, &localenv);
          env->ptr = (ilu_refany) nf;
        }
      }
      
      static void
    ! RaiseCannotProceed (ILU_C_ENVIRONMENT *env,
    ! 		    CosNaming_Name *bad_name,
    ! 		    ilu_cardinal bad_segment,
    ! 		    CosNaming_NamingContext ctx)
      {
        CosNaming_NamingContext_CannotProceed *cp;
        ILU_C_ENVIRONMENT localenv;
      
        env->returnCode = ex_CosNaming_NamingContext_NotFound;
        env->_major = ILU_C_USER_EXCEPTION;
        env->freeRoutine = (ILU_C_FreeFn) CosNaming_NamingContext_CannotProceed__Free;
    !   cp = MyMalloc(sizeof(CosNaming_NamingContext_NotFound), &localenv);
    !   if (cp == ILU_NIL) {
          return;
        } else {
          cp->cxt = (CosNaming_NamingContext) CORBA_Object_duplicate(ctx, &localenv);
    ***************
    *** 158,170 ****
            ILU_C_RAISE_SYSTEM(env, INTERNAL, 0, NO);
            return;
          }
    !     cp->rest_of_name = CopyName(bad_name, bad_segment, env);
          env->ptr = (ilu_refany) cp;
        }
      }
      
      static void
    !   RaiseInvalidName (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_InvalidName;
        env->_major = ILU_C_USER_EXCEPTION;
    --- 164,176 ----
            ILU_C_RAISE_SYSTEM(env, INTERNAL, 0, NO);
            return;
          }
    !     cp->rest_of_name = CopyName(bad_name, bad_segment, &localenv);
          env->ptr = (ilu_refany) cp;
        }
      }
      
      static void
    ! RaiseInvalidName (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_InvalidName;
        env->_major = ILU_C_USER_EXCEPTION;
    ***************
    *** 173,179 ****
      }
      
      static void
    !   RaiseAlreadyBound (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_AlreadyBound;
        env->_major = ILU_C_USER_EXCEPTION;
    --- 179,185 ----
      }
      
      static void
    ! RaiseAlreadyBound (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_AlreadyBound;
        env->_major = ILU_C_USER_EXCEPTION;
    ***************
    *** 182,188 ****
      }
      
      static void
    !   RaiseNotEmpty (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_NotEmpty;
        env->_major = ILU_C_USER_EXCEPTION;
    --- 188,194 ----
      }
      
      static void
    ! RaiseNotEmpty (ILU_C_ENVIRONMENT *env)
      {
        env->returnCode = ex_CosNaming_NamingContext_NotEmpty;
        env->_major = ILU_C_USER_EXCEPTION;
    ***************
    *** 201,208 ****
      } BIData;
      
      CORBA_boolean
    !   server_CosNaming_BindingIterator_next_one
    !   (CosNaming_BindingIterator _handle, CosNaming_Binding** b, ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
        CORBA_boolean return_status;
    --- 207,215 ----
      } BIData;
      
      CORBA_boolean
    ! server_CosNaming_BindingIterator_next_one(CosNaming_BindingIterator _handle,
    ! 					  CosNaming_Binding** b,
    ! 					  ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
        CORBA_boolean return_status;
    ***************
    *** 232,242 ****
      }
      
      CORBA_boolean
    !   server_CosNaming_BindingIterator_next_n
    !   (CosNaming_BindingIterator _handle, CORBA_unsigned_long how_many, CosNaming_BindingList** bl, ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
    -   CORBA_boolean return_status;
        ilu_cardinal n, size, i;
        CosNaming_Binding *newbinding, *oldbinding;
        CosNaming_BindingList *new_list;
    --- 239,250 ----
      }
      
      CORBA_boolean
    ! server_CosNaming_BindingIterator_next_n(CosNaming_BindingIterator _handle,
    ! 					CORBA_unsigned_long how_many,
    ! 					CosNaming_BindingList** bl,
    ! 					ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
        ilu_cardinal n, size, i;
        CosNaming_Binding *newbinding, *oldbinding;
        CosNaming_BindingList *new_list;
    ***************
    *** 262,269 ****
      }
      
      void
    !   server_CosNaming_BindingIterator_destroy
    !   (CosNaming_BindingIterator _handle, ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
      
    --- 270,277 ----
      }
      
      void
    ! server_CosNaming_BindingIterator_destroy(CosNaming_BindingIterator _handle,
    ! 					 ILU_C_ENVIRONMENT *_status)
      {
        BIData *bid = CosNaming_BindingIterator__GetUserData(_handle);
      
    ***************
    *** 297,303 ****
      } NamedValue;
      
      static ilu_HashTable
    !   NewContextHashTable (ilu_cardinal entries)
      {
        return (ilu_hash_MakeNewTable ((entries == 0) ? CONTEXT_NBUCKETS : entries,
      				 ilu_hash_HashString, ilu_hash_StringCompare));
    --- 305,311 ----
      } NamedValue;
      
      static ilu_HashTable
    ! NewContextHashTable (ilu_cardinal entries)
      {
        return (ilu_hash_MakeNewTable ((entries == 0) ? CONTEXT_NBUCKETS : entries,
      				 ilu_hash_HashString, ilu_hash_StringCompare));
    ***************
    *** 308,313 ****
    --- 316,323 ----
      						 ilu_cardinal entries,
      						 ILU_C_ENVIRONMENT *_status)
      {
    +   static unsigned long next_def_ih = 1;
    +   char idbuf[12];
        CosNaming_NamingContext newcontext;
        ilu_HashTable ht;
      
    ***************
    *** 316,321 ****
    --- 326,343 ----
          ILU_C_RAISE_SYSTEM(_status, NO_MEMORY, 0, NO);
          return ILU_NIL;
        };
    + 
    +   if (!ih) {
    +      /* this dance is necessary to avoid creating an instance with
    +       * and instance handle that already exists (read from the
    +       * backing file at startup)
    +       */
    +      do {
    + 	sprintf(idbuf, "%lu", next_def_ih++);
    +      } while (ILU_C_FindObject(ILU_C_IDOfServer(server), idbuf));
    +      ih = idbuf;
    +   }
    + 
        newcontext = CosNaming_NamingContext__CreateTrue(ih, server, (ilu_refany) ht);
        if (newcontext == ILU_NIL) {
          ILU_C_RAISE_SYSTEM(_status, INTERNAL, 0, NO);
    ***************
    *** 327,336 ****
      }
      
      static CosNaming_NamingContext
    !   FindOrCreateNamingContext (ilu_string ih,
    ! 			     ILU_C_Server server,
    ! 			     ilu_cardinal entries,
    ! 			     ILU_C_ENVIRONMENT *_status)
      {
        ILU_C_Object *obj;
      
    --- 349,358 ----
      }
      
      static CosNaming_NamingContext
    ! FindOrCreateNamingContext (ilu_string ih,
    ! 			   ILU_C_Server server,
    ! 			   ilu_cardinal entries,
    ! 			   ILU_C_ENVIRONMENT *_status)
      {
        ILU_C_Object *obj;
      
    ***************
    *** 343,354 ****
        return obj;
      }
      
    ! void
    !   server_CosNaming_NamingContext_bind
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, ilu_CORBA_Object obj, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
    -   CosNaming_NamingContext nc;
        CosNaming_Name tempname;
        ilu_cardinal size;
        NamedValue *nv;
    --- 365,378 ----
        return obj;
      }
      
    ! static void
    ! generic_bind(CosNaming_NamingContext _handle,
    ! 	     CosNaming_Name* n,
    ! 	     ilu_CORBA_Object obj,
    ! 	     CosNaming_BindingType type,
    ! 	     ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        CosNaming_Name tempname;
        ilu_cardinal size;
        NamedValue *nv;
    ***************
    *** 369,375 ****
          if ((nv = ilu_hash_FindInTable(ht, n->_buffer[0].id)) != ILU_NIL) {
            RaiseAlreadyBound(_status);
          } else if ((nv = (NamedValue *) MyMalloc(sizeof(*nv), _status)) != ILU_NIL) {
    !       nv->kind = CosNaming_nobject;
            nv->key.id = MyStrdup(n->_buffer[0].id, _status);
            if (!ILU_C_SUCCESSFUL(_status))
      	{ ilu_free(nv); return; };
    --- 393,399 ----
          if ((nv = ilu_hash_FindInTable(ht, n->_buffer[0].id)) != ILU_NIL) {
            RaiseAlreadyBound(_status);
          } else if ((nv = (NamedValue *) MyMalloc(sizeof(*nv), _status)) != ILU_NIL) {
    !       nv->kind = type;
            nv->key.id = MyStrdup(n->_buffer[0].id, _status);
            if (!ILU_C_SUCCESSFUL(_status))
      	{ ilu_free(nv); return; };
    ***************
    *** 387,411 ****
          } else {
            RaiseCannotProceed (_status, n, 1, _handle);
          }
    -   } else if (nv->kind != CosNaming_ncontext) {
    -     RaiseNotFound (_status, n, 1, CosNaming_not_context);
        } else {
    !     tempname._length = size - 1;
    !     tempname._maximum = size - 1;
    !     tempname._buffer = &n->_buffer[1];
    !     CosNaming_NamingContext_bind (nv->value.context, &tempname, obj, _status);
        }
      }
      
      void
    !   server_CosNaming_NamingContext_rebind
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, ilu_CORBA_Object obj, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
    -   NamedValue *nv;
    -   ilu_cardinal i, size;
    -   char *eid;
    -   CosNaming_NameComponent *this_component;
      
        CosNaming_NamingContext_unbind (_handle, n, _status);
        if (! ILU_C_SUCCESSFUL(_status)) {
    --- 411,447 ----
          } else {
            RaiseCannotProceed (_status, n, 1, _handle);
          }
        } else {
    !      if ((nv = ilu_hash_FindInTable(ht, n->_buffer[0].id)) == ILU_NIL) {
    ! 	RaiseNotFound (_status, n, 0, CosNaming_missing_node);
    !      } else if (nv->kind != CosNaming_ncontext) {
    ! 	RaiseNotFound (_status, n, 0, CosNaming_not_context);
    !      } else {
    ! 	tempname._length = size - 1;
    ! 	tempname._maximum = size - 1;
    ! 	tempname._buffer = &n->_buffer[1];
    ! 	generic_bind (nv->value.context, &tempname, obj, type, _status);
    !      }
        }
      }
      
      void
    ! server_CosNaming_NamingContext_bind(CosNaming_NamingContext _handle,
    ! 				    CosNaming_Name* n,
    ! 				    ilu_CORBA_Object obj,
    ! 				    ILU_C_ENVIRONMENT *_status)
    ! {
    !    generic_bind(_handle, n, obj, CosNaming_nobject, _status);
    ! }
    ! 
    ! static void
    ! generic_rebind(CosNaming_NamingContext _handle,
    ! 	       CosNaming_Name* n,
    ! 	       ilu_CORBA_Object obj,
    ! 	       CosNaming_BindingType type,
    ! 	       ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
      
        CosNaming_NamingContext_unbind (_handle, n, _status);
        if (! ILU_C_SUCCESSFUL(_status)) {
    ***************
    *** 418,456 ****
            return;
          }
        };
    !   CosNaming_NamingContext_bind (_handle, n, obj, _status);
        return;    
      }
      
      void
    !   server_CosNaming_NamingContext_bind_context
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, CosNaming_NamingContext nc, ILU_C_ENVIRONMENT *_status)
      {
    !   CosNaming_NamingContext_bind (_handle, n, (CORBA_Object) nc, _status);
      }
      
      void
    !   server_CosNaming_NamingContext_rebind_context
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, CosNaming_NamingContext nc, ILU_C_ENVIRONMENT *_status)
      {
    !   CosNaming_NamingContext_rebind (_handle, n, (CORBA_Object) nc, _status);
      }
      
      ilu_CORBA_Object
    !   server_CosNaming_NamingContext_resolve
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        CosNaming_Name tempname;
        NamedValue *nv;
    !   ilu_cardinal size;
        CosNaming_NameComponent *this_component;
      
    !   if (ht == ILU_NIL) {
          RaiseInvalidName(_status);
          return ILU_NIL;
        };
    -   size = CosNaming_Name_Length(n);
        this_component = CosNaming_Name_Nth(n, 0);
        if ((nv = ilu_hash_FindInTable(ht, this_component->id)) == ILU_NIL) {
          RaiseNotFound(_status, n, 0, CosNaming_missing_node);
    --- 454,505 ----
            return;
          }
        };
    !   generic_bind (_handle, n, obj, type, _status);
        return;    
      }
      
      void
    ! server_CosNaming_NamingContext_rebind(CosNaming_NamingContext _handle,
    ! 				      CosNaming_Name* n,
    ! 				      ilu_CORBA_Object obj,
    ! 				      ILU_C_ENVIRONMENT *_status)
    ! {
    !    generic_rebind(_handle, n, obj, CosNaming_nobject, _status);
    ! }
    ! 
    ! void
    ! server_CosNaming_NamingContext_bind_context(CosNaming_NamingContext _handle,
    ! 					    CosNaming_Name* n,
    ! 					    CosNaming_NamingContext nc,
    ! 					    ILU_C_ENVIRONMENT *_status)
      {
    !    generic_bind(_handle, n, (CORBA_Object)nc, CosNaming_ncontext, _status);
      }
      
      void
    ! server_CosNaming_NamingContext_rebind_context(CosNaming_NamingContext _handle,
    ! 					      CosNaming_Name* n,
    ! 					      CosNaming_NamingContext nc,
    ! 					      ILU_C_ENVIRONMENT *_status)
      {
    !   generic_rebind (_handle, n, (CORBA_Object) nc, CosNaming_ncontext, _status);
      }
      
      ilu_CORBA_Object
    ! server_CosNaming_NamingContext_resolve(CosNaming_NamingContext _handle,
    ! 				       CosNaming_Name* n,
    ! 				       ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        CosNaming_Name tempname;
        NamedValue *nv;
    !   ilu_cardinal size = CosNaming_Name_Length(n);
        CosNaming_NameComponent *this_component;
      
    !   if (ht == ILU_NIL || size == 0) {
          RaiseInvalidName(_status);
          return ILU_NIL;
        };
        this_component = CosNaming_Name_Nth(n, 0);
        if ((nv = ilu_hash_FindInTable(ht, this_component->id)) == ILU_NIL) {
          RaiseNotFound(_status, n, 0, CosNaming_missing_node);
    ***************
    *** 474,486 ****
      }
      
      void
    !   server_CosNaming_NamingContext_unbind
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        NamedValue *nv;
    !   ilu_cardinal i, size;
    !   CosNaming_NameComponent *this_component;
        CosNaming_Name tempname;
      
        if (ht == ILU_NIL) {
    --- 523,535 ----
      }
      
      void
    ! server_CosNaming_NamingContext_unbind(CosNaming_NamingContext _handle,
    ! 				      CosNaming_Name* n,
    ! 				      ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        NamedValue *nv;
    !   ilu_cardinal size;
        CosNaming_Name tempname;
      
        if (ht == ILU_NIL) {
    ***************
    *** 516,530 ****
      }
      
      CosNaming_NamingContext
    !   server_CosNaming_NamingContext_new_context
    !   (CosNaming_NamingContext _handle, ILU_C_ENVIRONMENT *_status)
      {
    !   return NewNamingContext(ILU_NIL, ILU_NIL, 0, _status);
      }
      
      void
    !   server_CosNaming_NamingContext_destroy
    !   (CosNaming_NamingContext _handle, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        if (ilu_hash_PairsInTable(ht) > 0) {
    --- 565,579 ----
      }
      
      CosNaming_NamingContext
    ! server_CosNaming_NamingContext_new_context(CosNaming_NamingContext _handle,
    ! 					   ILU_C_ENVIRONMENT *_status)
      {
    !   return NewNamingContext(ILU_NIL, theServer, 0, _status);
      }
      
      void
    ! server_CosNaming_NamingContext_destroy(CosNaming_NamingContext _handle,
    ! 				       ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        if (ilu_hash_PairsInTable(ht) > 0) {
    ***************
    *** 539,546 ****
      }
      
      CosNaming_NamingContext
    !   server_CosNaming_NamingContext_bind_new_context
    !   (CosNaming_NamingContext _handle, CosNaming_Name* n, ILU_C_ENVIRONMENT *_status)
      {
        CosNaming_NamingContext newcontext;
        ILU_C_ENVIRONMENT localstatus;
    --- 588,596 ----
      }
      
      CosNaming_NamingContext
    ! server_CosNaming_NamingContext_bind_new_context(CosNaming_NamingContext _handle,
    ! 						CosNaming_Name* n,
    ! 						ILU_C_ENVIRONMENT *_status)
      {
        CosNaming_NamingContext newcontext;
        ILU_C_ENVIRONMENT localstatus;
    ***************
    *** 563,577 ****
      }
      
      void
    !   server_CosNaming_NamingContext_list
    !   (CosNaming_NamingContext _handle, CORBA_unsigned_long how_many, CosNaming_BindingList** bl, CosNaming_BindingIterator* bi, ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        CORBA_unsigned_long count, i, limit;
        CosNaming_BindingList *bindinglist;
        CosNaming_BindingList *iteratorlist;
        CosNaming_BindingIterator iterator;
    -   ilu_boolean needs_iterator;
        ilu_HashEnumerator_s he;
        ilu_string key;
        NamedValue *bv;
    --- 613,629 ----
      }
      
      void
    ! server_CosNaming_NamingContext_list(CosNaming_NamingContext _handle,
    ! 				    CORBA_unsigned_long how_many,
    ! 				    CosNaming_BindingList** bl,
    ! 				    CosNaming_BindingIterator* bi,
    ! 				    ILU_C_ENVIRONMENT *_status)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(_handle);
        CORBA_unsigned_long count, i, limit;
        CosNaming_BindingList *bindinglist;
        CosNaming_BindingList *iteratorlist;
        CosNaming_BindingIterator iterator;
        ilu_HashEnumerator_s he;
        ilu_string key;
        NamedValue *bv;
    ***************
    *** 642,665 ****
      
      static ilu_boolean LocalObject (CosNaming_NamingContext obj)
      {
    !   int i;
        for (i = 0;  i < ContextObjectsUsed;  i++)
          if (obj == ContextObjects[i])
            return ilu_TRUE;
        return ilu_FALSE;
      }
      
    ! static void OutputNamingContext (FILE *fp, CosNaming_NamingContext nc, char *local_sid)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(nc);
        ilu_HashEnumerator_s he;
        char *sid = ILU_NIL;
        char *ih = ILU_NIL;
        char *sbh = ILU_NIL;
    -   char *id, *kind;
        ilu_cardinal sid_len, ih_len, kind_len, id_len, sbh_len;
        ilu_refany key, data;
        NamedValue *entry;
      
        ILU_C_IDOfObject (nc, &sid, &ih);
        sid_len = strlen(sid);
    --- 694,718 ----
      
      static ilu_boolean LocalObject (CosNaming_NamingContext obj)
      {
    !   unsigned int i;
        for (i = 0;  i < ContextObjectsUsed;  i++)
          if (obj == ContextObjects[i])
            return ilu_TRUE;
        return ilu_FALSE;
      }
      
    ! static void
    ! OutputNamingContext (FILE *fp, CosNaming_NamingContext nc, char *local_sid)
      {
        ilu_HashTable ht = CosNaming_NamingContext__GetUserData(nc);
        ilu_HashEnumerator_s he;
        char *sid = ILU_NIL;
        char *ih = ILU_NIL;
        char *sbh = ILU_NIL;
        ilu_cardinal sid_len, ih_len, kind_len, id_len, sbh_len;
        ilu_refany key, data;
        NamedValue *entry;
    +   CORBA_Object obj;
      
        ILU_C_IDOfObject (nc, &sid, &ih);
        sid_len = strlen(sid);
    ***************
    *** 676,695 ****
        while(ilu_hash_Next(&he, &key, &data))
          {
            entry = (NamedValue *) data;
            id_len = strlen(entry->key.id);
            kind_len = strlen(entry->key.kind);
    !       if (LocalObject((entry->kind == CosNaming_ncontext) ? entry->value.context : entry->value.obj)) {
    ! 	ILU_C_IDOfObject (nc, &sid, &ih);
      	sid_len = strlen(sid);
      	ih_len = strlen(ih);
    ! 	ht = (ilu_HashTable) CosNaming_NamingContext__GetUserData((CosNaming_NamingContext) (entry->kind == CosNaming_ncontext) ? entry->value.context : entry->value.obj);
      	fprintf (fp, "   %ld %*.*s %ld %*.*s L %ld %*.*s %ld %*.*s %ld\n",
      		 id_len, id_len, id_len, entry->key.id,
      		 kind_len, kind_len, kind_len, entry->key.kind,
      		 sid_len, sid_len, sid_len, sid,
      		 ih_len, ih_len, ih_len, ih, ilu_hash_PairsInTable(ht));
            } else {
    ! 	sbh = ILU_C_SBHOfObject((entry->kind == CosNaming_ncontext) ? entry->value.context : entry->value.obj);
      	sbh_len = strlen(sbh);
      	fprintf (fp, "   %ld %*.*s %ld %*.*s %c %ld %*.*s\n",
      		 id_len, id_len, id_len, entry->key.id,
    --- 729,751 ----
        while(ilu_hash_Next(&he, &key, &data))
          {
            entry = (NamedValue *) data;
    +       obj = ((entry->kind == CosNaming_ncontext)
    + 	     ? entry->value.context
    + 	     : entry->value.obj);
            id_len = strlen(entry->key.id);
            kind_len = strlen(entry->key.kind);
    !       if (LocalObject(obj)) {
    ! 	ILU_C_IDOfObject (obj, &sid, &ih);
      	sid_len = strlen(sid);
      	ih_len = strlen(ih);
    ! 	ht = (ilu_HashTable) CosNaming_NamingContext__GetUserData(obj);
      	fprintf (fp, "   %ld %*.*s %ld %*.*s L %ld %*.*s %ld %*.*s %ld\n",
      		 id_len, id_len, id_len, entry->key.id,
      		 kind_len, kind_len, kind_len, entry->key.kind,
      		 sid_len, sid_len, sid_len, sid,
      		 ih_len, ih_len, ih_len, ih, ilu_hash_PairsInTable(ht));
            } else {
    ! 	sbh = ILU_C_SBHOfObject(obj);
      	sbh_len = strlen(sbh);
      	fprintf (fp, "   %ld %*.*s %ld %*.*s %c %ld %*.*s\n",
      		 id_len, id_len, id_len, entry->key.id,
    ***************
    *** 753,765 ****
        }
      }
      
    ! static FILE * InitializeRoot (char *filename, char *root_sid, ILU_C_Server server)
      {
        FILE *fp;
        char *sid, *ih, *id, *kind, *sbh, *lp;
        ilu_HashTable ht;
    !   unsigned long entries, sid_len, ih_len, id_len, kind_len, sbh_len, lineno;
    !   int count, i;
        char line[10000];
        char kindc;
        CosNaming_NamingContext newobj;
    --- 809,823 ----
        }
      }
      
    ! static FILE *
    ! InitializeRoot (char *filename, char *root_sid, ILU_C_Server server)
      {
        FILE *fp;
        char *sid, *ih, *id, *kind, *sbh, *lp;
        ilu_HashTable ht;
    !   unsigned long entries, local_entries;
    !   unsigned long sid_len, ih_len, id_len, kind_len, sbh_len, lineno, i;
    !   int count;
        char line[10000];
        char kindc;
        CosNaming_NamingContext newobj;
    ***************
    *** 847,856 ****
      	  memcpy (ih, lp, ih_len);
      	  ih[ih_len] = 0;
      	  lp += ih_len;
    ! 	  if ((sscanf (lp, " %lu%n", &entries, &count) != 1) ||
      	      (lp[count] != 0)) goto badline;
      	  ILU_C_SET_SUCCESSFUL(&status);
    ! 	  obj = FindOrCreateNamingContext (ih, server, entries, &status);
      	  if (!ILU_C_SUCCESSFUL(&status)) {
      	    fprintf (stderr, "%s, %d:  Can't incarnate object with SBH \"%s\"\n",
      		     filename, lineno, sbh);
    --- 905,914 ----
      	  memcpy (ih, lp, ih_len);
      	  ih[ih_len] = 0;
      	  lp += ih_len;
    ! 	  if ((sscanf (lp, " %lu%n", &local_entries, &count) != 1) ||
      	      (lp[count] != 0)) goto badline;
      	  ILU_C_SET_SUCCESSFUL(&status);
    ! 	  obj = FindOrCreateNamingContext (ih, server, local_entries, &status);
      	  if (!ILU_C_SUCCESSFUL(&status)) {
      	    fprintf (stderr, "%s, %d:  Can't incarnate object with SBH \"%s\"\n",
      		     filename, lineno, sbh);
    ***************
    *** 925,935 ****
      {
        CosNaming_NamingContext root;
        ILU_C_ENVIRONMENT status;
    -   ILU_C_Server theServer;
        int stop;
        char *pinfo = "iiop_1_0_1";
        char *tinfo[3] = { "tcp_0_0", ILU_NIL, ILU_NIL };
    -   char realm_name[1024];
        char hostname[1024];
        char tcpinfo[1100];
        char sid[1100];
    --- 983,991 ----
    ***************
    *** 947,953 ****
            if (i++ < ac) {
      	(rawport = strtoul(av[i], ILU_NIL, 0)), i++;
      	if (rawport >= 0 && rawport <= 0xFFFF)
    ! 	  port = rawport;
      	else
      	  usage(av[0]);
            }
    --- 1003,1009 ----
            if (i++ < ac) {
      	(rawport = strtoul(av[i], ILU_NIL, 0)), i++;
      	if (rawport >= 0 && rawport <= 0xFFFF)
    ! 	  port = (ilu_shortcardinal)rawport;
      	else
      	  usage(av[0]);
            }
    ***************
    *** 1000,1006 ****
      				     pinfo,
      				     tinfo,
      				     ILU_NIL, /* no identity at present */
    ! 				     ilu_TRUE /* establish as default server */
      				     );
        
        if (BackingFilename == ILU_NIL)
    --- 1056,1062 ----
      				     pinfo,
      				     tinfo,
      				     ILU_NIL, /* no identity at present */
    ! 				     ilu_TRUE /* create port anyway */
      				     );
        
        if (BackingFilename == ILU_NIL)
    

  • End of patches