summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-16 17:49:46 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-16 17:49:46 +0000
commitcf170f0e6770f37aa703cfb280e2af2fb2b423be (patch)
tree97553b128bf37cf2ee4d66ac49797e6eef3d0768
parent75a7b5c96c3b562e05be6eb8db3ea239f171e017 (diff)
downloadATCD-cf170f0e6770f37aa703cfb280e2af2fb2b423be.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-99b16
-rw-r--r--ace/OS.i63
-rw-r--r--ace/config-sco-5.0.0.h3
-rw-r--r--include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU26
4 files changed, 76 insertions, 32 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 3ed4b02f018..53d785aaea6 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,11 +1,21 @@
+Fri Jul 16 09:20:42 1999 Arturo Montes <mitosys@colomsat.net.co>
+
+ * ace/OS.i: Patch the dl* family to keep ACE
+ compatible in SCO OpenServer 5.0.0, 5.0.2, 5.0.4 with 5.0.5
+
+ * ace/config-sco-5.0.0.h: Bring OpenServer up to date.
+
+ * include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU:
+ Use gcc-2.95.
+
Fri Jul 16 11:50:24 1999 Nanbor Wang <nanbor@cs.wustl.edu>
* ace/Log_Msg.cpp (log):
* tests/Basic_Types_Test.cpp (main): Reverted my previous
change. It was not a safe assumption.
-
-Fri Jul 16 09:20:42 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-
+
+Fri Jul 16 11:50:24 1999 Douglas C. Schmidt <schmidt@cs.wustl.edu>
+
* ace/Memory_Pool.h: Added a way to set the segment_size in
ACE_Shared_Memory_Pool_Options and ACE_Shared_Memory_Pool.
Thanks to Serge Kolgan <skolgan@cisco.com> for this fix. [This
diff --git a/ace/OS.i b/ace/OS.i
index 8aa9d358472..08d73bc1e73 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -72,6 +72,13 @@ typedef char *ACE_MMAP_TYPE;
# include /**/ <xliuser.h>
#endif /* ACE_HAS_XLI */
+#if defined (_M_UNIX)
+extern "C" int _dlclose (void *);
+extern "C" char *_dlerror (void);
+extern "C" void *_dlopen (const char *, int);
+extern "C" void * _dlsym (void *, const char *);
+#endif /* _M_UNIX */
+
#if !defined (ACE_HAS_CPLUSPLUS_HEADERS)
# include /**/ <libc.h>
# include /**/ <osfcn.h>
@@ -7975,28 +7982,32 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
if (ptr != 0)
(*((int (*)(void)) ptr)) (); // Call _fini hook explicitly.
# endif /* ACE_HAS_AUTOMATIC_INIT_FINI */
- ACE_OSCALL_RETURN (::dlclose (handle), int, -1);
+#if defined (_M_UNIX)
+ ACE_OSCALL_RETURN (::_dlclose (handle), int, -1);
+#else /* _MUNIX */
+ ACE_OSCALL_RETURN (::dlclose (handle), int, -1);
+#endif /* _M_UNIX */
#elif defined (ACE_WIN32)
ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::FreeLibrary (handle), ace_result_), int, -1);
#elif defined (__hpux)
- // HP-UX 10.x and 32-bit 11.00 do not pay attention to the ref count when
- // unloading a dynamic lib. So, if the ref count is more than 1, do not
- // unload the lib. This will cause a library loaded more than once to
- // not be unloaded until the process runs down, but that's life. It's
- // better than unloading a library that's in use.
- // So far as I know, there's no way to decrement the refcnt that the kernel
- // is looking at - the shl_descriptor is a copy of what the kernel has, not
- // the actual struct.
- // On 64-bit HP-UX using dlopen, this problem has been fixed.
+ // HP-UX 10.x and 32-bit 11.00 do not pay attention to the ref count
+ // when unloading a dynamic lib. So, if the ref count is more than
+ // 1, do not unload the lib. This will cause a library loaded more
+ // than once to not be unloaded until the process runs down, but
+ // that's life. It's better than unloading a library that's in use.
+ // So far as I know, there's no way to decrement the refcnt that the
+ // kernel is looking at - the shl_descriptor is a copy of what the
+ // kernel has, not the actual struct. On 64-bit HP-UX using dlopen,
+ // this problem has been fixed.
struct shl_descriptor desc;
- if (shl_gethandle_r(handle, &desc) == -1)
+ if (shl_gethandle_r (handle, &desc) == -1)
return -1;
if (desc.ref_count > 1)
return 0;
# if defined(__GNUC__) || __cplusplus >= 199707L
- ACE_OSCALL_RETURN (::shl_unload(handle), int, -1);
+ ACE_OSCALL_RETURN (::shl_unload (handle), int, -1);
# else
- ACE_OSCALL_RETURN (::cxxshl_unload(handle), int, -1);
+ ACE_OSCALL_RETURN (::cxxshl_unload (handle), int, -1);
# endif /* aC++ vs. Hp C++ */
#else
ACE_UNUSED_ARG (handle);
@@ -8009,7 +8020,11 @@ ACE_OS::dlerror (void)
{
ACE_TRACE ("ACE_OS::dlerror");
# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
+#if defined(_M_UNIX)
+ ACE_OSCALL_RETURN ((char *)::_dlerror (), char *, 0);
+#else /* _M_UNIX */
ACE_OSCALL_RETURN ((char *)::dlerror (), char *, 0);
+#endif /* _M_UNIX */
# elif defined (__hpux)
ACE_OSCALL_RETURN (::strerror(errno), char *, 0);
# elif defined (ACE_WIN32)
@@ -8054,6 +8069,8 @@ ACE_OS::dlopen (const ASYS_TCHAR *fname,
void *handle;
# if defined (ACE_HAS_SGIDLADD)
ACE_OSCALL (::sgidladd (filename, mode), void *, 0, handle);
+# elif defined (_M_UNIX)
+ ACE_OSCALL (::_dlopen (filename, mode), void *, 0, handle);
# else
ACE_OSCALL (::dlopen (filename, mode), void *, 0, handle);
# endif /* ACE_HAS_SGIDLADD */
@@ -8111,16 +8128,22 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle,
# if defined (ACE_LACKS_POSIX_PROTOTYPES)
ACE_OSCALL_RETURN (::dlsym (handle, (char*) symbolname), void *, 0);
# elif defined (ACE_USES_ASM_SYMBOL_IN_DLSYM)
- int l = strlen(symbolname) + 2;
- char* asm_symbolname;
- ACE_NEW_RETURN(asm_symbolname, char[l], 0);
- ACE_OS::strcpy (asm_symbolname, "_") ;
- ACE_OS::strcpy (asm_symbolname + 1, symbolname) ;
- void* ace_result;
+ int l = ACE_OS::strlen (symbolname) + 2;
+ char *asm_symbolname = 0;
+ ACE_NEW_RETURN (asm_symbolname,
+ char[l],
+ 0);
+ ACE_OS::strcpy (asm_symbolname,
+ "_") ;
+ ACE_OS::strcpy (asm_symbolname + 1,
+ symbolname) ;
+ void *ace_result;
ACE_OSCALL (::dlsym (handle, asm_symbolname), void *, 0,
ace_result);
- delete[] asm_symbolname;
+ delete [] asm_symbolname;
return ace_result;
+# elif defined (_M_UNIX)
+ ACE_OSCALL_RETURN (::_dlsym (handle, symbolname), void *, 0);
# else
ACE_OSCALL_RETURN (::dlsym (handle, symbolname), void *, 0);
# endif /* ACE_LACKS_POSIX_PROTOTYPES */
diff --git a/ace/config-sco-5.0.0.h b/ace/config-sco-5.0.0.h
index 96ae7e1dbce..4204e74b5bf 100644
--- a/ace/config-sco-5.0.0.h
+++ b/ace/config-sco-5.0.0.h
@@ -13,6 +13,7 @@
#define MAXPATHLEN 1023
#endif /* SCO */
+#define ACE_HAS_NONCONST_SELECT_TIMEVAL
#define ACE_HAS_SIG_MACROS
#define ACE_LACKS_CONST_TIMESPEC_PTR
#define ACE_LACKS_SYSCALL
@@ -83,7 +84,7 @@
#define ACE_HAS_SELECT_H
// Platform has prototypes for ACE_TLI.
-//#define ACE_HAS_TLI_PROTOTYPES
+#define ACE_HAS_TLI_PROTOTYPES
// Platform has the XLI version of ACE_TLI.
// #define ACE_HAS_XLI
diff --git a/include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU b/include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU
index da2331d139a..4eba0aa5e00 100644
--- a/include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU
+++ b/include/makeinclude/platform_sco5.0.0-fsu-pthread.GNU
@@ -10,27 +10,37 @@
# to produce libACE.so correctly changed the specs file for gcc 2.7.2
# for not link -lc and -lgcc and other not shared libraries
-debug = 1
+debug = 0
optimize = 1
CC = gcc
# for no threads
LDLIBS += -lm -L $(ACE_ROOT)/ace
CXX = g++
-CFLAGS += -melf -w
-CCFLAGS += -melf -fno-implicit-templates
+CFLAGS += -melf -m386 -w
+CCFLAGS += -melf -m386
+ifneq ($(FSU_PTHREADS_DIR),"")
+CCFLAGS += -I$(FSU_PTHREADS_DIR)/include
+endif
# -g option not supported for C++ on systems using the DWARF debugging format
-#DCFLAGS += -g
+DCFLAGS += -g
DCCFLAGS += $(DCFLAGS)
DLD = $(CXX)
LD = $(CXX) /usr/lib/libc.so.1
-LIBS = -lnsl -lsocket
+ifneq ($(FSU_PTHREADS_DIR),"")
+LIBS += -L$(FSU_PTHREADS_DIR)/lib
+endif
+LIBS += -lgthreads
+LIBS += -lnsl -lsocket
+LIBS += -lgthreads
+OCFLAGS += -O2
OCCFLAGS += $(OCFLAGS)
-PIC = -fPIC
+PIC = -fpic
AR = ar
ARFLAGS = ruv
RANLIB = /bin/true
-SOFLAGS = $(CPPFLAGS) -melf -fPIC -G
-SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
+SOFLAGS =
+SOLINK = gcc $(PIC) -melf -shared
+SOBUILD = $(SOLINK) -o $(VSHDIR)$*.so $<
PRELIB = @true