X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetopt.in.h;h=7377f3cfbd8fd5443ad9e854fd30129acbe01d52;hb=298d8b4a29e66da0b046b64b822f97d1c8fef74b;hp=15c213f79b3b90a651d434a016bc1995b9ea7714;hpb=35cea22b36cbb5906e0387516feb28c3d1ef3ec3;p=gnulib.git diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 15c213f79..7377f3cfb 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -22,9 +22,13 @@ @PRAGMA_SYSTEM_HEADER@ #endif -/* The include_next requires a split double-inclusion guard. */ +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ +# define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ +# undef _GL_SYSTEM_GETOPT #endif #ifndef _GL_GETOPT_H @@ -68,6 +72,7 @@ # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) # define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) #endif /* Standalone applications get correct prototypes for getopt_long and