summaryrefslogtreecommitdiff
path: root/com32/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-27 12:51:29 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-27 12:51:29 -0800
commit3d0cb11079c5dc6115a9282b51b1f42151c4926e (patch)
treeef1d65508a5afd349f54fd0bba6f8fec27198338 /com32/lib
parentc7897f4098ce5977fe5dffa0ee15bc842339567f (diff)
downloadsyslinux-3d0cb11079c5dc6115a9282b51b1f42151c4926e.tar.gz
Un-inline fclose()
gcc complains that fclose() is too big to be inlined with -Os, so humour it and move fclose() out of line.
Diffstat (limited to 'com32/lib')
-rw-r--r--com32/lib/Makefile2
-rw-r--r--com32/lib/fclose.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 810c2bc5..3dec5c3d 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -4,7 +4,7 @@ include MCONFIG
LIBOBJS = \
abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \
ctypes.o errno.o fgetc.o fgets.o fopen.o fprintf.o fputc.o \
- putchar.o setjmp.o \
+ fclose.o putchar.o setjmp.o \
fputs.o fread2.o fread.o free.o fwrite2.o fwrite.o getopt.o \
lrand48.o malloc.o stack.o memccpy.o memchr.o memcmp.o \
memcpy.o mempcpy.o memmem.o memmove.o memset.o memswap.o \
diff --git a/com32/lib/fclose.c b/com32/lib/fclose.c
new file mode 100644
index 00000000..41f6a62c
--- /dev/null
+++ b/com32/lib/fclose.c
@@ -0,0 +1,11 @@
+/*
+ * fclose.c
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int fclose(FILE *__f)
+{
+ return close(fileno(__f));
+}