Commit 92c4d156679855ee8c16448bc9e483762eca794d

Fix build issues with GCC 4
  
364364 }
365365
366366 /* Does `pres_impl' contain a directory component? If so, get it. */
367 pres_impl_slash = (pres_impl ? strrchr(pres_impl, '/') : 0);
367 pres_impl_slash = (char *)(pres_impl ? strrchr(pres_impl, '/') : 0);
368368 if (pres_impl_slash) {
369369 if (pres_impl_slash == pres_impl)
370370 /* `pres_impl' is in `/'. */
  
3939#endif
4040
4141#include <unistd.h>
42#include <time.h>
4243#endif /* !defined(__CYGWIN__) && !defined(__CYGWIN32__) */
4344
4445#ifdef NEED_GETHOSTNAME_DECL
  
3333
3434pg_fluke::pg_fluke()
3535{
36#define NAME_FORMAT(type) names.formats[name_strings::##type##_fmt]
37#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
38#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
36#define NAME_FORMAT(type) names.formats[name_strings::type##_fmt]
37#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
38#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
3939
4040 /* Should define them all... */
4141 NAME_FORMAT(server_func) = "%I%_server%_%s";
  
2020 */
2121
2222#include <stdio.h>
23/*
24 #include <string.h>
25 We declare these individually rather than use the header because
26 the HPUX and SunOS4 systems we tried compiling on have funky g++
27 installations that make strrchr get munged _strrchr__FPci instead
28 of _strrchr
29 */
30extern "C" char *strrchr(const char *s, int c);
31extern "C" int strcmp(const char *s, const char *s2);
23#include <string.h>
3224
3325#include "private.hh"
3426
  
9898#define DEFINE_CALC_NAME_FMT_OPTION(type, explain) \
9999{ \
100100 #type "_fmt", \
101 name_strings::##type##_fmt, \
101 name_strings::type##_fmt, \
102102 "Specify the format of " explain \
103103}
104104
105105#define DEFINE_CALC_NAME_LIT_OPTION(type, explain) \
106106{ \
107107 #type "_lit", \
108 name_strings::##type##_lit, \
108 name_strings::type##_lit, \
109109 "Specify the string for " explain \
110110}
111111
333333#define DEFINE_CALC_NAME_FUNCTION(type) \
334334 char *pg_state::calc_##type##_name(const char *basic_name) \
335335 { \
336 return calc_name(names.formats[name_strings::##type##_fmt], \
336 return calc_name(names.formats[name_strings::type##_fmt], \
337337 basic_name); \
338338 }
339339
346346 \
347347 calc_scoped_name(&scname, \
348348 parent_ref, \
349 names.formats[name_strings::##type##_scoped_fmt]); \
349 names.formats[name_strings::type##_scoped_fmt]); \
350350 cast_add_scope_name(&scname, \
351351 base_name, \
352352 null_template_arg_array); \
715715 ++calc_name_data.count; \
716716 } while (0)
717717
718#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
719#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
718#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
719#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
720720
721721/*
722722 * An internal auxiliary. `calc_name_module' locates the names of the AOI
  
2020 */
2121
2222#include <stdio.h>
23/*
24 #include <string.h>
25 We declare these individually rather than use the header because
26 the HPUX and SunOS4 systems we tried compiling on have funky g++
27 installations that make strrchr get munged _strrchr__FPci instead
28 of _strrchr
29 */
30extern "C" char *strrchr(const char *s, int c);
31extern "C" int strcmp(const char *s, const char *s2);
23#include <string.h>
3224
3325#include <mom/compiler.h>
3426#include <mom/libaoi.h>
  
5353 * Initialize the strings that are used to construct names. Most
5454 * presentation generators will override at least some of these values.
5555 */
56#define NAME_FORMAT(type) names.formats[name_strings::##type##_fmt]
57#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
58#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
56#define NAME_FORMAT(type) names.formats[name_strings::type##_fmt]
57#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
58#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
5959
6060 /* The `null' format should never ever be used. */
6161 NAME_FORMAT(null) = "";
  
2525
2626pg_corba::pg_corba()
2727{
28#define NAME_FORMAT(type) names.formats[name_strings::##type##_fmt]
29#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
30#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
28#define NAME_FORMAT(type) names.formats[name_strings::type##_fmt]
29#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
30#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
3131
3232 /*
3333 * CORBA does not specify the names of server skeletons nor the names
  
2727
2828pg_corbaxx::pg_corbaxx()
2929{
30#define NAME_FORMAT(type) names.formats[name_strings::##type##_fmt]
31#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
32#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
30#define NAME_FORMAT(type) names.formats[name_strings::type##_fmt]
31#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
32#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
3333
3434 /*
3535 * CORBA does not specify the names of server skeletons nor the names
  
8484 * These functions are auxiliaries for the override methods above.
8585 */
8686
87#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
87#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
8888
8989char *pg_sun::calc_operation_and_version_id(const char *basic_name)
9090{
  
5050
5151pg_sun::pg_sun()
5252{
53#define NAME_FORMAT(type) names.formats[name_strings::##type##_fmt]
54#define NAME_LITERAL_STR(type) names.literals[name_strings::##type##_lit].str
55#define NAME_LITERAL_LEN(type) names.literals[name_strings::##type##_lit].len
53#define NAME_FORMAT(type) names.formats[name_strings::type##_fmt]
54#define NAME_LITERAL_STR(type) names.literals[name_strings::type##_lit].str
55#define NAME_LITERAL_LEN(type) names.literals[name_strings::type##_lit].len
5656
5757 /*
5858 * Override some of the format strings for Sun RPC-style presentations.
  
186186
187187#define corba_except(name) \
188188typedef flick_system_exception name; \
189name *##name##__alloc();
189name *name##__alloc();
190190
191191/*
192192 * Here are the standard CORBA system exception.
  
254254 * Define the allocators for the standard CORBA exceptions.
255255 */
256256#define sys_except__alloc(name) \
257name *##name##__alloc() { return (name *) flick_system_exception_alloc(); }
257name *name##__alloc() { return (name *) flick_system_exception_alloc(); }
258258
259259sys_except__alloc(CORBA_UNKNOWN)
260260sys_except__alloc(CORBA_BAD_PARAM)
  
254254 * Define the allocators for the standard CORBA exceptions.
255255 */
256256#define sys_except__alloc(name) \
257name *##name##__alloc() { return (name *) flick_system_exception_alloc(); }
257name *name##__alloc() { return (name *) flick_system_exception_alloc(); }
258258
259259sys_except__alloc(CORBA_UNKNOWN)
260260sys_except__alloc(CORBA_BAD_PARAM)
  
254254 * Define the allocators for the standard CORBA exceptions.
255255 */
256256#define sys_except__alloc(name) \
257name *##name##__alloc() { return (name *) flick_system_exception_alloc(); }
257name *name##__alloc() { return (name *) flick_system_exception_alloc(); }
258258
259259sys_except__alloc(CORBA_UNKNOWN)
260260sys_except__alloc(CORBA_BAD_PARAM)
  
254254 * Define the allocators for the standard CORBA exceptions.
255255 */
256256#define sys_except__alloc(name) \
257name *##name##__alloc() { return (name *) flick_system_exception_alloc(); }
257name *name##__alloc() { return (name *) flick_system_exception_alloc(); }
258258
259259sys_except__alloc(CORBA_UNKNOWN)
260260sys_except__alloc(CORBA_BAD_PARAM)