add alloca test

master
leitner 21 years ago
parent 7b413a4671
commit 8e104ff975

@ -225,6 +225,12 @@ havesigio.h: trysigio.c
if $(DIET) $(CC) $(CFLAGS) -c trysigio.c >/dev/null 2>&1; then echo "#define HAVE_SIGIO"; fi > $@
-rm -f trysigio.o
havealloca.h: tryalloca.c
-rm -f $@
echo "#include <stdlib.h>" > $@
if $(DIET) $(CC) $(CFLAGS) -c tryalloca.c >/dev/null 2>&1; then echo "#include <alloca.h>"; fi >> $@
-rm -f tryalloca.o
iopause.h: iopause.h1 iopause.h2 trypoll.c
-rm -f $@
if $(DIET) $(CC) $(CFLAGS) -o t trypoll.c >/dev/null 2>&1; then cp iopause.h2 iopause.h; else cp iopause.h1 iopause.h; fi

@ -585,7 +585,7 @@ uninstall:
rm -f $(patsubst %.3,$(MAN3DIR)/%.3,$(notdir $(wildcard */*.3)))
rm -f $(LIBDIR)/libowfat.a
VERSION=libowfat-0.19
VERSION=libowfat-0.20
CURNAME=libowfat-0.19
tar: clean rename
@ -654,6 +654,12 @@ havesigio.h: trysigio.c
if $(DIET) $(CC) $(CFLAGS) -c trysigio.c >/dev/null 2>&1; then echo "#define HAVE_SIGIO"; fi > $@
-rm -f trysigio.o
havealloca.h: tryalloca.c
-rm -f $@
echo "#include <stdlib.h>" > $@
if $(DIET) $(CC) $(CFLAGS) -c tryalloca.c >/dev/null 2>&1; then echo "#include <alloca.h>"; fi >> $@
-rm -f tryalloca.o
iopause.h: iopause.h1 iopause.h2 trypoll.c
-rm -f $@
if $(DIET) $(CC) $(CFLAGS) -o t trypoll.c >/dev/null 2>&1; then cp iopause.h2 iopause.h; else cp iopause.h1 iopause.h; fi

@ -1,3 +1,2 @@
#if defined(__linux__) || defined(_SGI_SOURCE) || defined(__hpux__) || defined(__sun__)
#include <stdlib.h>
#include <alloca.h>
#endif

@ -0,0 +1,6 @@
#include <stdlib.h>
#include <alloca.h>
main() {
char* c=alloca(23);
}
Loading…
Cancel
Save