bug-groff
[Top][All Lists]
Advanced

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

Re: Minor patch: Missing mkstemp declaration in groff 1.17.2 (now missin


From: Phil Lobbes
Subject: Re: Minor patch: Missing mkstemp declaration in groff 1.17.2 (now missing declaration for va_list and issues make vs. gmake)
Date: Wed, 20 Feb 2002 13:06:42 -0800

Hi again, 

I grabbed the latest and found at least one more minor changes is
still needed for Solaris 2.5.1 (not sure if this change is portable
for other platforms that may need something like this):

====================================================================
1) Modify lib.h to also "#include <stdarg.h>" after line 56:
        #ifndef HAVE_SNPRINTF
        #include <stdarg.h>

Reason: Based on comments found in Solaris 2.5.1 headers, Sun
purposely doesn't declare va_list via <stdio.h> so I added the
"#include <stdarg.h>" which does what we need.  The compilation error
was:

[groff/groff-current] ultra(1049)> make
g++ -I. -I/export/site/src/groff/groff-current/src/libs/libgroff
    -I/export/site/src/groff/groff-current/src/include
    -I/export/site/src/groff/groff-current/src/include -DHAVE_CONFIG_H
    -R/site/gcc/default/lib  -c font.cc
In file included from font.cc:22:
/export/site/src/groff/groff-current/src/include/lib.h:55: type
specifier omitted for parameter
*** Error code 1
make: Fatal error: Command failed for target `font.o'
...

====================================================================
2) Using Sun's make breaks on pic.y but gmake works...

[groff/groff-current] ultra(1049)> make
...
Making tbl.n from tbl.man
yacc  pic.y
"pic.y", line 130: warning: redeclaration of precedence of UP.
"pic.y", line 131: warning: redeclaration of precedence of DOWN.
"pic.y", line 132: warning: redeclaration of precedence of RIGHT.
"pic.y", line 133: warning: redeclaration of precedence of LEFT.
gcc -I. -I/export/site/src/groff/groff-current/src/preproc/pic
-I/export/site/src/groff/groff-current/src/include
-I/export/site/src/groff/groff-current/src/include -DHAVE_CONFIG_H -g
-O2  -c -o pic.o y.tab.c
In file included from pic.h:22,
                 from pic.y:21:
/export/site/src/groff/groff-current/src/include/lib.h:25: parse error
before string constant
/export/site/src/groff/groff-current/src/include/lib.h:32: parse error
before `}'
In file included from pic.h:22,


** NOTE (thoughts on the problem but no fix): make ends up using gcc
to compile instead of g++, I suspect this is just an incompatibility
somewhere in the makefile for moving the file to pic.cc, but a simple
workaround for this problem is to use something like:
        make CC=g++ or use gmake

I suspect this might need a makefile tweak to still work with make but
I don't have a patch for that and I have no issue with using gmake :-).

However, later on things again seem to break without gmake so maybe
it's not worth going on any more about problems using Sun's make?

Sincerely,
Phil


> > > #ifndef HAVE_SNPRINTF
> > > extern "C" {
> > >   int snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
> > > }
> > > #endif
> > > #ifndef HAVE_SNPRINTF
> > >   int vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
> > > #endif
> 
> The right place is `lib.h' to which I've added those declarations (in
> the CVS).
> 
> > 3) (no patch for this one) update libgroff to also export vsnprintf
> >    otherwise pre-html.o will have an unresolved symbol:
> 
> Comparing with other functison like strerror(), the fix to lib.h
> should be sufficient.  Please test.
> 
> Thanks for the report!
> 
>     Werner



reply via email to

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