forked from KolibriOS/kolibrios
fix fopen handle leak, static build
git-svn-id: svn://kolibrios.org@6744 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
09d8656eef
commit
2af7a3394b
@ -553,6 +553,7 @@ ifeq ($(findstring static,$(MAKECMDGOALS)),static)
|
||||
|
||||
LIB_SRCS:= $(STATIC_SRCS)
|
||||
LIB_OBJS:= $(STATIC_OBJS)
|
||||
CFLAGS += -DSTATIC_LIBC
|
||||
|
||||
else
|
||||
|
||||
@ -667,6 +668,9 @@ time/wcsftime.o: time/strftime.c
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
%.o : %.S Makefile
|
||||
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f */*.o
|
||||
|
@ -115,6 +115,7 @@ int open (const char * filename, int flags, ...)
|
||||
if(hid < 0)
|
||||
{
|
||||
errno = EMFILE;
|
||||
__io_free(hid);
|
||||
return (-1);
|
||||
};
|
||||
|
||||
@ -136,6 +137,7 @@ int open (const char * filename, int flags, ...)
|
||||
if( !err )
|
||||
{
|
||||
errno = EEXIST;
|
||||
__io_free(hid);
|
||||
return (-1);
|
||||
};
|
||||
}
|
||||
@ -147,6 +149,7 @@ int open (const char * filename, int flags, ...)
|
||||
if( err )
|
||||
{
|
||||
errno = EACCES;
|
||||
__io_free(hid);
|
||||
return -1;
|
||||
};
|
||||
};
|
||||
|
@ -9,7 +9,7 @@ SECTIONS
|
||||
LONG(0x554e454D);
|
||||
LONG(0x32305445);
|
||||
LONG(1);
|
||||
LONG(__start);
|
||||
LONG(__crt_start);
|
||||
LONG(___iend);
|
||||
LONG(___memsize);
|
||||
LONG(___stacktop);
|
||||
|
Loading…
Reference in New Issue
Block a user