mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- The stdio destructor no longer resets the __iob pointer to NULL. This
avoids trouble with destructor functions which use stdio code. Unsolved problem: the order in which destructors and constructors are called. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14870 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.os4,v 1.37 2005-03-09 10:48:58 obarthel Exp $
|
||||
# $Id: GNUmakefile.os4,v 1.38 2005-03-09 16:56:04 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -113,7 +113,7 @@ WARNINGS = \
|
||||
INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE)
|
||||
OPTIONS = -D__THREAD_SAFE -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames
|
||||
OPTIMIZE = -O -fomit-frame-pointer -funroll-loops
|
||||
#DEBUG = -g
|
||||
DEBUG = -g2
|
||||
|
||||
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_init_exit.c,v 1.24 2005-03-07 11:16:43 obarthel Exp $
|
||||
* $Id: stdio_init_exit.c,v 1.25 2005-03-09 16:56:05 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -58,7 +58,7 @@ __close_all_files(void)
|
||||
|
||||
__stdio_lock();
|
||||
|
||||
if(__iob != NULL && __num_iob > 0)
|
||||
if(__num_iob > 0)
|
||||
{
|
||||
for(i = 0 ; i < __num_iob ; i++)
|
||||
{
|
||||
@ -66,11 +66,10 @@ __close_all_files(void)
|
||||
fclose((FILE *)__iob[i]);
|
||||
}
|
||||
|
||||
__num_iob = 0;
|
||||
__iob = NULL;
|
||||
__num_iob = 0;
|
||||
}
|
||||
|
||||
if(__fd != NULL && __num_fd > 0)
|
||||
if(__num_fd > 0)
|
||||
{
|
||||
for(i = 0 ; i < __num_fd ; i++)
|
||||
{
|
||||
@ -78,8 +77,7 @@ __close_all_files(void)
|
||||
close(i);
|
||||
}
|
||||
|
||||
__num_fd = 0;
|
||||
__fd = NULL;
|
||||
__num_fd = 0;
|
||||
}
|
||||
|
||||
__stdio_unlock();
|
||||
|
||||
Reference in New Issue
Block a user