summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorbmendel <bmendel@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-18 12:57:58 +0000
committerbmendel <bmendel@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-18 12:57:58 +0000
commit846785e5c394d980aac6e6d3401fdc601aa11fdd (patch)
treeb141e5ccc212a8ad7b7358e847967f5dad017796 /TAO
parent885a930f049ab6e23541e3e8892c56c57931b52c (diff)
downloadATCD-846785e5c394d980aac6e6d3401fdc601aa11fdd.tar.gz
Changes required to compile on VxWorks: - Modified by Brian Mendel 4/18/97
cdr.hh, corbacom.{hh,cpp}, giop.cpp, marsgall.cpp, typecode.cpp - Changes required for WChar missed in earlier committed code. connmgr.cpp - Changes required for select statement. nvlist.cpp - Conditional include for memory.h added. VxWorks does not have memory.h. object.cpp - Added conditional for VXWORKS to define IID_IUnknown. orbconf.hh - Minor tuning of the configuration file. tcpoa.{hh,cpp} - Added VXWORKS conditional includes. toa.cpp - Added VXWORKS conditional includes.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/IIOP/lib/PC_Install.bat3
-rw-r--r--TAO/IIOP/lib/cdr.hh4
-rw-r--r--TAO/IIOP/lib/connmgr.cpp2
-rw-r--r--TAO/IIOP/lib/connmgr.hh2
-rw-r--r--TAO/IIOP/lib/corbacom.cpp8
-rw-r--r--TAO/IIOP/lib/corbacom.hh11
-rw-r--r--TAO/IIOP/lib/giop.cpp2
-rw-r--r--TAO/IIOP/lib/marshal.cpp14
-rw-r--r--TAO/IIOP/lib/nvlist.cpp2
-rw-r--r--TAO/IIOP/lib/object.cpp2
-rw-r--r--TAO/IIOP/lib/orbconf.hh2
-rw-r--r--TAO/IIOP/lib/orbobj.cpp2
-rw-r--r--TAO/IIOP/lib/tcpoa.cpp15
-rw-r--r--TAO/IIOP/lib/toa.cpp13
-rw-r--r--TAO/IIOP/lib/typecode.cpp2
15 files changed, 52 insertions, 32 deletions
diff --git a/TAO/IIOP/lib/PC_Install.bat b/TAO/IIOP/lib/PC_Install.bat
index a2b1413aecd..1428c78db45 100644
--- a/TAO/IIOP/lib/PC_Install.bat
+++ b/TAO/IIOP/lib/PC_Install.bat
@@ -13,6 +13,7 @@ copy giop.hh ..\proto\include
copy iiopobj.hh ..\proto\include
copy iioporb.hh ..\proto\include
copy roa.hh ..\proto\include
+copy roa.i ..\proto\include
copy tcpoa.hh ..\proto\include
copy xdr.hh ..\proto\include
@@ -32,4 +33,4 @@ copy orb.hh ..\proto\include\corba
copy sequence.hh ..\proto\include\corba
copy stub.hh ..\proto\include\corba
copy orbconf.hh ..\proto\include\corba
-copy debug.hh ..\proto\include\corba \ No newline at end of file
+copy debug.hh ..\proto\include\corba
diff --git a/TAO/IIOP/lib/cdr.hh b/TAO/IIOP/lib/cdr.hh
index 037719c0cbb..760f671a613 100644
--- a/TAO/IIOP/lib/cdr.hh
+++ b/TAO/IIOP/lib/cdr.hh
@@ -152,7 +152,7 @@ struct _EXPCLASS CDR
inline CORBA_Boolean put_char (CORBA_Char c)
{ return put_byte ((char) c); }
- inline CORBA_Boolean put_wchar (wchar_t wc)
+ inline CORBA_Boolean put_wchar (CORBA_WChar wc)
{
//
// "wchar_t" isn't always 2 bytes, such
@@ -210,7 +210,7 @@ struct _EXPCLASS CDR
inline CORBA_Boolean get_char (CORBA_Char &o)
{ return get_byte ((char &) o); }
- inline CORBA_Boolean get_wchar (wchar_t &wc)
+ inline CORBA_Boolean get_wchar (CORBA_WChar &wc)
{
short s;
diff --git a/TAO/IIOP/lib/connmgr.cpp b/TAO/IIOP/lib/connmgr.cpp
index fc7e3c117f8..88655ea02fa 100644
--- a/TAO/IIOP/lib/connmgr.cpp
+++ b/TAO/IIOP/lib/connmgr.cpp
@@ -644,7 +644,7 @@ server_endpoint::block_for_connection (
}
else
value = ACE_OS::select (max_fd + 1, &read_fdset,
- (fd_set*)NULL, (fd_set*)NULL, NULL);
+ (fd_set*)NULL, (fd_set*)NULL, 0);
#ifdef _POSIX_THREADS
diff --git a/TAO/IIOP/lib/connmgr.hh b/TAO/IIOP/lib/connmgr.hh
index 1983e39b7a3..71fd6baa5d5 100644
--- a/TAO/IIOP/lib/connmgr.hh
+++ b/TAO/IIOP/lib/connmgr.hh
@@ -12,6 +12,8 @@
#if unix
# include <sys/time.h>
+#elif defined (VXWORKS)
+# include <time.h>
#else // __WIN32__
# include <winsock.h>
#endif
diff --git a/TAO/IIOP/lib/corbacom.cpp b/TAO/IIOP/lib/corbacom.cpp
index de136e17090..2403eae7267 100644
--- a/TAO/IIOP/lib/corbacom.cpp
+++ b/TAO/IIOP/lib/corbacom.cpp
@@ -50,7 +50,7 @@ CORBA_string_free (CORBA_Char *const str)
//
extern "C" unsigned
-wslen (const wchar_t *str)
+wslen (const CORBA_WChar *str)
{
unsigned len = 0;
@@ -59,10 +59,10 @@ wslen (const wchar_t *str)
return len;
}
-extern "C" wchar_t *
-wscpy (wchar_t *dest, const wchar_t *src)
+extern "C" CORBA_WChar *
+wscpy (CORBA_WChar *dest, const CORBA_WChar *src)
{
- wchar_t *retval = dest;
+ CORBA_WChar *retval = dest;
while ((*dest++ = *src++) != 0)
continue;
diff --git a/TAO/IIOP/lib/corbacom.hh b/TAO/IIOP/lib/corbacom.hh
index 4bb550ece6a..3689a8df11d 100644
--- a/TAO/IIOP/lib/corbacom.hh
+++ b/TAO/IIOP/lib/corbacom.hh
@@ -5,8 +5,9 @@
// CORBA C/C++/COM mapping for Win32
//
-#ifndef CORBACOM_INC
-# define CORBACOM_INC
+#ifndef _CORBACOM_HH
+#define _CORBACOM_HH
+
#include <objbase.h> // Win32 name for "compobj.h"
#if SIZEOF_BOOL != 0
@@ -62,7 +63,7 @@ typedef unsigned __int64 CORBA_ULongLong;
# define NONNATIVE_LONGLONG
#if defined (WORDS_BIGENDIAN)
struct CORBA_LongLong { CORBA_Long h, l; };
-struct CORBA_ULongLong { UCORBA_Long h, l; };
+struct CORBA_ULongLong { CORBA_Long h, l; };
#else
struct CORBA_LongLong { CORBA_Long l, h; };
struct CORBA_ULongLong { CORBA_ULong l, h; };
@@ -101,7 +102,11 @@ void CORBA_string_free (CORBA_Char *const);
//
// NOTE: those are IDL extensions, not yet standard.
//
+#if SIZEOF_WCHAR_T < 2
+typedef short CORBA_WChar;
+#else
typedef wchar_t CORBA_WChar;
+#endif
typedef CORBA_WChar *CORBA_WString;
CORBA_WString CORBA_wstring_alloc (CORBA_ULong len);
diff --git a/TAO/IIOP/lib/giop.cpp b/TAO/IIOP/lib/giop.cpp
index 169ad6e5aa5..636b63e100c 100644
--- a/TAO/IIOP/lib/giop.cpp
+++ b/TAO/IIOP/lib/giop.cpp
@@ -45,7 +45,7 @@
#include <ace/SOCK_Stream.h>
-#if unix
+#if (unix) || defined (VXWORKS)
# include <sys/types.h>
# include <sys/socket.h>
diff --git a/TAO/IIOP/lib/marshal.cpp b/TAO/IIOP/lib/marshal.cpp
index cda3a232723..b02f7b22c60 100644
--- a/TAO/IIOP/lib/marshal.cpp
+++ b/TAO/IIOP/lib/marshal.cpp
@@ -53,8 +53,8 @@
# include <widec.h>
#else
extern "C" {
- unsigned wslen (const wchar_t *);
- wchar_t *wscpy (wchar_t *, const wchar_t *);
+ unsigned wslen (const CORBA_WChar *);
+ CORBA_WChar *wscpy (CORBA_WChar *, const CORBA_WChar *);
}
#endif
@@ -430,7 +430,7 @@ CDR::encoder (
case tk_wstring:
{
- wchar_t *str = *(wchar_t **) data;
+ CORBA_WChar *str = *(CORBA_WChar **) data;
CORBA_ULong len, bounds;
//
@@ -475,7 +475,7 @@ CDR::encoder (
break;
case tk_wchar:
- continue_encoding = stream->put_wchar (*(wchar_t *)data);
+ continue_encoding = stream->put_wchar (*(CORBA_WChar *)data);
break;
// case ~0:
@@ -1059,7 +1059,7 @@ CDR::decoder (
case tk_wstring:
{
- wchar_t *str;
+ CORBA_WChar *str;
CORBA_ULong len = 0;
//
@@ -1072,7 +1072,7 @@ CDR::decoder (
// specs, but we will accept them when it's clear how to do so.
//
continue_decoding = stream->get_ulong (len);
- *((wchar_t **)data) = str = new wchar_t [(size_t) (len)];
+ *((CORBA_WChar **)data) = str = new CORBA_WChar [(size_t) (len)];
if (len != 0) {
while (continue_decoding != CORBA_B_FALSE && len--) {
continue_decoding = stream->get_wchar (*str);
@@ -1088,7 +1088,7 @@ CDR::decoder (
break;
case tk_wchar:
- continue_decoding = stream->get_wchar (*(wchar_t *)data);
+ continue_decoding = stream->get_wchar (*(CORBA_WChar *)data);
break;
// case ~0:
diff --git a/TAO/IIOP/lib/nvlist.cpp b/TAO/IIOP/lib/nvlist.cpp
index b06c2c8d2e4..afe797124a5 100644
--- a/TAO/IIOP/lib/nvlist.cpp
+++ b/TAO/IIOP/lib/nvlist.cpp
@@ -5,7 +5,9 @@
// Implementation of Named Value List
//
#include <assert.h>
+#if !defined (VXWORKS)
#include <memory.h>
+#endif
#include <orb.hh>
#include <initguid.h>
diff --git a/TAO/IIOP/lib/object.cpp b/TAO/IIOP/lib/object.cpp
index fb9bd794e61..53cf1c9232c 100644
--- a/TAO/IIOP/lib/object.cpp
+++ b/TAO/IIOP/lib/object.cpp
@@ -364,7 +364,7 @@ CORBA_Object::_is_equivalent (
// COM's IUnknown support
//
-#if unix
+#if unix || defined (VXWORKS)
//
// XXX this is not the GUID that Microsoft uses. It can matter.
//
diff --git a/TAO/IIOP/lib/orbconf.hh b/TAO/IIOP/lib/orbconf.hh
index 8155392a87e..7057e0abb04 100644
--- a/TAO/IIOP/lib/orbconf.hh
+++ b/TAO/IIOP/lib/orbconf.hh
@@ -29,7 +29,7 @@
#endif // BC++ convention
/* Define if you have the <widec.h> header file. */
-#if !defined(linux) && !defined(_WIN32)
+#if !defined(linux) && !defined(_WIN32) && !defined(VXWORKS)
# define HAVE_WIDEC_H 1
#endif
diff --git a/TAO/IIOP/lib/orbobj.cpp b/TAO/IIOP/lib/orbobj.cpp
index e6223c5d80c..f091b4db1b0 100644
--- a/TAO/IIOP/lib/orbobj.cpp
+++ b/TAO/IIOP/lib/orbobj.cpp
@@ -24,7 +24,6 @@
#include <initguid.h>
-
extern void __TC_init_table ();
extern void __TC_init_standard_exceptions (CORBA_Environment &env);
@@ -182,6 +181,7 @@ CORBA_ORB_init (
//
// NOTE: we still "just" assume that native floating point is IEEE.
//
+
if (sizeof (CORBA_Short) != 2
|| sizeof (CORBA_Long) != 4
|| sizeof (CORBA_LongLong) != 8
diff --git a/TAO/IIOP/lib/tcpoa.cpp b/TAO/IIOP/lib/tcpoa.cpp
index 347140ce673..8285cf9cec0 100644
--- a/TAO/IIOP/lib/tcpoa.cpp
+++ b/TAO/IIOP/lib/tcpoa.cpp
@@ -14,16 +14,19 @@
//
#include <assert.h>
+#if defined (VXWORKS)
+#include <stdarg.h>
+#endif
#include <stdio.h>
#include <string.h>
#if unix
-#include <unistd.h>
-#include <netdb.h>
-
+# include <unistd.h>
+# include <netdb.h>
+#elif defined (VXWORKS)
+# include <unistd.h>
#else
-#include <winsock.h>
-
+# include <winsock.h>
#endif
#include <orb.hh>
@@ -678,10 +681,12 @@ TCP_OA::get_request (
dexc (env, "TCP_OA, block for connection");
return;
}
+#if 0
if (fd == 0) {
do_exit = CORBA_B_TRUE;
return;
}
+#endif
//
// THREADING NOTE: This is the last of the need to have the OA
diff --git a/TAO/IIOP/lib/toa.cpp b/TAO/IIOP/lib/toa.cpp
index 841de50e119..723253e485e 100644
--- a/TAO/IIOP/lib/toa.cpp
+++ b/TAO/IIOP/lib/toa.cpp
@@ -11,16 +11,19 @@
//
#include <assert.h>
+#if defined (VXWORKS)
+#include <stdarg.h>
+#endif
#include <stdio.h>
#include <string.h>
#if unix
-#include <unistd.h>
-#include <netdb.h>
-
+# include <unistd.h>
+# include <netdb.h>
+#elif defined (VXWORKS)
+# include <unistd.h>
#else
-#include <winsock.h>
-
+# include <winsock.h>
#endif
#include <orb.hh>
diff --git a/TAO/IIOP/lib/typecode.cpp b/TAO/IIOP/lib/typecode.cpp
index dec2d569eff..537c1949bd2 100644
--- a/TAO/IIOP/lib/typecode.cpp
+++ b/TAO/IIOP/lib/typecode.cpp
@@ -25,7 +25,9 @@
#include "cdr.hh"
#include "thread.hh"
+#if !defined (VXWORKS)
#include <memory.h>
+#endif
#include <sys/types.h>
#include <initguid.h>