diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 12 | ||||
-rw-r--r-- | ace/MEM_Acceptor.cpp | 16 | ||||
-rw-r--r-- | ace/MEM_Connector.cpp | 2 | ||||
-rw-r--r-- | ace/MEM_SAP.cpp | 2 | ||||
-rw-r--r-- | ace/MEM_SAP.h | 2 | ||||
-rw-r--r-- | ace/OS.h | 15 |
8 files changed, 59 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog index f4bdf8f2c3b..1ef0fded7d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sat Feb 12 00:27:45 2000 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Changed to conditionally define + ACE_DEFAULT_TEMP_DIR_ENV according to whether the unicode is + supported or not. + + * ace/MEM_SAP.h: + * ace/MEM_SAP.cpp: + * ace/MEM_Acceptor.cpp (accept): + * ace/MEM_Connector.cpp (connect): Made UNICODE friendly. Thanks + to Steve for reporting the problem. + Fri Feb 11 13:26:49 2000 Nanbor Wang <nanbor@cs.wustl.edu> * ace/MEM_Acceptor.cpp (accept): Changed to use diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index f4bdf8f2c3b..1ef0fded7d7 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,15 @@ +Sat Feb 12 00:27:45 2000 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Changed to conditionally define + ACE_DEFAULT_TEMP_DIR_ENV according to whether the unicode is + supported or not. + + * ace/MEM_SAP.h: + * ace/MEM_SAP.cpp: + * ace/MEM_Acceptor.cpp (accept): + * ace/MEM_Connector.cpp (connect): Made UNICODE friendly. Thanks + to Steve for reporting the problem. + Fri Feb 11 13:26:49 2000 Nanbor Wang <nanbor@cs.wustl.edu> * ace/MEM_Acceptor.cpp (accept): Changed to use diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index f4bdf8f2c3b..1ef0fded7d7 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,15 @@ +Sat Feb 12 00:27:45 2000 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Changed to conditionally define + ACE_DEFAULT_TEMP_DIR_ENV according to whether the unicode is + supported or not. + + * ace/MEM_SAP.h: + * ace/MEM_SAP.cpp: + * ace/MEM_Acceptor.cpp (accept): + * ace/MEM_Connector.cpp (connect): Made UNICODE friendly. Thanks + to Steve for reporting the problem. + Fri Feb 11 13:26:49 2000 Nanbor Wang <nanbor@cs.wustl.edu> * ace/MEM_Acceptor.cpp (accept): Changed to use diff --git a/ace/MEM_Acceptor.cpp b/ace/MEM_Acceptor.cpp index 08b8d01ece9..1aa542b715c 100644 --- a/ace/MEM_Acceptor.cpp +++ b/ace/MEM_Acceptor.cpp @@ -106,7 +106,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream, reset_new_handle) == -1) return -1; - ASYS_TCHAR buf [MAXPATHLEN]; + TCHAR buf [MAXPATHLEN]; ACE_INET_Addr local_addr; if (new_stream.get_local_addr (local_addr) == -1) return -1; @@ -114,25 +114,25 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream, if (this->mmap_prefix_ != 0) { ACE_OS::sprintf (buf, - ASYS_TEXT ("%s_%d_"), + ACE_TEXT ("%s_%d_"), this->mmap_prefix_, local_addr.get_port_number ()); } else { - const ASYS_TCHAR* temp_dir = - ACE_OS::getenv (ASYS_TEXT (ACE_DEFAULT_TEMP_DIR_ENV)); + LPCTSTR temp_dir = + ACE_OS::getenv (ACE_DEFAULT_TEMP_DIR_ENV); if (temp_dir == 0) - temp_dir = ASYS_TEXT ("/tmp"); + temp_dir = ACE_TEXT ("/tmp"); ACE_OS::sprintf (buf, - ASYS_TEXT ("%s%cMEM_Acceptor_%d_"), + ACE_TEXT ("%s%cMEM_Acceptor_%d_"), temp_dir, ACE_DIRECTORY_SEPARATOR_CHAR, local_addr.get_port_number ()); } - ASYS_TCHAR unique [MAXPATHLEN]; + TCHAR unique [MAXPATHLEN]; ACE_OS::unique_name (&new_stream, unique, MAXPATHLEN); ACE_OS::strcat (buf, unique); @@ -144,7 +144,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream, return -1; // @@ Need to handle timeout here. - ACE_UINT16 buf_len = ACE_OS::strlen (buf) + 1; + ACE_UINT16 buf_len = (ACE_OS::strlen (buf) + 1) * sizeof (TCHAR); ACE_HANDLE new_handle = new_stream.get_handle (); // No need to worry about byte-order because both parties should always diff --git a/ace/MEM_Connector.cpp b/ace/MEM_Connector.cpp index 090e2cf2e9d..48df29ccff1 100644 --- a/ace/MEM_Connector.cpp +++ b/ace/MEM_Connector.cpp @@ -87,7 +87,7 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream, // Do not close the handle. // now we should setup the mmap malloc. - char buf[MAXPATHLEN]; + TCHAR buf[MAXPATHLEN]; // @@ Need to handle timeout here. ACE_INT16 buf_len; diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp index 6bd8dc184ee..5215cfd3670 100644 --- a/ace/MEM_SAP.cpp +++ b/ace/MEM_SAP.cpp @@ -31,7 +31,7 @@ ACE_MEM_SAP::ACE_MEM_SAP (void) } int -ACE_MEM_SAP::create_shm_malloc (const char *name, +ACE_MEM_SAP::create_shm_malloc (LPCTSTR name, MALLOC_OPTIONS *options) { ACE_TRACE ("ACE_MEM_SAP::create_shm_malloc"); diff --git a/ace/MEM_SAP.h b/ace/MEM_SAP.h index 58d84bb7d64..2252397f3a8 100644 --- a/ace/MEM_SAP.h +++ b/ace/MEM_SAP.h @@ -75,7 +75,7 @@ protected: // = Class initializing methods to create/connect to a shared memory pool. - int create_shm_malloc (const char *name, + int create_shm_malloc (LPCTSTR name, MALLOC_OPTIONS *options = 0); // Create a new shm_malloc object. Return 0 if succeed and -1 otherwise. // This method should only be called from an acceptor class that wants to @@ -990,7 +990,8 @@ typedef struct // Define the name of the environment variable that defines the temp // directory. -# define ACE_DEFAULT_TEMP_DIR_ENV "TMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_A "TMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_W L"TMP" # define ACE_DLL_SUFFIX ".so" # define ACE_DLL_PREFIX "lib" @@ -3294,7 +3295,8 @@ typedef int (*ACE_SEH_EXCEPT_HANDLER)(void *); // Define the name of the environment variable that defines the temp // directory. -# define ACE_DEFAULT_TEMP_DIR_ENV "TEMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_A "TEMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_W L"TEMP" // This will help until we figure out everything: # define NFDBITS 32 /* only used in unused functions... */ @@ -3561,7 +3563,8 @@ typedef char TCHAR; // Define the name of the environment variable that defines the temp // directory. -# define ACE_DEFAULT_TEMP_DIR_ENV "TMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_A "TMP" +# define ACE_DEFAULT_TEMP_DIR_ENV_W L"TMP" // We're some kind of UNIX... # define ACE_PLATFORM_A "UNIX" @@ -8299,6 +8302,9 @@ typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS; # if !defined (ACE_DEFAULT_MUTEX) # define ACE_DEFAULT_MUTEX ACE_DEFAULT_MUTEX_W # endif /* ACE_DEFAULT_MUTEX */ +# if !defined (ACE_DEFAULT_TEMP_DIR_ENV) +# define ACE_DEFAULT_TEMP_DIR_ENV ACE_DEFAULT_TEMP_DIR_ENV_W +# endif /* ACE_DEFAULT_TEMP_DIR_ENV */ # else @@ -8329,6 +8335,9 @@ typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS; # if !defined (ACE_DEFAULT_MUTEX) # define ACE_DEFAULT_MUTEX ACE_DEFAULT_MUTEX_A # endif /* ACE_DEFAULT_MUTEX */ +# if !defined (ACE_DEFAULT_TEMP_DIR_ENV) +# define ACE_DEFAULT_TEMP_DIR_ENV ACE_DEFAULT_TEMP_DIR_ENV +# endif /* ACE_DEFAULT_TEMP_DIR_ENV */ # endif /* UNICODE */ // Some ACE classes always use inline functions to maintain high |