groff
[Top][All Lists]
Advanced

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

Re: [Groff] Groff for OS/2


From: John Poltorak
Subject: Re: [Groff] Groff for OS/2
Date: Wed, 7 Nov 2001 21:12:22 +0000

On Wed, Nov 07, 2001 at 08:39:48PM +0000, Colin Watson wrote:
> On Wed, Nov 07, 2001 at 08:18:15PM +0000, John Poltorak wrote:
> > In file included from \\eval\\groff-1.17.2\\src\\include\\lib.h:34,
> >                  from tmpfile.cc:28:
> > \\eval\\groff-1.17.2\\src\\include\\groff-getopt.h:52: declaration of C 
> > function `int getopt(int, ch
> > ar *const *, const char *)' conflicts with
> > c:\\emx\\include\\unistd.h:154: previous declaration `int getopt(int, char 
> > **, const char *)' here
> [...]
> > Looks like I have an incompatible getopt...
> 
> Yes, seems so, although not by very much.

Here's a comment someone made about it:-

----------------------------------------------------------------------
besides being redundant, the one in groff is wrong, since it conflicts 
with the
declaration of main:
        int main(int, char **);

(I see that getopt has been prototyped in unistd.h since 1997; a configure
script would have to check for it in stdlib.h as well, to handle old systems).
----------------------------------------------------------------------

Personally, I have no idea - I'm no 'C' guru, but that was from a well 
respected developer.
 
> Perhaps removing the extra const in src/include/groff-getopt.h would do
> the job? It should still link OK.


Just to be clear, do you mean changing this:-

extern int getopt(int,                  // __argc
                  char *const *,        // __argv
                  const char *);        // __shortopts

to this:-

extern int getopt(int,                  // __argc
                  char *const *);       // __argv

 
> -- 
> Colin Watson                                  address@hidden


-- 
John



reply via email to

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