Browse Source

add alloca test

master
Felix von Leitner 18 years ago
parent
commit
80759cdaad
  1. 6
      GNUmakefile
  2. 8
      Makefile
  3. 3
      havealloca.h
  4. 6
      tryalloca.c

6
GNUmakefile

@ -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

8
Makefile

@ -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

3
havealloca.h

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

6
tryalloca.c

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