bug-groff
[Top][All Lists]
Advanced

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

groff: conflict with prototype arg name in getopt.h


From: Bruce Lilly
Subject: groff: conflict with prototype arg name in getopt.h
Date: Fri, 20 Apr 2001 00:04:28 -0400

                           Groff Bug Report

Please read the PROBLEMS file before sending in a bug report.

Please fill in all fields, even if you think they are not relevant.

Please delete the text in brackets before sending it in.

Please report separate bugs separately.

Send the completed form to address@hidden

GROFF VERSION:
1.17

MACHINE:
Sony PCV-J100

OS:
Microsoft Windows 2000 SP1 with UWIN 2.9
(see http://www.research.att.com/sw/tools/uwin/)

COMPILER:
Microsoft VC++ 6.0 SP5 with UWIN front end

INPUT FILES:
none required

COMMAND LINE:
./configure && make

DESCRIPTION OF INCORRECT BEHAVIOUR:
argument name in getopt_long declaration in src/include/getopt.h
conflicts with __argc macro in stdlib.h.  Argument names in prototyped
declarations are superfluous; the type suffices.

make output:

CC -I. -I/y/groff/groff-current/src/utils/lkbib 
-I/y/groff/groff-current/src/include -I/y/groff/groff-current/src/include 
-DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 
-DHAVE_SYS_DIR_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_MATH_H=1 
-DRET_TYPE_SRAND_IS_VOID=1 -DHAVE_SYS_NERR=1 -DHAVE_SYS_ERRLIST=1 
-DHAVE_CC_LIMITS_H=1 -DRETSIGTYPE=void -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 
-DHAVE_FMOD=1 -DHAVE_STRTOL=1 -DHAVE_GETCWD=1 -DHAVE_STRERROR=1 -DHAVE_PUTENV=1 
-DHAVE_RENAME=1 -DHAVE_MKSTEMP=1 -DHAVE_STRCASECMP=1 -DHAVE_STRNCASECMP=1 
-DHAVE_STRDUP=1  -g  -c lkbib.cc
/y/groff/groff-current/src/include/search.h(70) : warning C4099: 'search_item' 
: type name first seen using 'struct' now seen using 'class'
        /y/groff/groff-current/src/include/search.h(21) : see declaration of 
'search_item'
/y/groff/groff-current/src/include/search.h(83) : warning C4099: 
'search_item_iterator' : type name first seen using 'struct' now seen using 
'class'
        /y/groff/groff-current/src/include/search.h(22) : see declaration of 
'search_item_iterator'
lkbib.cc(54) : error C2664: 'getopt_long' : cannot convert parameter 1 from 
'int' to 'int *(__cdecl *)(void)'
        Conversion from integral type to pointer type requires 
reinterpret_cast, C-style cast or function-style cast
lkbib.cc(55) : fatal error C1903: unable to recover from previous error(s); 
stopping compilation
make[2]: *** [lkbib.o] Error 1
make[2]: Leaving directory `/Y/groff/groff-current/src/utils/lkbib'
make[1]: Entering directory `/Y/groff/groff-current'
make[1]: *** [src/utils/lkbib] Error 2
make[1]: Leaving directory `/Y/groff/groff-current'
make: *** [all] Error 2

SUGGESTED FIX [optional]:
*** src/include/getopt.h.p1     Thu Apr 19 23:30:36 2001
--- src/include/getopt.h        Thu Apr 19 23:32:27 2001
***************
*** 137,153 ****
  # endif /* __GNU_LIBRARY__ */
  
  # ifndef __need_getopt
! extern int getopt_long (int __argc, char *const *__argv, const char 
*__shortopts,
!                       const struct option *__longopts, int *__longind);
! extern int getopt_long_only (int __argc, char *const *__argv,
!                            const char *__shortopts,
!                            const struct option *__longopts, int *__longind);
  
  /* Internal only.  Users should not call this directly.  */
! extern int _getopt_internal (int __argc, char *const *__argv,
!                            const char *__shortopts,
!                            const struct option *__longopts, int *__longind,
!                            int __long_only);
  # endif
  #else /* not __STDC__ */
  extern int getopt ();
--- 137,150 ----
  # endif /* __GNU_LIBRARY__ */
  
  # ifndef __need_getopt
! extern int getopt_long (int, char *const *, const char *,
!                       const struct option *, int *);
! extern int getopt_long_only (int, char *const *, const char *,
!                            const struct option *, int *);
  
  /* Internal only.  Users should not call this directly.  */
! extern int _getopt_internal (int, char *const *, const char *,
!                            const struct option *, int *, int);
  # endif
  #else /* not __STDC__ */
  extern int getopt ();



reply via email to

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