Browse Source

add alloca test

master
Felix von Leitner 17 years ago
parent
commit
80759cdaad
4 changed files with 20 additions and 3 deletions
  1. +6
    -0
      GNUmakefile
  2. +7
    -1
      Makefile
  3. +1
    -2
      havealloca.h
  4. +6
    -0
      tryalloca.c

+ 6
- 0
GNUmakefile View File

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


+ 7
- 1
Makefile View File

@ -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
- 2
havealloca.h View File

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

+ 6
- 0
tryalloca.c View File

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

Loading…
Cancel
Save