Define __GNU_LIBRARY__ by including stdio.h before getopt.h.

Estimated hours taken: 0.2
Branches: main

runtime/GETOPT/getopt1.c:
    Define __GNU_LIBRARY__ by including stdio.h before getopt.h.

util/Mmakefile:
    Remove harding coding of __GNU_LIBRARY__ define as we should only
    define this when we are using the GNU version of libc.
This commit is contained in:
Peter Ross
2001-06-05 13:25:55 +00:00
parent 02e27e3be7
commit 9364b31dcd
2 changed files with 3 additions and 5 deletions

View File

@@ -21,6 +21,8 @@
#include <config.h>
#endif
#include <stdio.h>
#include "getopt.h"
#if !defined (__STDC__) || !__STDC__
@@ -31,8 +33,6 @@
#endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling

View File

@@ -24,8 +24,6 @@ PROGS=mkinit mdemangle info_to_mdb
PROGFILENAMES=$(PROGS:%=%$(EXT_FOR_EXE))
SRC=$(PROGS:%=%.c)
# GETOPT_FLAGS suppresses warnings about the prototype of getopt
GETOPT_FLAGS=-D__GNU_LIBRARY__
GETOPT_SRC=$(RUNTIME_DIR)/GETOPT/getopt.c $(RUNTIME_DIR)/GETOPT/getopt1.c
# mkinit.c needs `struct stat'
@@ -36,7 +34,7 @@ MGNUCFLAGS-mkinit = --no-ansi
all: $(PROGS)
.c:
$(MGNUC) $(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(GETOPT_FLAGS) -o $@ $< $(GETOPT_SRC)
$(MGNUC) $(GRADEFLAGS) $(ALL_MGNUCFLAGS) -o $@ $< $(GETOPT_SRC)
tags:
ctags $(SRC)