bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo-4.11 on HP-UX v11.00 - "#define __(s) getdocumenttext(s)"


From: Gary E. Barnes
Subject: texinfo-4.11 on HP-UX v11.00 - "#define __(s) getdocumenttext(s)"
Date: Thu, 8 Nov 2007 14:32:45 -0800

The macro __(s) defined in makeinfo/makeinfo.h conflicts with the various
operating system defined macros __(arg) defined in the HP include files.

For example, from /usr/include/sys/stdsyms.h

    /* macros for simplifying prototype declarations */
    #undef __
    #if defined(_PROTOTYPES) 
    #define __(arg) arg
    #else
    #define __(arg) ()
    #endif

This prevents makeinfo/cmds.c from compiling for example.

gmake[3]: Entering directory `/accts/hydroc.a/gnu/texinfo-4.11/makeinfo'
source='cmds.c' object='cmds.o' libtool=no \
DEPDIR=.deps depmode=gcc /usr/bin/posix/sh ../build-aux/depcomp \
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../gnulib/lib -I../gnulib/lib 
-DLOCALEDIR=\"/accts/hydroc.a/gnu/share/locale\"   -g -O2 -c cmds.c
In file included from cmds.c:30:
makeinfo.h:324: warning: `__' redefined
/usr/include/sys/stdsyms.h:305: warning: this is the location of the previous 
definition
In file included from ../gnulib/lib/string.h:23,
                 from ../system.h:41,
                 from cmds.c:20:
/usr/include/string.h:51: warning: conflicting types for built-in function 
`memcmp'
/usr/include/string.h:116: warning: conflicting types for built-in function 
`memcpy'
/usr/include/string.h:125: warning: conflicting types for built-in function 
`memset'
In file included from cmds.c:39:
/usr/include/time.h:50: parse error before `getdocumenttext'
gmake[3]: *** [cmds.o] Error 1

There is no error in /usr/include/time.h.  Rather there is a use of the
__(arg) macro.  This code fragment from time.h,

+------------------------------------------------------------------------------
| #if !defined(__STDC_32_MODE__)
| extern  hrtime_t        gethrtime();
| #endif
|            extern int get_expiration_time __((struct timespec *,struct 
timespec *));
| #ifdef __cplusplus
|    }
| #endif /* __cplusplus */
+------------------------------------------------------------------------------
expands into the text that gcc is complaining about,
+------------------------------------------------------------------------------
| extern  hrtime_t        gethrtime();
| 
|            extern int get_expiration_time getdocumenttext( (struct timespec 
*,struct timespec *) ) ;
+------------------------------------------------------------------------------

    Gary




reply via email to

[Prev in Thread] Current Thread [Next in Thread]