* lib/sizeof_jmpbuf.c: new analysis program.

* lib/Makefile: add a rule to build sizeof_jmpbuf.


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4115 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-12-23 18:43:17 +00:00
parent 4df58b564d
commit b09c3f044f
3 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Wed Dec 24 03:43:14 2008 Minero Aoki <aamine@loveruby.net>
* lib/sizeof_jmpbuf.c: new analysis program.
* lib/Makefile: add a rule to build sizeof_jmpbuf.
Wed Dec 24 02:54:06 2008 Minero Aoki <aamine@loveruby.net>
* import/setjmp.hb: new file to support setjmp.

View File

@ -3,6 +3,9 @@ CBFLAGS = -O -fPIC
TARGET = libcbc.a
OBJS = stdarg.o alloca.o
CC = gcc
CFLAGS = -Wall
.SUFFIXES:
.SUFFIXES: .cb .s .o
@ -16,5 +19,8 @@ $(TARGET): $(OBJS)
stdarg.o: stdarg.cb
sizeof_jmpbuf: sizeof_jmpbuf.c
$(CC) $(CFLAGS) -o $@ $<
clean:
rm -f $(TARGET) *.o stdarg.s

10
lib/sizeof_jmpbuf.c Normal file
View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <setjmp.h>
int
main(int argc, char **argv)
{
printf("sizeof(jmp_buf)=%lu\n", (unsigned long)sizeof(jmp_buf));
printf("sizeof(sigjmp_buf)=%lu\n", (unsigned long)sizeof(sigjmp_buf));
return 0;
}