summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2006-09-21 19:43:53 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2006-09-21 19:43:53 +0000
commit21e9f55c0166c3583ba4c128f05cfe3ac0099072 (patch)
tree2a06657b6a060b0a7c5ba44004e9465c2a193c1b
parent749511fbc746ad0d8e87f09af01242df2cb81014 (diff)
downloadATCD-21e9f55c0166c3583ba4c128f05cfe3ac0099072.tar.gz
ChangeLogTag:Tue
-rw-r--r--ACE/ChangeLog10
-rw-r--r--ACE/ace/FILE_Connector.h4
-rw-r--r--ACE/ace/INET_Addr.cpp2
-rw-r--r--ACE/apps/gperf/ChangeLog7
-rw-r--r--ACE/apps/gperf/src/Key_List.cpp2
-rw-r--r--ACE/tests/Unload_libACE.cpp256
6 files changed, 149 insertions, 132 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index aa98dde2017..0e274cefdeb 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,13 @@
+Tue Sep 19 12:27:47 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
+
+ * tests/Unload_libACE.cpp: Fixed the formatting of this file so it
+ conformed to ACE guidelines.
+
+Tue Sep 19 02:54:20 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
+
+ * ace/FILE_Connector.h: Changed the documentation to reflect the fact
+ that mkstemp() is used, not mktemp().
+
Thu Sep 21 16:51:34 UTC 2006 Ciju John <johnc@ociweb.com>
* ace/TP_Reactor.h:
diff --git a/ACE/ace/FILE_Connector.h b/ACE/ace/FILE_Connector.h
index 3521e6490fc..54352f1e066 100644
--- a/ACE/ace/FILE_Connector.h
+++ b/ACE/ace/FILE_Connector.h
@@ -48,7 +48,7 @@ public:
* if things go well. The <remote_sap> is the file that we are
* trying to create/open. If it's the default value of
* <ACE_Addr::sap_any> then the user is letting the OS create the
- * filename (via <ACE_OS::mktemp>). The <timeout> is the amount of
+ * filename (via <ACE_OS::mkstemp>). The <timeout> is the amount of
* time to wait to create/open the file. If it's 0 then we block
* indefinitely. If *timeout == {0, 0} then the file is created
* using non-blocking mode. If *timeout > {0, 0} then this is the
@@ -70,7 +70,7 @@ public:
* if things go well. The <remote_sap> is the file that we are
* trying to create/open. If it's the default value of
* <ACE_Addr::sap_any> then the user is letting the OS create the
- * filename (via <ACE_OS::mktemp>). The <timeout> is the amount of
+ * filename (via <ACE_OS::mkstemp>). The <timeout> is the amount of
* time to wait to create/open the file. If it's 0 then we block
* indefinitely. If *timeout == {0, 0} then the file is created
* using non-blocking mode. In this case, if the create/open can't
diff --git a/ACE/ace/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp
index 99fa10f6957..b8c0da25092 100644
--- a/ACE/ace/INET_Addr.cpp
+++ b/ACE/ace/INET_Addr.cpp
@@ -662,7 +662,7 @@ ACE_INET_Addr::get_host_name (char hostname[],
int result;
if (len > 1)
{
- result = get_host_name_i(hostname,len);
+ result = get_host_name_i (hostname,len);
if (result < 0)
{
if (result == -2)
diff --git a/ACE/apps/gperf/ChangeLog b/ACE/apps/gperf/ChangeLog
index 600cde48a9d..d98c69958d5 100644
--- a/ACE/apps/gperf/ChangeLog
+++ b/ACE/apps/gperf/ChangeLog
@@ -1,3 +1,10 @@
+Thu Sep 21 11:54:54 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
+
+ * src/Key_List.cpp (output_hash_function): Fixed a bug where the
+ wrong type is chosen if max_hash_value was == UCHAR_MAX or
+ _USHRT_MAX. Thanks to Jody Hagins <jody at atdesk dot com> for
+ this fix. This fixes bug id 2655.
+
Tue Mar 14 21:08:12 UTC 2006 jiang,shanshan <shanshan.jiang@vanderbilt.edu>
* apps/gperf/src/Gen_Perf.cpp
diff --git a/ACE/apps/gperf/src/Key_List.cpp b/ACE/apps/gperf/src/Key_List.cpp
index e954c075e8a..474d0889f97 100644
--- a/ACE/apps/gperf/src/Key_List.cpp
+++ b/ACE/apps/gperf/src/Key_List.cpp
@@ -1126,7 +1126,7 @@ Key_List::output_hash_function (void)
// Generate the asso_values table.
ACE_OS::printf (" static %sunsigned %s asso_values[] =\n {",
option[CONSTANT] ? "const " : "",
- max_hash_value <= ((int) UCHAR_MAX) ? "char" : (max_hash_value <= ((int) USHRT_MAX) ? "short" : "int"));
+ max_hash_value < ((int) UCHAR_MAX) ? "char" : (max_hash_value < ((int) USHRT_MAX) ? "short" : "int"));
ACE_OS::printf ("\n#if defined (ACE_MVS)");
#if ACE_STANDARD_CHARACTER_SET_SIZE == ACE_EBCDIC_SIZE
diff --git a/ACE/tests/Unload_libACE.cpp b/ACE/tests/Unload_libACE.cpp
index 492a8f718ef..77e7f9834c8 100644
--- a/ACE/tests/Unload_libACE.cpp
+++ b/ACE/tests/Unload_libACE.cpp
@@ -49,10 +49,10 @@
#define TIME_STAMP_FIELD_WIDTH 32
static char *
-time_stamp ( char date_and_time[], int date_and_timelen, int format )
+time_stamp (char date_and_time[], int date_and_timelen, int format)
{
- static char const *const month_name[] =
- {
+ static char const *const month_name[] =
+ {
"Jan",
"Feb",
"Mar",
@@ -65,10 +65,10 @@ time_stamp ( char date_and_time[], int date_and_timelen, int format )
"Oct",
"Nov",
"Dec"
- };
+ };
- static char const *const day_of_week_name[] =
- {
+ static char const *const day_of_week_name[] =
+ {
"Sun",
"Mon",
"Tue",
@@ -76,153 +76,153 @@ time_stamp ( char date_and_time[], int date_and_timelen, int format )
"Thu",
"Fri",
"Sat"
- };
+ };
- char *ts = NULL;
+ char *ts = NULL;
- if ( date_and_timelen >= TIME_STAMP_FIELD_WIDTH )
- {
+ if (date_and_timelen >= TIME_STAMP_FIELD_WIDTH)
+ {
time_t timeval;
struct tm *now;
- time ( &timeval );
- now = localtime ( &timeval ); /* Get current local time. */
+ time (&timeval);
+ now = localtime (&timeval); /* Get current local time. */
- if ( format == 'Y' )
- {
- sprintf ( date_and_time,
+ if (format == 'Y')
+ {
+ sprintf (date_and_time,
"%3s %3s %2d %04d %02d:%02d:%02d.%06d",
day_of_week_name[now->tm_wday],
month_name[now->tm_mon],
- ( int ) now->tm_mday,
- ( int ) now->tm_year + 1900,
- ( int ) now->tm_hour,
- ( int ) now->tm_min, ( int ) now->tm_sec, ( int ) 0 );
- }
+ (int) now->tm_mday,
+ (int) now->tm_year + 1900,
+ (int) now->tm_hour,
+ (int) now->tm_min, (int) now->tm_sec, (int) 0);
+ }
else /* 'T' */
- {
- sprintf ( date_and_time,
+ {
+ sprintf (date_and_time,
"%3s %2d %02d:%02d:%02d.%03d %04d",
month_name[now->tm_mon],
- ( int ) now->tm_mday,
- ( int ) now->tm_hour,
- ( int ) now->tm_min,
- ( int ) now->tm_sec, ( int ) 0,
- ( int ) now->tm_year + 1900 );
- }
+ (int) now->tm_mday,
+ (int) now->tm_hour,
+ (int) now->tm_min,
+ (int) now->tm_sec, (int) 0,
+ (int) now->tm_year + 1900);
+ }
ts = date_and_time;
- }
- return ts;
+ }
+ return ts;
}
int
-main ( int, char ** )
+main (int, char **)
{
- char const *const program = "UnloadLibACE";
-
- int status = 0;
- void *handle = NULL;
- char *ace_root = NULL;
- char tbuf[BUFSIZ];
- char ybuf[BUFSIZ];
- FILE *logfp = NULL;
-
- if (( logfp = fopen ( "log/UnloadLibACE.log", "w" )) != NULL )
- {
- setvbuf ( logfp, NULL, _IONBF, 0 );
+ char const *const program = "UnloadLibACE";
+
+ int status = 0;
+ void *handle = NULL;
+ char *ace_root = NULL;
+ char tbuf[BUFSIZ];
+ char ybuf[BUFSIZ];
+ FILE *logfp = NULL;
+
+ if ((logfp = fopen ("log/UnloadLibACE.log", "w")) != NULL)
+ {
+ setvbuf (logfp, NULL, _IONBF, 0);
// reassign stdout/stderr to log file
- int fdno = fileno ( logfp );
+ int fdno = fileno (logfp);
- dup2 ( fdno, fileno ( stdout ));
- dup2 ( fdno, fileno ( stderr ));
- setvbuf ( stdout, NULL, _IONBF, 0 );
- setvbuf ( stderr, NULL, _IONBF, 0 );
- fflush ( stdout );
- fflush ( stderr );
+ dup2 (fdno, fileno (stdout));
+ dup2 (fdno, fileno (stderr));
+ setvbuf (stdout, NULL, _IONBF, 0);
+ setvbuf (stderr, NULL, _IONBF, 0);
+ fflush (stdout);
+ fflush (stderr);
- printf ( "%s@LM_DEBUG@ Starting %s test at %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ),
- program, time_stamp ( ybuf, BUFSIZ, 'Y' ));
+ printf ("%s@LM_DEBUG@ Starting %s test at %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'),
+ program, time_stamp (ybuf, BUFSIZ, 'Y'));
- if (( ace_root = getenv ( "ACE_ROOT" )) != NULL )
- {
- char buf[BUFSIZ];
+ if ((ace_root = getenv ("ACE_ROOT")) != NULL)
+ {
+ char buf[BUFSIZ];
- strcpy ( buf, ace_root );
+ strcpy (buf, ace_root);
#if defined (__hpux) && !(defined (__ia64) && (__ia64 == 1))
- strcat ( buf, "/lib/libACE.sl" );
+ strcat (buf, "/lib/libACE.sl");
#else
- strcat ( buf, "/lib/libACE.so" );
+ strcat (buf, "/lib/libACE.so");
#endif /* (__hpux) */
- handle = dlopen ( buf, RTLD_LAZY );
- if ( handle == NULL )
- {
- // is it because of "No such file or directory" ?
- if ( errno != ENOENT )
+ handle = dlopen (buf, RTLD_LAZY);
+ if (handle == NULL)
{
- fprintf ( stderr,
- "%s@LM_ERROR@ dlopen() returned NULL\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ));
- fprintf ( stderr,
- "%s@LM_ERROR@ dlerror() says: %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ), dlerror ());
- status = 1;
+ // is it because of "No such file or directory" ?
+ if (errno != ENOENT)
+ {
+ fprintf (stderr,
+ "%s@LM_ERROR@ dlopen() returned NULL\n",
+ time_stamp (tbuf, BUFSIZ, 'T'));
+ fprintf (stderr,
+ "%s@LM_ERROR@ dlerror() says: %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'), dlerror ());
+ status = 1;
+ }
+ else
+ {
+ printf ("%s@LM_DEBUG@ dlopen() did not find %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'), buf);
+ status = 0;
+ }
}
- else
+ else if (dlclose (handle) != 0)
{
- printf ( "%s@LM_DEBUG@ dlopen() did not find %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ), buf);
- status = 0;
+ fprintf (stderr,
+ "%s@LM_ERROR@ dlclose() failed : %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'), strerror (errno));
+ status = 1;
}
- }
- else if ( dlclose ( handle ) != 0 )
- {
- fprintf ( stderr,
- "%s@LM_ERROR@ dlclose() failed : %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ), strerror ( errno ));
- status = 1;
- }
- }
+ }
else
- {
- fprintf ( stderr,
+ {
+ fprintf (stderr,
"%s@LM_ERROR@ ACE_ROOT environment variable not set\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ));
- status = 1;
- }
-
- fflush ( stdout );
- fflush ( stderr );
- fflush ( logfp );
-
- fclose ( logfp );
- }
- else
- {
+ time_stamp (tbuf, BUFSIZ, 'T'));
+ status = 1;
+ }
+
+ fflush (stdout);
+ fflush (stderr);
+ fflush (logfp);
+
+ fclose (logfp);
+ }
+ else
+ {
// Couldn't go into the log file !!!
- printf ( "%s@LM_DEBUG@ Starting %s test at %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ),
- program, time_stamp ( ybuf, BUFSIZ, 'Y' ));
+ printf ("%s@LM_DEBUG@ Starting %s test at %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'),
+ program, time_stamp (ybuf, BUFSIZ, 'Y'));
- fprintf ( stderr,
- "%s@LM_ERROR@ Could not open log/UnloadLibACE.log : %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ), strerror ( errno ));
+ fprintf (stderr,
+ "%s@LM_ERROR@ Could not open log/UnloadLibACE.log : %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'), strerror (errno));
status = 1;
- }
+ }
- printf ( "%s@LM_DEBUG@ Ending %s test at %s\n",
- time_stamp ( tbuf, BUFSIZ, 'T' ),
- program, time_stamp ( ybuf, BUFSIZ, 'Y' ));
+ printf ("%s@LM_DEBUG@ Ending %s test at %s\n",
+ time_stamp (tbuf, BUFSIZ, 'T'),
+ program, time_stamp (ybuf, BUFSIZ, 'Y'));
- fflush ( stderr );
- fflush ( stdout );
- fclose ( stdout );
- fclose ( stderr );
+ fflush (stderr);
+ fflush (stdout);
+ fclose (stdout);
+ fclose (stderr);
- exit ( status );
- return 0;
+ exit (status);
+ return 0;
}
#else
# if defined (WIN32) && defined (ACE_USES_WCHAR)
@@ -234,26 +234,26 @@ main ( int, char ** )
# endif /* ACE_HAS_WINCE || __BORLANDC__ */
int
-wmain ( int, wchar_t ** )
+wmain (int, wchar_t **)
#else
int
-main ( int, char ** )
+main (int, char **)
#endif /* (WIN32) && (ACE_USES_WCHAR) */
{
- char const *const program = "UnloadLibACE";
+ char const *const program = "UnloadLibACE";
- FILE *logfp = NULL;
+ FILE *logfp = NULL;
- if (( logfp = fopen ( "log/UnloadLibACE.log", "w" )) != NULL )
- {
- fprintf ( logfp, "@LM_DEBUG@ Starting %s test\n", program);
- fprintf ( logfp, "@LM_DEBUG@ %s test not implemented for this platform\n",
- program);
- fprintf ( logfp, "@LM_DEBUG@ Ending %s test\n", program);
+ if ((logfp = fopen ("log/UnloadLibACE.log", "w")) != NULL)
+ {
+ fprintf (logfp, "@LM_DEBUG@ Starting %s test\n", program);
+ fprintf (logfp, "@LM_DEBUG@ %s test not implemented for this platform\n",
+ program);
+ fprintf (logfp, "@LM_DEBUG@ Ending %s test\n", program);
- fflush ( logfp );
- fclose ( logfp );
- }
- return 0;
+ fflush (logfp);
+ fclose (logfp);
+ }
+ return 0;
}
#endif /* UNLOAD_LIBACE_TEST */