diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-24 20:51:11 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-24 20:51:11 +0000 |
commit | dbeac73f76c854ecf1b73740cbd500ae35b47039 (patch) | |
tree | 1f4fb52dc5e816fdcb99eae71f2629220fbe1140 | |
parent | a1e8f68499017845b93c6becd8b11b63629bba04 (diff) | |
download | ATCD-dbeac73f76c854ecf1b73740cbd500ae35b47039.tar.gz |
Replaced __TEXT with ACE_TEXT
27 files changed, 168 insertions, 149 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b index 2533b631cdb..039d43220e2 100644 --- a/ChangeLog-98b +++ b/ChangeLog-98b @@ -1,3 +1,16 @@ +Sat Oct 24 15:21:32 1998 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h (ACE_TEXT): Changed the macro __TEXT to ACE_TEXT to + avoid conflicting with OS/390. __TEXT is still available for + backward compatibility unless ACE_HAS_TEXT_MACRO_CONFLICT is + defined. However, using ACE_TEXT is prefered for obvious + reason. Thanks to Paul K. Fisher <pfisher@plexware.com> for + reporting this. + + * ace/README: Added documentation for ACE_HAS_TEXT_MACRO_CONFLICT. + + * *.cpp: Replaced a bunch of __TEXT to ACE_TEXT. + Sat Oct 24 08:34:08 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * ace/OS.i: Updated the fstat() and stat() calls to work properly @@ -33,7 +46,7 @@ Sat Oct 24 02:13:11 1998 Detlef Backer <Detlef.Becker@med.siemens.de> * ace/Thread_Manager.cpp (spawn_i): In ACE_Thread_Manager::spawn_i() I added the initialization of selector and handler at the creation time of - ACE_Thread_Adapter. + ACE_Thread_Adapter. Fri Oct 23 21:11:03 1998 Douglas C. Schmidt <schmidt@mambo.cs.wustl.edu> @@ -70,7 +83,7 @@ Thu Oct 22 19:48:20 1998 James CE Johnson <jcej@chiroptera.tragus.org> Since Windows just *pretends* to have mixed-case names the cpp files conflict with client.cpp and server.cpp. I renamed these files to: - + * docs/tutorials/015/Client_i.h * docs/tutorials/015/Client_i.cpp * docs/tutorials/015/Server_i.h @@ -672,6 +672,7 @@ Sunil Kumar <skumar@sutmyn.com> T Stach <t.stach@inobis.de> Ron Barack <r.barack@inobis.de> Daniel Nieten <dnieten@bellsouth.net> +Paul K. Fisher <pfisher@plexware.com> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson and is now at ObjectSpace. Paul devised the recursive diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 1cfda783230..cbe0c688b60 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -111,7 +111,7 @@ ACE::unique_name (const void *object, // <object>. TCHAR temp_name[ACE_UNIQUE_NAME_LEN]; ACE_OS::sprintf (temp_name, - __TEXT ("%x%d"), + ACE_TEXT ("%x%d"), object, ACE_OS::getpid ()); ACE_OS::strncpy (name, @@ -2826,13 +2826,13 @@ ACE::get_ip_interfaces (size_t &count, #else /* Winsock 2 && MSVC 5 or later */ const TCHAR *SVCS_KEY1 = - __TEXT ("SYSTEM\\CurrentControlSet\\Services\\"); + ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\"); const TCHAR *LINKAGE_KEY1 = - __TEXT ("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage"); - const TCHAR *TCP_PARAM_SUBKEY = __TEXT ("\\Parameters\\Tcpip"); - const TCHAR *BIND_NAME_ID = __TEXT ("Bind"); - const TCHAR *IPADDR_NAME_ID = __TEXT ("IPAddress"); - const TCHAR *INVALID_TCPIP_DEVICE_ADDR = __TEXT ("0.0.0.0"); + ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage"); + const TCHAR *TCP_PARAM_SUBKEY = ACE_TEXT ("\\Parameters\\Tcpip"); + const TCHAR *BIND_NAME_ID = ACE_TEXT ("Bind"); + const TCHAR *IPADDR_NAME_ID = ACE_TEXT ("IPAddress"); + const TCHAR *INVALID_TCPIP_DEVICE_ADDR = ACE_TEXT ("0.0.0.0"); TCHAR raw_buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1]; DWORD raw_buflen = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1; @@ -2847,7 +2847,7 @@ ACE::get_ip_interfaces (size_t &count, // return buffer contains NULL delimited strings ACE_Tokenizer dev_names (raw_buffer); - dev_names.delimiter (__TEXT('\0')); + dev_names.delimiter (ACE_TEXT('\0')); int n_interfaces = 0; // Count the number of interfaces diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp index 77dd9bd37e0..4bfafcf2c84 100644 --- a/ace/High_Res_Timer.cpp +++ b/ace/High_Res_Timer.cpp @@ -34,7 +34,7 @@ ACE_High_Res_Timer::get_registry_scale_factor (void) unsigned long speed_type = REG_DWORD; long rc = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE, - __TEXT ("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), + ACE_TEXT ("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), NULL, KEY_READ, &hk); @@ -44,7 +44,7 @@ ACE_High_Res_Timer::get_registry_scale_factor (void) return 1; rc = ::RegQueryValueEx (hk, - __TEXT ("~MHz"), + ACE_TEXT ("~MHz"), 0, &speed_type, (LPBYTE) &speed, diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 7ad9d92266c..b3af4a6b533 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -412,19 +412,19 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void) size_t length = 0; length = sizeof lock_name_for_local_name_space / sizeof (TCHAR); ACE_OS::strncpy (lock_name_for_local_name_space, - __TEXT ("name_space_"), + ACE_TEXT ("name_space_"), length); ACE_OS::strncat (lock_name_for_local_name_space, postfix, - length - ACE_OS::strlen (__TEXT ("name_space_"))); + length - ACE_OS::strlen (ACE_TEXT ("name_space_"))); length = sizeof lock_name_for_backing_store / sizeof (TCHAR); ACE_OS::strncpy (lock_name_for_backing_store, - __TEXT ("backing_store_"), + ACE_TEXT ("backing_store_"), length); ACE_OS::strncat (lock_name_for_backing_store, postfix, - length - ACE_OS::strlen (__TEXT ("backing_store_"))); + length - ACE_OS::strlen (ACE_TEXT ("backing_store_"))); // Create the allocator with the appropriate options. ACE_NEW_RETURN (this->allocator_, diff --git a/ace/OS.cpp b/ace/OS.cpp index a38dd8deb60..d0769048fd1 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -27,18 +27,18 @@ ACE_RCSID(ace, OS, "$Id$") # include "ace/Object_Manager.h" # if defined (ACE_HAS_WINCE) -const wchar_t *ACE_OS::day_of_week_name[] = {__TEXT ("Sun"), __TEXT ("Mon"), - __TEXT ("Tue"), __TEXT ("Wed"), - __TEXT ("Thr"), __TEXT ("Fri"), - __TEXT ("Sat")}; -const wchar_t *ACE_OS::month_name[] = {__TEXT ("Jan"), __TEXT ("Feb"), - __TEXT ("Mar"), __TEXT ("Apr"), - __TEXT ("May"), __TEXT ("Jun"), - __TEXT ("Jul"), __TEXT ("Aug"), - __TEXT ("Sep"), __TEXT ("Oct"), - __TEXT ("Nov"), __TEXT ("Dec") }; - -static const ASYS_TCHAR *ACE_OS_CTIME_R_FMTSTR = __TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); +const wchar_t *ACE_OS::day_of_week_name[] = {ACE_TEXT ("Sun"), ACE_TEXT ("Mon"), + ACE_TEXT ("Tue"), ACE_TEXT ("Wed"), + ACE_TEXT ("Thr"), ACE_TEXT ("Fri"), + ACE_TEXT ("Sat")}; +const wchar_t *ACE_OS::month_name[] = {ACE_TEXT ("Jan"), ACE_TEXT ("Feb"), + ACE_TEXT ("Mar"), ACE_TEXT ("Apr"), + ACE_TEXT ("May"), ACE_TEXT ("Jun"), + ACE_TEXT ("Jul"), ACE_TEXT ("Aug"), + ACE_TEXT ("Sep"), ACE_TEXT ("Oct"), + ACE_TEXT ("Nov"), ACE_TEXT ("Dec") }; + +static const ASYS_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); # endif /* ACE_HAS_WINCE */ # if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) @@ -301,7 +301,7 @@ ACE_OS::uname (struct utsname *name) // ACE_TRACE ("ACE_OS::uname"); # if defined (ACE_WIN32) size_t maxnamelen = sizeof name->nodename; - ACE_OS::strcpy (name->sysname, __TEXT ("Win32")); + ACE_OS::strcpy (name->sysname, ACE_TEXT ("Win32")); OSVERSIONINFO vinfo; vinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); @@ -310,21 +310,21 @@ ACE_OS::uname (struct utsname *name) SYSTEM_INFO sinfo; ::GetSystemInfo(&sinfo); - ACE_OS::strcpy (name->sysname, __TEXT ("Win32")); + ACE_OS::strcpy (name->sysname, ACE_TEXT ("Win32")); if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT) { // Get information from the two structures ACE_OS::sprintf (name->release, # if defined (ACE_HAS_WINCE) - __TEXT ("Windows CE %d.%d"), + ACE_TEXT ("Windows CE %d.%d"), # else - __TEXT ("Windows NT %d.%d"), + ACE_TEXT ("Windows NT %d.%d"), # endif /* ACE_HAS_WINCE */ vinfo.dwMajorVersion, vinfo.dwMinorVersion); ACE_OS::sprintf (name->version, - __TEXT ("Build %d %s"), + ACE_TEXT ("Build %d %s"), vinfo.dwBuildNumber, vinfo.szCSDVersion); @@ -334,8 +334,8 @@ ACE_OS::uname (struct utsname *name) // -1 is necessary for because of the space between processor and // subtype in the machine name. const int bufsize = ((sizeof (name->machine) / sizeof (TCHAR)) / 2) - 1; - TCHAR processor[bufsize] = __TEXT ("Unknown"); - TCHAR subtype[bufsize] = __TEXT ("Unknown"); + TCHAR processor[bufsize] = ACE_TEXT ("Unknown"); + TCHAR subtype[bufsize] = ACE_TEXT ("Unknown"); WORD arch; #if (! defined(__BORLANDC__)) @@ -370,69 +370,69 @@ ACE_OS::uname (struct utsname *name) switch (arch) { case PROCESSOR_ARCHITECTURE_INTEL: - ACE_OS::strcpy (processor, __TEXT ("Intel")); + ACE_OS::strcpy (processor, ACE_TEXT ("Intel")); if (sinfo.wProcessorLevel == 3) - ACE_OS::strcpy (subtype, __TEXT ("80386")); + ACE_OS::strcpy (subtype, ACE_TEXT ("80386")); else if (sinfo.wProcessorLevel == 4) - ACE_OS::strcpy (subtype, __TEXT ("80486")); + ACE_OS::strcpy (subtype, ACE_TEXT ("80486")); else if (sinfo.wProcessorLevel == 5) - ACE_OS::strcpy (subtype, __TEXT ("Pentium")); + ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium")); else if (sinfo.wProcessorLevel == 6) - ACE_OS::strcpy (subtype, __TEXT ("Pentium Pro")); + ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium Pro")); else if (sinfo.wProcessorLevel == 7) // I'm guessing here - ACE_OS::strcpy (subtype, __TEXT ("Pentium II")); + ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium II")); break; case PROCESSOR_ARCHITECTURE_MIPS: - ACE_OS::strcpy (processor, __TEXT ("MIPS")); - ACE_OS::strcpy (subtype, __TEXT ("R4000")); + ACE_OS::strcpy (processor, ACE_TEXT ("MIPS")); + ACE_OS::strcpy (subtype, ACE_TEXT ("R4000")); break; case PROCESSOR_ARCHITECTURE_ALPHA: - ACE_OS::strcpy (processor, __TEXT ("Alpha")); - ACE_OS::sprintf (subtype, __TEXT ("%d"), sinfo.wProcessorLevel); + ACE_OS::strcpy (processor, ACE_TEXT ("Alpha")); + ACE_OS::sprintf (subtype, ACE_TEXT ("%d"), sinfo.wProcessorLevel); break; case PROCESSOR_ARCHITECTURE_PPC: - ACE_OS::strcpy (processor, __TEXT ("PPC")); + ACE_OS::strcpy (processor, ACE_TEXT ("PPC")); if (sinfo.wProcessorLevel == 1) - ACE_OS::strcpy (subtype, __TEXT ("601")); + ACE_OS::strcpy (subtype, ACE_TEXT ("601")); else if (sinfo.wProcessorLevel == 3) - ACE_OS::strcpy (subtype, __TEXT ("603")); + ACE_OS::strcpy (subtype, ACE_TEXT ("603")); else if (sinfo.wProcessorLevel == 4) - ACE_OS::strcpy (subtype, __TEXT ("604")); + ACE_OS::strcpy (subtype, ACE_TEXT ("604")); else if (sinfo.wProcessorLevel == 6) - ACE_OS::strcpy (subtype, __TEXT ("603+")); + ACE_OS::strcpy (subtype, ACE_TEXT ("603+")); else if (sinfo.wProcessorLevel == 9) - ACE_OS::strcpy (subtype, __TEXT ("804+")); + ACE_OS::strcpy (subtype, ACE_TEXT ("804+")); else if (sinfo.wProcessorLevel == 20) - ACE_OS::strcpy (subtype, __TEXT ("620")); + ACE_OS::strcpy (subtype, ACE_TEXT ("620")); break; case PROCESSOR_ARCHITECTURE_UNKNOWN: default: // @@ We could provide WinCE specific info here. But let's // defer that to some later point. - ACE_OS::strcpy (processor, __TEXT ("Unknown")); + ACE_OS::strcpy (processor, ACE_TEXT ("Unknown")); break; } - ACE_OS::sprintf(name->machine, __TEXT ("%s %s"), processor, subtype); + ACE_OS::sprintf(name->machine, ACE_TEXT ("%s %s"), processor, subtype); } else if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { // Get Windows 95 Information - ACE_OS::strcpy (name->release, __TEXT ("Windows 95")); - ACE_OS::sprintf (name->version, __TEXT ("%d"), LOWORD (vinfo.dwBuildNumber)); + ACE_OS::strcpy (name->release, ACE_TEXT ("Windows 95")); + ACE_OS::sprintf (name->version, ACE_TEXT ("%d"), LOWORD (vinfo.dwBuildNumber)); if (sinfo.dwProcessorType == PROCESSOR_INTEL_386) - ACE_OS::strcpy (name->machine, __TEXT ("Intel 80386")); + ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel 80386")); else if (sinfo.dwProcessorType == PROCESSOR_INTEL_486) - ACE_OS::strcpy (name->machine, __TEXT ("Intel 80486")); + ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel 80486")); else if (sinfo.dwProcessorType == PROCESSOR_INTEL_PENTIUM) - ACE_OS::strcpy (name->machine, __TEXT ("Intel Pentium")); + ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel Pentium")); } else { // We don't know what this is! - ACE_OS::strcpy (name->release, __TEXT ("???")); - ACE_OS::strcpy (name->version, __TEXT ("???")); - ACE_OS::strcpy (name->machine, __TEXT ("???")); + ACE_OS::strcpy (name->release, ACE_TEXT ("???")); + ACE_OS::strcpy (name->version, ACE_TEXT ("???")); + ACE_OS::strcpy (name->machine, ACE_TEXT ("???")); } return ACE_OS::hostname (name->nodename, maxnamelen); @@ -799,7 +799,7 @@ ACE_OS::mktemp (wchar_t *s) return 0; else { - wchar_t *xxxxxx = ACE_OS::strstr (s, __TEXT ("XXXXXX")); + wchar_t *xxxxxx = ACE_OS::strstr (s, ACE_TEXT ("XXXXXX")); if (xxxxxx == 0) // the template string doesn't contain "XXXXXX"! @@ -815,15 +815,15 @@ ACE_OS::mktemp (wchar_t *s) // condition if multiple threads in a process use the same // template). This appears to match the behavior of the // Solaris 2.5 mktemp(). - ACE_OS::sprintf (xxxxxx, __TEXT ("%05d%c"), getpid (), unique_letter); + ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%05d%c"), getpid (), unique_letter); while (ACE_OS::stat (s, &sb) >= 0) { if (++unique_letter <= L'z') - ACE_OS::sprintf (xxxxxx, __TEXT ("%05d%c"), getpid (), unique_letter); + ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%05d%c"), getpid (), unique_letter); else { // maximum of 26 unique files per template, per process - ACE_OS::sprintf (xxxxxx, __TEXT ("%s"), L""); + ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%s"), L""); return s; } } @@ -3674,10 +3674,10 @@ ACE_OS::socket_init (int version_high, int version_low) if (error != 0) # if defined (ACE_HAS_WINCE) { - wchar_t fmt[] = __TEXT ("%s failed, WSAGetLastError returned %d"); + wchar_t fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d"); wchar_t buf[80]; // @@ Eliminate magic number. - ACE_OS::sprintf (buf, fmt, __TEXT ("WSAStartup"), error); - ::MessageBox (NULL, buf, __TEXT ("WSAStartup failed!"), MB_OK); + ACE_OS::sprintf (buf, fmt, ACE_TEXT ("WSAStartup"), error); + ::MessageBox (NULL, buf, ACE_TEXT ("WSAStartup failed!"), MB_OK); } # else cerr << "WSAStartup failed, WSAGetLastError returned " << error << endl; @@ -3703,10 +3703,10 @@ ACE_OS::socket_fini (void) { int error = ::WSAGetLastError (); # if defined (ACE_HAS_WINCE) - wchar_t fmt[] = __TEXT ("%s failed, WSAGetLastError returned %d"); + wchar_t fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d"); wchar_t buf[80]; // @@ Eliminate magic number. - ACE_OS::sprintf (buf, fmt, __TEXT ("WSACleanup"), error); - ::MessageBox (NULL, buf , __TEXT ("WSACleanup failed!"), MB_OK); + ACE_OS::sprintf (buf, fmt, ACE_TEXT ("WSACleanup"), error); + ::MessageBox (NULL, buf , ACE_TEXT ("WSACleanup failed!"), MB_OK); # else cerr << "WSACleanup failed, WSAGetLastError returned " << error << endl; # endif /* ACE_HAS_WINCE */ @@ -835,13 +835,17 @@ typedef struct # endif /* ACE_DEFAULT_GLOBALNAME_W */ # endif /* ACE_HAS_UNICODE */ -# if !defined (__TEXT) +# if !defined (ACE_TEXT) # if (defined (ACE_HAS_UNICODE) && (defined (UNICODE))) -# define __TEXT(STRING) L##STRING +# define ACE_TEXT(STRING) L##STRING # else -# define __TEXT(STRING) STRING +# define ACE_TEXT(STRING) STRING # endif /* UNICODE && ACE_HAS_UNICODE */ -# endif /* !defined __TEXT */ +# endif /* !defined ACE_TEXT */ + +# if !defined (ACE_HAS_TEXT_MACRO_CONFLICT) +# define __TEXT(STRING) ACE_TEXT(STRING) +# endif /* ACE_HAS_TEXT_MACRO_CONFLICT */ typedef int ACE_HANDLE; typedef ACE_HANDLE ACE_SOCKET; @@ -2713,7 +2717,7 @@ typedef void (*ACE_SignalHandlerV)(...); // Used for ACE_MMAP_Memory_Pool # if !defined (ACE_DEFAULT_BACKING_STORE) -# define ACE_DEFAULT_BACKING_STORE __TEXT ("C:\\temp\\ace-malloc-XXXXXX") +# define ACE_DEFAULT_BACKING_STORE ACE_TEXT ("C:\\temp\\ace-malloc-XXXXXX") # endif /* ACE_DEFAULT_BACKING_STORE */ // Used for logging @@ -3005,18 +3009,20 @@ typedef ACE_UINT64 ACE_hrtime_t; typedef const wchar_t *LPCTSTR; typedef wchar_t *LPTSTR; typedef wchar_t TCHAR; -# if !defined (__TEXT) -# define __TEXT(STRING) L##STRING -# endif /* __TEXT */ +# if !defined (ACE_TEXT) +# define ACE_TEXT(STRING) L##STRING +# endif /* ACE_TEXT */ # else typedef const char *LPCTSTR; typedef char *LPTSTR; typedef char TCHAR; -# if !defined (__TEXT) -# define __TEXT(STRING) STRING -# endif /* __TEXT */ +# if !defined (ACE_TEXT) +# define ACE_TEXT(STRING) STRING +# endif /* ACE_TEXT */ # endif /* ACE_HAS_UNICODE && UNICODE */ +# define __TEXT(STRING) ACE_TEXT(STRING) + # if defined (m88k) # define RUSAGE_SELF 1 # endif /* m88k */ @@ -6200,7 +6206,7 @@ private: # if defined ACE_HAS_VERBOSE_NOTSUP // Print a console message with the file and line number of the // unsupported function. -# define ACE_NOTSUP_RETURN(FAILVALUE) do { errno = ENOTSUP; ACE_OS::fprintf (stderr, __TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__); return FAILVALUE; } while (0) +# define ACE_NOTSUP_RETURN(FAILVALUE) do { errno = ENOTSUP; ACE_OS::fprintf (stderr, ACE_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__); return FAILVALUE; } while (0) # else /* ! ACE_HAS_VERBOSE_NOTSUP */ # define ACE_NOTSUP_RETURN(FAILVALUE) do { errno = ENOTSUP ; return FAILVALUE; } while (0) # endif /* ! ACE_HAS_VERBOSE_NOTSUP */ diff --git a/ace/Process.cpp b/ace/Process.cpp index 226bf1755c7..d096946243f 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -366,7 +366,7 @@ ACE_Process_Options::setenv (LPCTSTR variable_name, TCHAR newformat[DEFAULT_COMMAND_LINE_BUF_LEN]; // Add in the variable name. - ACE_OS::sprintf (newformat, __TEXT ("%s=%s"), variable_name, format); + ACE_OS::sprintf (newformat, ACE_TEXT ("%s=%s"), variable_name, format); TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN]; @@ -509,7 +509,7 @@ ACE_Process_Options::command_line (LPTSTR argv[]) ACE_OS::strcat (command_line_buf_, argv[i]); while (argv[++i]) { - ACE_OS::strcat (command_line_buf_, __TEXT (" ")); + ACE_OS::strcat (command_line_buf_, ACE_TEXT (" ")); ACE_OS::strcat (command_line_buf_, argv[i]); } } diff --git a/ace/README b/ace/README index 75643bbf90d..d37f213ddb8 100644 --- a/ace/README +++ b/ace/README @@ -113,6 +113,7 @@ ACE_HAS_RUSAGE_WHO_ENUM Platform has enum instead of definition, e.g., enum __rusage_who, for Linux glibc 2.0. +ACE_HAS_TEXT_MACRO_CONFLICT Platform also has __TEXT defined. ACE_HAS_SEND_TIMEDWAIT ACE_HAS_SENDTO_TIMEDWAIT ACE_HAS_SENDMSG_TIMEDWAIT diff --git a/ace/Registry.cpp b/ace/Registry.cpp index 70744c16d2e..0b605b9195e 100644 --- a/ace/Registry.cpp +++ b/ace/Registry.cpp @@ -24,7 +24,7 @@ ACE_RCSID(ace, Registry, "$Id$") // Separator for components in a name /* static */ -LPCTSTR ACE_Registry::STRING_SEPARATOR = __TEXT ("\\"); +LPCTSTR ACE_Registry::STRING_SEPARATOR = ACE_TEXT ("\\"); int ACE_Registry::Name_Component::operator== (const Name_Component &rhs) @@ -1078,7 +1078,7 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co { long result = -1; - if (machine_name != 0 && ACE_OS::strcmp (__TEXT ("localhost"), machine_name) == 0) + if (machine_name != 0 && ACE_OS::strcmp (ACE_TEXT ("localhost"), machine_name) == 0) machine_name = 0; if (predefined == HKEY_LOCAL_MACHINE || predefined == HKEY_USERS) diff --git a/ace/SPIPE_Addr.cpp b/ace/SPIPE_Addr.cpp index 4c4f1164231..ede9445b6cd 100644 --- a/ace/SPIPE_Addr.cpp +++ b/ace/SPIPE_Addr.cpp @@ -92,20 +92,20 @@ ACE_SPIPE_Addr::set (LPCTSTR addr, if (colonp == 0) // Assume it's a local name. { - ACE_OS::strcpy (temp, __TEXT ( "\\\\.\\pipe\\")); + ACE_OS::strcpy (temp, ACE_TEXT ( "\\\\.\\pipe\\")); ACE_OS::strcat (temp, addr); } else { if (ACE_OS::strncmp (addr, - __TEXT ("localhost"), + ACE_TEXT ("localhost"), ACE_OS::strlen ("localhost")) == 0) // change "localhost" to "." - ACE_OS::strcpy (temp, __TEXT ("\\\\.")); + ACE_OS::strcpy (temp, ACE_TEXT ("\\\\.")); else { - ACE_OS::strcpy (temp, __TEXT ("\\\\")); + ACE_OS::strcpy (temp, ACE_TEXT ("\\\\")); TCHAR *t; @@ -113,13 +113,13 @@ ACE_SPIPE_Addr::set (LPCTSTR addr, // NUL character into it. ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (addr), -1); - t[colonp - addr] = __TEXT ('\0'); + t[colonp - addr] = ACE_TEXT ('\0'); ACE_OS::strcpy (temp, t); ACE_OS::free (t); } - ACE_OS::strcat (temp, __TEXT ("\\pipe\\")); + ACE_OS::strcat (temp, ACE_TEXT ("\\pipe\\")); ACE_OS::strcat (temp, colonp + 1); } this->ACE_Addr::base_set (AF_SPIPE, diff --git a/bin/auto_ptr.perl b/bin/auto_ptr.perl index 01d1cb5e754..b2a161acc5e 100755 --- a/bin/auto_ptr.perl +++ b/bin/auto_ptr.perl @@ -1,14 +1,12 @@ -#!/pkg/gnu/bin/perl -pi +#!/usr/bin/perl -pi # # # You may want to run the "find" command with this script, which maybe something like this: # # find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.ipp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl # -# And if your perl installation isn't in /pkg/gnu/bin/perl, +# And if your perl installation isn't in /pkg/gnu/bin/perl, # please make the change accordingly # # -s/auto_basic_ptr/ACE_Auto_Basic_Ptr/g; -s/auto_basic_array_ptr/ACE_Auto_Basic_Array_Ptr/g; -s/auto_array_ptr/ACE_Auto_Array_Ptr/g; +s/__TEXT/ACE_TEXT/g; diff --git a/examples/Connection/blocking/SPIPE-acceptor.cpp b/examples/Connection/blocking/SPIPE-acceptor.cpp index 2e1f81e5675..9d0728144d9 100644 --- a/examples/Connection/blocking/SPIPE-acceptor.cpp +++ b/examples/Connection/blocking/SPIPE-acceptor.cpp @@ -53,7 +53,7 @@ IPC_Server::IPC_Server (void) : n_threads_ (1), done_handler_ (ACE_Sig_Handler_Ex (ACE_Proactor::end_event_loop)) { - ACE_OS::strcpy (rendezvous_, __TEXT ("acepipe")); + ACE_OS::strcpy (rendezvous_, ACE_TEXT ("acepipe")); } IPC_Server::~IPC_Server (void) diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp index 7dd88874adc..0684d54c5ac 100644 --- a/examples/Connection/blocking/SPIPE-connector.cpp +++ b/examples/Connection/blocking/SPIPE-connector.cpp @@ -103,7 +103,7 @@ IPC_Client::IPC_Client (void) : iterations_ (0), done_handler_ (ACE_Sig_Handler_Ex (ACE_Proactor::end_event_loop)) { - ACE_OS::strcpy (rendezvous_, __TEXT ("acepipe")); + ACE_OS::strcpy (rendezvous_, ACE_TEXT ("acepipe")); } IPC_Client::~IPC_Client (void) diff --git a/examples/Reactor/WFMO_Reactor/test_console_input.cpp b/examples/Reactor/WFMO_Reactor/test_console_input.cpp index 3747705e3aa..650e2a93d79 100644 --- a/examples/Reactor/WFMO_Reactor/test_console_input.cpp +++ b/examples/Reactor/WFMO_Reactor/test_console_input.cpp @@ -53,7 +53,7 @@ Event_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::read"), -1); } - if (ACE_OS::strcmp (__TEXT("quit\r\n"), buffer) == 0) + if (ACE_OS::strcmp (ACE_TEXT("quit\r\n"), buffer) == 0) this->reactor ()->close (); ACE_DEBUG ((LM_DEBUG, "User input: %s", buffer)); diff --git a/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp b/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp index 0fabfd97fe4..3b4ada41d5d 100644 --- a/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp +++ b/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp @@ -23,8 +23,8 @@ ACE_RCSID(ReactorEx, test_directory_changes, "$Id$") static int stop_test = 0; -static LPCTSTR directory = __TEXT ("."); -static LPCTSTR temp_file = __TEXT ("foo"); +static LPCTSTR directory = ACE_TEXT ("."); +static LPCTSTR temp_file = ACE_TEXT ("foo"); class Event_Handler : public ACE_Event_Handler { diff --git a/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp b/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp index b5e5fce1e4c..37b466dc40b 100644 --- a/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp +++ b/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp @@ -25,7 +25,7 @@ ACE_RCSID(ReactorEx, test_registry_changes, "$Id$") static int stop_test = 0; static HKEY context_to_monitor = HKEY_CURRENT_USER; -static LPCTSTR temp_context_name = __TEXT ("ACE temporary context"); +static LPCTSTR temp_context_name = ACE_TEXT ("ACE temporary context"); class Event_Handler : public ACE_Event_Handler { diff --git a/examples/Registry/test_registry_update.cpp b/examples/Registry/test_registry_update.cpp index 88c6aff96f5..02c5a9a8ef6 100644 --- a/examples/Registry/test_registry_update.cpp +++ b/examples/Registry/test_registry_update.cpp @@ -128,22 +128,22 @@ setup_names () // Stupid implementation of STL is broken /* ::application_context_name.reserve (4); - ::application_context_name [0].id_ = __TEXT ("Software"); - ::application_context_name [1].id_ = __TEXT ("AcmeSoft"); - ::application_context_name [2].id_ = __TEXT ("AcmeApplication"); - ::application_context_name [3].id_ = __TEXT ("1.0"); + ::application_context_name [0].id_ = ACE_TEXT ("Software"); + ::application_context_name [1].id_ = ACE_TEXT ("AcmeSoft"); + ::application_context_name [2].id_ = ACE_TEXT ("AcmeApplication"); + ::application_context_name [3].id_ = ACE_TEXT ("1.0"); ::counter_name.reserve (1); - ::counter_name [0].id_ = __TEXT ("Instance Counter"); + ::counter_name [0].id_ = ACE_TEXT ("Instance Counter"); */ ACE_Registry::Name_Component component; - component.id_ = __TEXT ("Software"), ::application_context_name.insert (component); - component.id_ = __TEXT ("AcmeSoft"), ::application_context_name.insert (component); - component.id_ = __TEXT ("AcmeApplication"), ::application_context_name.insert (component); - component.id_ = __TEXT ("1.0"), ::application_context_name.insert (component); + component.id_ = ACE_TEXT ("Software"), ::application_context_name.insert (component); + component.id_ = ACE_TEXT ("AcmeSoft"), ::application_context_name.insert (component); + component.id_ = ACE_TEXT ("AcmeApplication"), ::application_context_name.insert (component); + component.id_ = ACE_TEXT ("1.0"), ::application_context_name.insert (component); - component.id_ = __TEXT ("Instance Counter"), ::counter_name.insert (component); + component.id_ = ACE_TEXT ("Instance Counter"), ::counter_name.insert (component); } diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp index fa5f17b932e..06a98a6f211 100644 --- a/tests/Env_Value_Test.cpp +++ b/tests/Env_Value_Test.cpp @@ -48,13 +48,13 @@ main (int argc, ASYS_TCHAR* [], ASYS_TCHAR*envp[]) status = options.setenv (envp); ACE_ASSERT (status == 0); - options.command_line (__TEXT ("Env_Value_Test run_as_test")); + options.command_line (ACE_TEXT ("Env_Value_Test run_as_test")); - status = options.setenv(__TEXT ("TEST_VALUE_POSITIVE"), __TEXT ("%s"), - __TEXT ("10.2")); + status = options.setenv(ACE_TEXT ("TEST_VALUE_POSITIVE"), ACE_TEXT ("%s"), + ACE_TEXT ("10.2")); ACE_ASSERT (status == 0); - status = options.setenv(__TEXT ("TEST_VALUE_NEGATIVE"), __TEXT ("%s"), - __TEXT ("-10.2")); + status = options.setenv(ACE_TEXT ("TEST_VALUE_NEGATIVE"), ACE_TEXT ("%s"), + ACE_TEXT ("-10.2")); ACE_ASSERT (status == 0); ACE_Process p; diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp index 0d62edcaf16..f0ef46f5027 100644 --- a/tests/MM_Shared_Memory_Test.cpp +++ b/tests/MM_Shared_Memory_Test.cpp @@ -33,7 +33,7 @@ USELIB("..\ace\aced.lib"); #endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */ const int SHMSZ = 27; -static TCHAR shm_key[] = ACE_TEMP_FILE_NAME __TEXT ("XXXXXX"); +static TCHAR shm_key[] = ACE_TEMP_FILE_NAME ACE_TEXT ("XXXXXX"); static void * client (void *) diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp index 5c47081751b..748fff5e105 100644 --- a/tests/Mem_Map_Test.cpp +++ b/tests/Mem_Map_Test.cpp @@ -149,8 +149,8 @@ main (int, ASYS_TCHAR *[]) // Create another temporary file that would hold the output of // reversing the first temporary file - ACE_OS::sprintf (temp_file_name, __TEXT ("%s%s"), - ACE_TEMP_FILE_NAME, __TEXT ("2")); + ACE_OS::sprintf (temp_file_name, ACE_TEXT ("%s%s"), + ACE_TEMP_FILE_NAME, ACE_TEXT ("2")); if ((temp_file_handle = ACE_OS::open (temp_file_name, O_RDWR | O_TRUNC | O_CREAT, 0666)) == ACE_INVALID_HANDLE) diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp index 147200af1e8..b1be2e29b13 100644 --- a/tests/Naming_Test.cpp +++ b/tests/Naming_Test.cpp @@ -194,14 +194,14 @@ main (int argc, char *argv[]) #endif /* ACE_WIN32 && UNICODE */ if (unicode && name_options->use_registry () == 1) { - name_options->namespace_dir (__TEXT ("Software\\ACE\\Name Service")); - name_options->database (__TEXT ("Version 1")); + name_options->namespace_dir (ACE_TEXT ("Software\\ACE\\Name Service")); + name_options->database (ACE_TEXT ("Version 1")); } else { ACE_OS::strcpy (temp_file, ACE::basename (name_options->process_name (), ACE_DIRECTORY_SEPARATOR_CHAR)); - ACE_OS::strcat (temp_file, __TEXT ("XXXXXX")); + ACE_OS::strcat (temp_file, ACE_TEXT ("XXXXXX")); // Set the database name using mktemp to generate a unique file name name_options->database (ACE_OS::mktemp (temp_file)); @@ -244,7 +244,7 @@ main (int argc, char *argv[]) test_unbind (*ns_context); print_time (timer, "Unbinds"); - ACE_OS::sprintf (temp_file, __TEXT ("%s%s%s"), + ACE_OS::sprintf (temp_file, ACE_TEXT ("%s%s%s"), name_options->namespace_dir (), ACE_DIRECTORY_SEPARATOR_STR, name_options->database ()); diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index 519066f2dd6..a8214a09489 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -105,9 +105,9 @@ main (int argc, char *argv[]) ACE_Process_Options options; if (close_pipe == 0) - options.command_line (__TEXT ("Pipe_Test") ACE_PLATFORM_EXE_SUFFIX __TEXT (" -c -d")); + options.command_line (ACE_TEXT ("Pipe_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c -d")); else - options.command_line (__TEXT ("Pipe_Test") ACE_PLATFORM_EXE_SUFFIX __TEXT (" -c")); + options.command_line (ACE_TEXT ("Pipe_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c")); for (int i = 0; i < ::iterations; i++) { diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp index 54ff0f7f4ae..3b497532af1 100644 --- a/tests/Process_Mutex_Test.cpp +++ b/tests/Process_Mutex_Test.cpp @@ -106,13 +106,13 @@ main (int argc, char *argv[]) ACE_Process_Options options; if (release_mutex == 0) - options.command_line (__TEXT (".") ACE_DIRECTORY_SEPARATOR_STR - __TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX - __TEXT (" -c -n %s -d"), ACE_WIDE_STRING (mutex_name)); + options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX + ACE_TEXT (" -c -n %s -d"), ACE_WIDE_STRING (mutex_name)); else - options.command_line (__TEXT (".") ACE_DIRECTORY_SEPARATOR_STR - __TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX - __TEXT (" -c -n %s"), ACE_WIDE_STRING (mutex_name)); + options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX + ACE_TEXT (" -c -n %s"), ACE_WIDE_STRING (mutex_name)); // Spawn ACE_MAX_PROCESSES processes that will contend for the // lock. diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index 45d923a4d8f..7e3142486f3 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -32,11 +32,11 @@ USELIB("..\ace\aced.lib"); #endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */ #define APPLICATION \ -__TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR \ -__TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR \ -__TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR \ -__TEXT ("main") ACE_PLATFORM_EXE_SUFFIX \ -__TEXT (" -f ") ACE_PLATFORM +ACE_TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR \ +ACE_TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR \ +ACE_TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR \ +ACE_TEXT ("main") ACE_PLATFORM_EXE_SUFFIX \ +ACE_TEXT (" -f ") ACE_PLATFORM int main (int, char *[]) @@ -51,7 +51,7 @@ main (int, char *[]) ACE_OS::unlink (ACE_DEFAULT_BACKING_STORE); ACE_Process_Options server_options; - server_options.command_line (APPLICATION __TEXT ("server.conf")); + server_options.command_line (APPLICATION ACE_TEXT ("server.conf")); ACE_Process server; if (server.spawn (server_options) == -1) @@ -62,7 +62,7 @@ main (int, char *[]) ACE_OS::sleep (3); ACE_Process_Options clerk_options; - clerk_options.command_line (APPLICATION __TEXT ("clerk.conf")); + clerk_options.command_line (APPLICATION ACE_TEXT ("clerk.conf")); ACE_Process clerk; if (clerk.spawn (clerk_options) == -1) diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp index 36a7035c646..b64fd548b20 100644 --- a/tests/Tokens_Test.cpp +++ b/tests/Tokens_Test.cpp @@ -193,12 +193,12 @@ main (int, char *[]) run_test (A, B, R, W); LPCTSTR cl = - __TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR - __TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR - __TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR - __TEXT ("main") ACE_PLATFORM_EXE_SUFFIX - __TEXT (" -f ") ACE_PLATFORM - __TEXT ("tokens.conf"); + ACE_TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("main") ACE_PLATFORM_EXE_SUFFIX + ACE_TEXT (" -f ") ACE_PLATFORM + ACE_TEXT ("tokens.conf"); ACE_Process_Options options; options.command_line (cl); diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp index 916000b14b2..b7f1cdb68ff 100644 --- a/tests/UPIPE_SAP_Test.cpp +++ b/tests/UPIPE_SAP_Test.cpp @@ -32,7 +32,7 @@ USELIB("..\ace\aced.lib"); #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32)) // Global pattern -static ACE_UPIPE_Addr addr (__TEXT ("pattern")); +static ACE_UPIPE_Addr addr (ACE_TEXT ("pattern")); // connector thread. |