mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Added more consistency checking to the slab allocator, which is built if DEBUG is defined in "stdlib_slab.c". Memory allocations are no longer guaranteed to be aligned to 64 bit word boundaries. In fact, this has not even worked reliably in the past 10 years. Memory allocation request sizes are now rounded to multiples of 32 bit words (the size of an address pointer) instead to the size of a 64 bit word. Reduced the memory footprint of the memory allocation management data structures by reusing the most significant bit of the memory allocation size. This allows many more allocations to fit into the 32 byte chunk slabs, but limits the maximum memory allocation size to a little less than 2 GBytes. Added integer overflow checks to the memory management code. Reduced the memory management overhead further. This cuts an additional 8 bytes per allocation, unless neither the slab allocator nor memory pools are available. With this reduction the slab allocator is able to use 16 byte chunks, which cover memory allocation requests of 1..8 bytes. Fixed a bug caused by returning an allocation back to a slab which passed the wrong pointer.
4728 lines
164 KiB
Plaintext
4728 lines
164 KiB
Plaintext
c.lib 1.211 (23.11.2016)
|
||
|
||
- Added more consistency checking to the slab allocator, which is
|
||
built if DEBUG is defined in "stdlib_slab.c".
|
||
|
||
- Memory allocations are no longer guaranteed to be aligned to
|
||
64 bit word boundaries. In fact, this has not even worked
|
||
reliably in the past 10 years.
|
||
|
||
- Memory allocation request sizes are now rounded to multiples of
|
||
32 bit words (the size of an address pointer) instead to the
|
||
size of a 64 bit word.
|
||
|
||
- Reduced the memory footprint of the memory allocation management
|
||
data structures by reusing the most significant bit of the
|
||
memory allocation size. This allows many more allocations to fit
|
||
into the 32 byte chunk slabs, but limits the maximum memory
|
||
allocation size to a little less than 2 GBytes.
|
||
|
||
- Added integer overflow checks to the memory management code.
|
||
|
||
- Reduced the memory management overhead further. This cuts an
|
||
additional 8 bytes per allocation, unless neither the slab
|
||
allocator nor memory pools are available. With this reduction
|
||
the slab allocator is able to use 16 byte chunks, which cover
|
||
memory allocation requests of 1..8 bytes.
|
||
|
||
- Fixed a bug caused by returning an allocation back to a slab
|
||
which passed the wrong pointer.
|
||
|
||
|
||
c.lib 1.210 (22.11.2016)
|
||
|
||
- Added __get_slab_allocations() function which will report information
|
||
about each memory allocation made by the slab allocator which does
|
||
not come from a slab.
|
||
|
||
- If the first slab in the list of slabs which share the same chunk
|
||
size has no more room, it means that all other slabs following
|
||
it have no room either. This speeds up the test to find a slab with
|
||
free space, which can now abort and directly proceed to allocate
|
||
memory for a new slab.
|
||
|
||
- If an empty slab's decay count hits zero, it is moved to the front
|
||
of the empty slab list to be reclaimed more quickly.
|
||
|
||
- Allocations made from the slab now carry a pointer back to the
|
||
slab which they are a part of. This speeds up deallocation but
|
||
has the downside of making the smallest usable slab chunk size
|
||
64 bytes, which is double what used to be the minimum before.
|
||
|
||
|
||
c.lib 1.209 (21.11.2016)
|
||
|
||
- The maximum slab size is now 2^17 bytes (= 131072). If you request
|
||
a slab size larger than this, you will get slab sizes of 131072
|
||
bytes instead.
|
||
|
||
- Enabling the memory management debugging code no longer produces
|
||
compiler errors.
|
||
|
||
|
||
c.lib 1.208 (19.11.2016)
|
||
|
||
- Updated <stdlib.h> with new functions and data structures for
|
||
use with the slab allocator.
|
||
|
||
- Added __get_slab_usage() function which can be used to query
|
||
the slab allocator memory usage at runtime.
|
||
|
||
|
||
c.lib 1.207 (18.11.2016)
|
||
|
||
- Added a slab allocator which replaces the use of memory pools or the
|
||
plain AllocMem() operations, respectively. In order to activate the
|
||
slab allocator, choose a slab size (e.g. 2048 bytes or 4096 bytes)
|
||
and declare a global variable like this:
|
||
|
||
ULONG __slab_max_size = 2048;
|
||
|
||
Memory allocations smaller than the slab size will be made from
|
||
"slabs", i.e. large chunks of memory of the given size. Larger
|
||
allocations will be managed separately.
|
||
|
||
|
||
m.lib 1.206 (24.4.2015)
|
||
|
||
- The fscanf() family failed to parse and convert %f parameters correctly
|
||
if the respective number did not begin with a digit, but a decimal
|
||
point. Hence ".7" would not be processed, but "0.7" would.
|
||
|
||
c.lib 1.206 (24.4.2015)
|
||
|
||
- Reworked the __putc() and putc() macros to reference the 'c' input
|
||
parameter only once, and to be free of side-effects when tinkering
|
||
with the buffer position.
|
||
|
||
- isatty() had the __fd_lock() call in the wrong place, which could have
|
||
led to cleanup problems later.
|
||
|
||
- The close action in the stdio, socket and termios hook code now
|
||
also zaps the fd pointer itself after cleaning up the file descriptor
|
||
table entry.
|
||
|
||
- Removed the remains of all the stack extension and stack overflow/underflow
|
||
checking code. It never actually worked. The bit that does work is the stack
|
||
usage measurement code, plus the bit that sets up the the custom stack
|
||
according to local setting or by calling a query function.
|
||
|
||
|
||
c.lib 1.205 (21.8.2010)
|
||
|
||
- Added dlclose(), dlerror(), dlopen() and dlsym() functions, which are
|
||
available only under OS4. There is a variant of dlopen() in libunix.a
|
||
which will perform a path name conversion. Note that these functions
|
||
will not work in the thread-safe variant of the library because it
|
||
would be unwise to tinker with the currently running program's binary.
|
||
|
||
- Added support for ELF shared objects and libraries. This is implemented through
|
||
constructor/destructor functions, which means that you can use this
|
||
functionality even in Amiga Exec style shared libraries, with the proper
|
||
library initialization code to invoke the constructor/destructor functions
|
||
for you.
|
||
|
||
- Updated uname() to recognize AmigaOS 4.1.
|
||
|
||
- The translation from Unix to Amiga path names did not properly process
|
||
multiple occurences of "/./" in the path name. Thanks go to Steven Solie
|
||
for finding the issue.
|
||
|
||
- The detection of "/./" and "/../" patterns in Unix path names to be
|
||
translated into Amiga path names did not test if it was overrunning
|
||
the end of the string.
|
||
|
||
- If strcmp(), strncmp() and memcmp() detect a pair of different
|
||
characters, then the function result must be calculated as if the
|
||
characters were of type "unsigned char". This is a requirement
|
||
according to the ISO 'C' (1994) standard. Thanks go to Georg Steger
|
||
for finding the issue.
|
||
|
||
- The definitions for INT_MIN, INT_MAX and UINT_MAX in <limits.h> no
|
||
longer use long integer types, as prompted by Steven Solie.
|
||
|
||
|
||
c.lib 1.204 (11.11.2008)
|
||
|
||
- The memory allocated by malloc() and friends is now of type MEMF_PRIVATE
|
||
under OS4 and beyond. The AmigaOS 2.x/3.x compatible code will still
|
||
use MEMF_ANY in the same situation, though. Other uses of MEMF_ANY have
|
||
been replaced as well where MEMF_PRIVATE would have made better sense.
|
||
|
||
- I/O buffers allocated are now aligned according to the CPU cache line size,
|
||
if the operating system can supply such detailed information.
|
||
|
||
- unsetenv() now returns a status value.
|
||
|
||
- Corrected the function prototype for wcspbrk().
|
||
|
||
- Added function prototypes for mbrtowc_l(), wcscoll_l(), wcscspn() and wcsrchr().
|
||
|
||
|
||
c.lib 1.203 (28.4.2008)
|
||
|
||
- Added 68k stubs to amiga_rexxvars.c for the OS4 build to use. The new code now
|
||
works just about exactly like the amiga.lib RVI code used to do, which means
|
||
that there is no artificial length limit for the number of characters a string
|
||
retrieved may have, and the code is largely reentrant.
|
||
|
||
- To work around a bug in the Roadshow TCP/IP stack (since fixed), the waitselect()
|
||
function now substitutes a 10 microsecond timeout for a zero length timeout.
|
||
|
||
- isatty() no longer crashes if passed a socket rather than a file.
|
||
|
||
- Rewrote the GetRexxVar()/SetRexxVar() functions (mostly) in 'C', using available
|
||
code as a reference. The 68k stubs currently only work for the 68k version of
|
||
the library, and a solution for the OS4 build still needs to be found. The code
|
||
is currently untested, but it should be complete.
|
||
|
||
- The printf() family now ignores argument specifications, as in "%2$d %1$d",
|
||
which are used for localization on some platforms. This is a non-standard
|
||
feature and the way clib2 treats it for now is just intended to avoid
|
||
trouble while performing the conversion.
|
||
|
||
- [tboeckel]: when compiling amiga_rexxvars.c for m68k/OS3 the GetRexxVarFromMsg()
|
||
and SetRexxVarFromMsg() can no longer cause linkage errors if the header files
|
||
predate the SDK for OS 3.5.
|
||
|
||
- [jlangner]: the log() and log10() functions always returned -inf() even if the
|
||
arguments was within the valid range for a log() function. Using DBL_EPSILON as
|
||
the threshold was not correct as EPSILON is 2.2204460492503131E-16 whereas
|
||
values like 1E-200 are still valid double values for a log().
|
||
|
||
|
||
c.lib 1.202 (16.1.2007)
|
||
|
||
- Added llrint() function contributed by Henning Nielsen Lund. Thank you
|
||
very much!
|
||
|
||
- <unistd.h> now also include <stdio.h>, so that the SEEK_SET, etc. macros
|
||
are defined for lseek() to use.
|
||
|
||
- Added a wrapper function which handles the thread-safe stdio stream
|
||
resolution.
|
||
|
||
- In tcflush() a break signal can no longer cause the read flush loop
|
||
to be quit with two semaphores still locked.
|
||
|
||
- In __obtain_daemon_message() the test to verify if the bsdsocket.library API
|
||
would support the server API functionality checked the wrong feature. Fixed.
|
||
|
||
- Switched over the fd->fd_DefaultFile references to fd->fd_Socket where
|
||
sockets are used rather than file handles.
|
||
|
||
- Added functions which modify the callback function and the userdata pointer
|
||
stored in a low level unbuffered file/socket data structure. These function
|
||
perform the proper locking and are thus safe to use in a thread-safe environment.
|
||
|
||
- The low level unbuffered file/socket now has a public equivalent, which
|
||
is defined (along with the typedefs and flags) in <sys/clib2_io.h>. Functions
|
||
for tinkering with it are still to come.
|
||
|
||
- The math kernel code no longer uses its own private scalbn() function.
|
||
|
||
- Added a function prototype for the _exit() function. Note that _exit() is
|
||
not an ISO 'C' function.
|
||
|
||
- Corrected the getopt() function prototype, as prompted by Henning Nielsen Lund.
|
||
|
||
- The printf() family no longer adds a 0 or 0x prefix if the alternate
|
||
conversion modifier is present for the %o and %x conversions and the
|
||
value to be converted is 0 already. Put another way, printf("%#x %#o",0,0);
|
||
now prints "0 0". This required another change so that %p always includes
|
||
the 0x prefix even if the pointer involved is a NULL pointer.
|
||
|
||
- readlink() no longer sort-of-works for files and directories. It now only
|
||
works for soft linked objects and returns an error for everything else.
|
||
This is based upon a fix by Peter Bengtsson. Thank you very much!
|
||
|
||
- Moved the lstat() local Lock() function into its own separate file.
|
||
|
||
- uname() now returns correct and robust information for OS version
|
||
numbers > 36. This integrates a fix by Peter Bengtsson. Thank you
|
||
very much!
|
||
|
||
- Moved the crtbegin.o/crtend.o files out of the link libraries. Moving
|
||
them in was intended to work as a fix for the shared library build, but
|
||
now it seems that this has to be done at the link stage through the
|
||
GCC specs file...
|
||
|
||
- Integrated a fix for __rem_pio2() which affects sin(), tan() and cos(),
|
||
contributed by Steven Solie. Thank you very much!
|
||
|
||
- The internal 'struct fd' file descriptor table entry data structure
|
||
now has a user data field entry.
|
||
|
||
- Rearranged the contents of the 'struct fd' file descriptor table entry
|
||
data structure in preparation for making it public. Also added a version
|
||
field so that user code can handle changes to it gracefully. The default
|
||
file is no longer a BCPL pointer to a file handle by default, but
|
||
both a BPTR and a socket identifier, wrapped into a union.
|
||
|
||
- Added experimental tilde expansion in Unix path names. This still needs
|
||
some more work.
|
||
|
||
- __get_default_file() called __fd_unlock() without having called
|
||
__fd_lock() first. Ouch.
|
||
|
||
- Removed an unnecessary pair of __fd_lock()..__fd_unlock() calls from
|
||
ttyname_r().
|
||
|
||
- The libunix.a unlink() function is now reentrant, or at least thread-safe.
|
||
|
||
- You can now make unlink() stop after a failed deletion attempt which
|
||
failed because the object to be deleted was reported as being "in use".
|
||
The libunix.a variant defaults to report the deletion to have succeeded
|
||
under these circumstances and later tries to delete the files marked
|
||
for deletion. See <dos.h> for a brief documentation of how to change
|
||
the behaviour.
|
||
|
||
- basename() and dirname() can no longer return NULL. They truncate the
|
||
resulting path name instead. This is done so because some code that
|
||
calls basename() or dirname() does not check if the function's return
|
||
value is NULL.
|
||
|
||
- The SetOwner() fall-back code for Kickstart 2.04 was passing the wrong
|
||
parameters to the file system. The first (dp_Arg1) should have been
|
||
zero. Ouch.
|
||
|
||
- basename() is not supposed to modify the string it is passed and should
|
||
return a pointer to a string which can be modified. Now it does. Same
|
||
thing for dirname().
|
||
|
||
- asctime_r() now returns NULL if the buffer is too short to hold even a single
|
||
byte of data.
|
||
|
||
- ttyname() now calls ttyname_r(). Also, the libunix.a version of ttyname_r()
|
||
will produce "/CONSOLE" rather than "CONSOLE:".
|
||
|
||
|
||
c.lib 1.201 (21.9.2006)
|
||
|
||
- If defined, the local environment variable "DISABLE_COMMANDLINE_WILDCARD_EXPANSION"
|
||
will disable expansion of wildcard patterns passed on the command line.
|
||
Note that if the variable is not set then the global variable
|
||
'__expand_wildcard_args' will provide the defaults for the switch that
|
||
controls whether the wildcard expansion takes place. And after the
|
||
environment variable has been checked, the '__expand_wildcard_args_check'
|
||
function pointer can still be used to override the switch.
|
||
|
||
- fstat() now works with "NIL:" and "/dev/null", respectively. Not that
|
||
it returns much useful information, though.
|
||
|
||
- The _PC_MAX_INPUT query for file handles now returns the default
|
||
buffer size.
|
||
|
||
- Integrated the new OS4 build makefile collection, as contributed by
|
||
Steven Solie. Thank you very much!
|
||
|
||
- Added the missing strerror_r() function.
|
||
|
||
- fpathconf() should work with the stdio streams, even in the thread-safe
|
||
library version, again.
|
||
|
||
- Updated m68k specs file in /documentation to contain an own __CLIB2__
|
||
define so that existing m68k compilers also have this define. In addition,
|
||
the common "-noixemul" option can now also be specified but will do a NOP
|
||
so that Makefiles sharing multiple runtime lib setups work without
|
||
a warning.
|
||
|
||
- Added a new callback function which can be used in programs which want
|
||
to avoid that the command line wildcard expansion takes place.
|
||
|
||
- __get_default_file() now dynamically fills in file handles for the
|
||
stdin/stdout/stderr streams if it's part of the thread-safe library.
|
||
|
||
- fpathconf() now checks if the file descriptor is really referring to a file.
|
||
|
||
- The termios hook entry code could file descriptor's embedded file handle
|
||
rather than what the thread safe library had dynamically bound to the
|
||
stdin/stdout/stderr streams.
|
||
|
||
- execve() now finds commands in the current directory again, even if you
|
||
omit the leading "./" path name.
|
||
|
||
- The execve() code that looks for the command/script file now begins by
|
||
checking if the file name includes path separators. If it does not,
|
||
then the search for the command begins with the resident command list;
|
||
otherwise the local directories are checked. The new code also properly
|
||
cleans up after itself (a FreeDeviceProc() was missing) and the "PROGDIR:"
|
||
lock now always refers to the directory in which the command/script
|
||
file is found.
|
||
|
||
- Added the missing fdim() and fdimf() functions to the build
|
||
makefiles. The OS4 build makefile was missing lrint() and
|
||
lrintf(). Ouch.
|
||
|
||
- Added the POSIX exec() family functions, based upon code contributed
|
||
by Henning Nielsen Lund. Thank you very much!
|
||
|
||
- atoll() no longer sets 'errno' directly but now calls __set_errno()
|
||
instead.
|
||
|
||
- Added pathconf(), fpathconf(), sysinfo(), ftime(), ulimit(), getrlimit()
|
||
and setrlimit() as contributed by Peter Bengtsson. Thank you very much!
|
||
|
||
- Added the missing S_ISSOCKET() macro to <sys/stat.h>. Note that this
|
||
is not actually a POSIX feature.
|
||
|
||
- Added fmin(), fminf(), fmax() and fmaxf() to the build makefiles.
|
||
Somehow I must have forgotten about them :-(
|
||
|
||
- select() and waitselect() can now be called without any file descriptor
|
||
sets to work with, as some software does which uses select() in place
|
||
of sleep().
|
||
|
||
- The <sys/ioctl.h> header file now includes both <sys/select.h> and
|
||
<sys/filio.h> for better compatibility with the TCP/IP stack header
|
||
files.
|
||
|
||
- Added the global variable __expand_wildcard_args which can be used
|
||
to disable wildcard pattern expansion of command line parameters when
|
||
linked against "libunix.a". Note that this has no effect on the "regular"
|
||
libc.a behaviour.
|
||
|
||
|
||
c.lib 1.200 (17.4.2006)
|
||
|
||
- The default break signal mask (SIGBREAKF_CTRL_C) is no longer
|
||
hard-coded. You can override it at link time with a different
|
||
variable value for __break_signal_mask. This may have to be
|
||
augmented by an API for changing the value.
|
||
|
||
- Added a waitselect() function which works very much like the
|
||
bsdsocket.library/WaitSelect() function.
|
||
|
||
- Added <sys/time.h> include to <sys/socket.h> due to latest "TimeVal" change
|
||
in the OS4 SDK. Otherwise "struct timeval" will not be defined at the time
|
||
the <net/if.h> of the netincludes will be included by <proto/bsdsocket.h>.
|
||
|
||
- The strftime() hook function had the locale and character parameters
|
||
switched, which made 'setlocale(LC_ALL,""); strftime(..);' unusable.
|
||
Fixed.
|
||
|
||
- fchown() and chown() now accept owner and group ID values of -1, which
|
||
indicate that the respective information should not be changed.
|
||
|
||
- The OS4 library build now includes the crtbegin.o and crtend.o object
|
||
files in the libc.a library, which solves a problem with the thread-safe
|
||
shared library support code.
|
||
|
||
|
||
c.lib 1.199 (6.3.2006)
|
||
|
||
- In <stdio.h> MAXPATHLEN is now equivalent to PATH_MAX (from <limits.h>),
|
||
as suggested by Henning Nielsen Lund.
|
||
|
||
- Added lockf() support, as supplied by Henning Nielsen Lund.
|
||
Thank you very much!
|
||
|
||
- symlink() now also works for absolute and relative links, and is
|
||
part of "libunix.a". This patch was supplied by Henning Nielsen Lund.
|
||
Thank you very much!
|
||
|
||
- The __main() stub function expected by the 68k GCC build is no
|
||
longer part of "stdlib_main.c". This helps the C++ support, since the
|
||
__main symbol definition no longer clashes with the definition in
|
||
"libgcc.a".
|
||
|
||
- The printf() family stripped trailing zeroes from the integer part
|
||
of %g output. Fixed.
|
||
|
||
- Moved an allocation size roundup operation in realloc().
|
||
|
||
|
||
c.lib 1.198 (11.12.2005)
|
||
|
||
- Added <fenv.h> for C99, and the (yet unimplemented) functions
|
||
feclearexcept(), fegetenv(), fegetexceptflag(), fegetround(),
|
||
feholdexcept(), feraiseexcept(), fesetenv(), fesetexceptflag(),
|
||
fetestexcept(), fetestround() and feupdateenv().
|
||
|
||
- Replaced the old pow() implementation. However, powf() may need to
|
||
be changed to set a domain error.
|
||
|
||
- In libunix.a malloc(), calloc() and realloc() no longer treat a
|
||
request to allocate 0 bytes as an error, returning NULL. They all
|
||
return a pointer sized memory chunk (= four bytes) initialized to
|
||
NULL (= 0) instead.
|
||
|
||
- The alloca() implementation which allocates memory from the system
|
||
rather than the local stack frame is thread-safe now. It also
|
||
interacts with the realloc(), calloc(), free() and malloc() functions
|
||
in that the alloca() cleanup routine is called once alloca() has
|
||
done its job. If all the memory allocated through alloca() has been
|
||
released no further calls to the cleanup function will be made.
|
||
|
||
- In the thread-safe library, realloc() permitted two different overlapping
|
||
calls to succeed in trying to reallocate the same chunk of memory due to
|
||
a race condition. Fixed.
|
||
|
||
- Added a new function __get_mem_stats() (the prototype is in <dos.h>) which
|
||
can be used to query the current and maximum memory usage, counting the
|
||
allocations performed through malloc(), free() and all other functions which
|
||
use them.
|
||
|
||
- Added another function called __reset_max_mem_stats() which will reset the
|
||
counters for "maximum amount of memory used" and "maximum number of chunks
|
||
allocated" to the current figures for these values.
|
||
|
||
- Fixed the alloca() declaration in <stdlib.h> so that software which keys
|
||
off the fact whether or not the alloca preprocessor symbol is defined
|
||
will do the right thing.
|
||
|
||
- Added an optional call-back function which can be called if alloca()
|
||
is about to return NULL, which some software does not consider.
|
||
Rather than letting such software drop into an illegal memory access
|
||
or worse, that call-back function will be invoked instead, which can
|
||
print an error message and eventually call abort().
|
||
|
||
|
||
c.lib 1.197 (4.11.2005)
|
||
|
||
- Updated math_hypot.c to a newer (e_hypot.c 1.3 95/01/18) version from
|
||
fdlibm which uses macros for manipulating the high and low words of a
|
||
double, like the rest of fdlibm functions in clib2. The previous version
|
||
would give bogus results when compiled with -O3 in clib2 which lead to
|
||
"interesting" results (and lots of fun while searching for the problem)
|
||
in Ghostscript. Wish I managed to track this down yesterday for 1.196
|
||
release... <aantonijevic>
|
||
|
||
- Implemented atanh() and atanhf() which were not listed in the TODO
|
||
file but were still unimplemented up until now.
|
||
|
||
- Replaced ldexp() and modf().
|
||
|
||
- Added __set_h_errno() and __get_h_errno() functions.
|
||
|
||
- The thread-safe library now tries to enable bsdsocket.library base
|
||
sharing and attempts to make the TCP/IP stack call the local
|
||
__set_errno() and __set_h_errno(), so that any Process calling
|
||
the library functions will get a chance to see proper error
|
||
codes. Whether any of these features could be enabled can be tested
|
||
through two global variables __can_share_socket_library_base and
|
||
__thread_safe_errno_h_errno which are defined in <dos.h>. Note that
|
||
for both features to work you will need the Roadshow bsdsocket.library
|
||
version 4.275 or higher.
|
||
|
||
- In <stdbool.h> the preprocessor definition should read
|
||
"__bool_true_false_are_defined" rather than "__bool_true_and_false_are_defined".
|
||
Thanks go to Peter Bengtsson for finding and fixing it.
|
||
|
||
- The network startup code no longer checks for the presence of a possible
|
||
daemon startup message by default. You now have to enable this feature
|
||
by declaring a global variable called "__check_daemon_startup" which is
|
||
described in <dos.h>.
|
||
|
||
- Moved the code which rebinds the standard I/O streams to the server
|
||
socket into a separate function which can be overridden by user code.
|
||
|
||
- Updated the new __obtain_daemon_message() function to call a
|
||
bsdsocket.library API function to determine if what appears to be
|
||
a valid daemon startup message is sound.
|
||
|
||
- Replaced the OS4 specific build makefile with an updated version
|
||
prepared by Steven Solie. Thank you very much!
|
||
|
||
|
||
c.lib 1.196 (11.10.2005)
|
||
|
||
- Removed the various workarounds associated with <unistd.h>, required
|
||
for building code that references the networking API. It is now possible,
|
||
provided you build your code with an existing TCP/IP API header file
|
||
set (such as from the "Roadshow" SDK) without running into data type
|
||
or function prototype declaration conflicts. I have added local versions
|
||
of <arpa/inet.h>, <netinet/in.h>, <netdb.h>, <sys/filio.h>, <sys/ioccom.h>,
|
||
<sys/ioctl.h>, <sys/select.h> and <sys/socket.h> and updated <unistd.h>,
|
||
<pwd.h> and <grp.h> accordingly. Note that some of the function prototypes
|
||
will conflict with the bsdsocket.library/usergroup.library API, which is
|
||
why you can disable the declarations through the __NO_NET_API preprocessor
|
||
symbol: if defined, none of the function prototypes will be defined.
|
||
|
||
- Implemented lrintf(), lrint(), lroundf(), lround(), nearbyintf(),
|
||
nearbyint(), remquof(), remquo(), roundf(), round(), tgammaf(),
|
||
tgamma(), truncf(), trunc(). Sort of implemented fmaf() and fma(),
|
||
which really ought to be done in "SIMD" fashion.
|
||
|
||
This completes the "real" floating point math library (ignoring
|
||
for a moment that the floating point environment code is still
|
||
not implemented).
|
||
|
||
- accept() now calls the bsdsocket.library accept() function first
|
||
and then hooks up the socket with the clib2 data structures. This
|
||
makes it possible to have several Processes calling the accept()
|
||
stub at the same time.
|
||
|
||
- When the main() function returns directly or indirectly by way of
|
||
calling exit(), the IoErr() value set at this time will now be
|
||
preserved until the program really returns control to the shell.
|
||
This turned out to be easier to implement than I had originally
|
||
thought, thanks to the fact that the atexit() functions are all
|
||
invoked straight after the exit() call.
|
||
|
||
- strtoimax(), strtoumax(), strtod(), strtof(), strtol(), strtoll(),
|
||
strtoul() and strtoull() now count how many digits were converted.
|
||
If that number is zero, then the conversion is considered to have
|
||
failed: 0 is returned and the 'ptr' parameter reference is initialized
|
||
with a pointer to the string to be converted. This has two consequences:
|
||
|
||
1) A floating point number that has no digits in the significand
|
||
is no longer converted to zero. For example ".e10" can no longer
|
||
result in a successful conversion.
|
||
|
||
2) You can detect if a conversion is successful by comparing pointers
|
||
after the conversion function has returned:
|
||
|
||
char * str;
|
||
char * ptr;
|
||
long n;
|
||
|
||
n = strtol(str,&ptr,10);
|
||
if(n == 0 && str == ptr)
|
||
printf("conversion has failed");
|
||
|
||
- Following detection of a stack overflow, the startup code eventually
|
||
called _exit(). It should have called exit() instead.
|
||
|
||
- tmpnam() wrote more than L_tmpnam bytes to the name buffer. Also, the
|
||
TMP_MAX value was off by one.
|
||
|
||
|
||
c.lib 1.195 (3.9.2005)
|
||
|
||
- In __time_delay() the CheckIO() test was wrong and should have
|
||
tested for a request still in progress. Fixed.
|
||
|
||
- Modified select() to support plain files, too. The new code now
|
||
compares the current file position against the current file size,
|
||
if that file is on a file system, or simply checks if there is
|
||
any data in the file (which works for the default PIPE: device).
|
||
|
||
- The raw file descriptor structure member fd_Position is now
|
||
always updated, regardless of whether the file supports random
|
||
access or not.
|
||
|
||
- The wildcard escape character used in __wildcard_expand_init() was
|
||
wrong. It should have been "'" but it was "`". Fixed.
|
||
|
||
- The startup code now references the linker symbol generated for
|
||
the user-supplied main() function.
|
||
|
||
- log(+/-0), logb(+/-0), log10(+/-0) now return -infinity.
|
||
|
||
- getcwd() now considers a buffer size of 0 an error, and it sets
|
||
the errno code to ERANGE if the buffer is too small.
|
||
|
||
- With Unix path semantics enabled, rename() now fails if either
|
||
the old or the new name are empty strings. Same thing for
|
||
opendir(), utime(), unlink(), chown(), link(), readlink(),
|
||
realpath(), chdir(), access(), stat(), rmdir(), lstat(),
|
||
chmod(), statfs() and open()/fopen().
|
||
|
||
- Fixed several issues with the formatted output of strftime()
|
||
for the "C" locale: "%p" could return " PM", "%c" is now
|
||
equivalent to "%a %b %e %T %Y", "%x" is equivalent to "%m/%d/%y"
|
||
and "%X" is now equivalent to "%T".
|
||
|
||
- The 68020/030/040/060 versions of the library now include the
|
||
64 bit integer conversion code. The plain 68000 version does not.
|
||
|
||
- The 64 bit integer conversion code used in by the scanf() family
|
||
was broken due to a misplaced overflow check, which had the cruel
|
||
effect of triggering for 32 bit integers as well. Fixed.
|
||
|
||
- DoTimer() did not allocate the local MsgPort correctly. Fixed.
|
||
|
||
|
||
c.lib 1.194 (15.7.2005)
|
||
|
||
- Added getopt_long to libunix.a <tfrieden>
|
||
|
||
- Added new libprofile.a which implements gprof gmon.out output <tfrieden>
|
||
|
||
- Added the function profil() to libc.a <tfrieden>
|
||
|
||
- Added ftello() and fseeko() which both merely call the equivalent (at
|
||
least for clib2) ftell() and fseek() functions, respectively.
|
||
|
||
- statfs() never stated that a disk was mounted for read-only access
|
||
because the wrong InfoData structure member was tested. Fixed.
|
||
|
||
- lstat would overwrite the name parameter via ReadLink(..., name, ...)
|
||
instead of ReadLink(..., new_name, ...) <tfrieden>
|
||
|
||
- Implemented exp2()/exp2f() and log2()/log2f() as suggested by
|
||
Henning Nielsen Lund. Thank you very much!
|
||
|
||
- The pattern matching code which expands command line arguments, as part
|
||
of libunix.a, now translates the "*" wildcard into "#?" unless you prefix
|
||
it with a backtick ("'"), which is the wildcard pattern escape character
|
||
used on AmigaOS.
|
||
|
||
- Repaired the pattern matching code which expands command line arguments:
|
||
it no longer requires that any parameters are quoted and it is automatically
|
||
enabled if you link against libunix.a, without libc.a standing a chance to
|
||
accidentally override it.
|
||
|
||
- Fixed a bug in vfprintf that would surface when the buffer was enlarged
|
||
if the pattern was too large to fit the static internal buffer <tfrieden>
|
||
|
||
- Added file system names to statfs <tfrieden>
|
||
|
||
- Moved all the constructor code out of "stdlib_init_exit.c" and into the
|
||
files which initialize global data, such as the new "stdlib_program_name.c"
|
||
and "stdlib_malloc.c".
|
||
|
||
- Until I can find a way to invoke it from within the library, the
|
||
__machine_test() function is no longer invoked.
|
||
|
||
- Tagged global data with NOCOMMON attributes.
|
||
|
||
- Added the __lib_init() and __lib_exit() functions, which are part of the
|
||
thread-safe library and which can be used to hook up clib2 with standard
|
||
Amiga shared library/device code. Some documentation on how to use them
|
||
can be found in the <dos.h> header file.
|
||
|
||
- Added a complete shared library skeleton example to demonstrate how the
|
||
clib2 shared library initialization/cleanup functions should be used.
|
||
This is a dual-build library which will both work with the plain 68k
|
||
AmigaOS and the PowerPC native AmigaOS4. The example source code can be
|
||
found in the "skeleton_library" subdirectory.
|
||
|
||
- The thread-safe version of isatty() should now work for stdio
|
||
file descriptors, too.
|
||
|
||
- Retrofitted thread-safety into the termios code.
|
||
|
||
- The socket/usergroup API function and data type definitions that used to
|
||
be defined in <unistd.h> have been moved into a separate header file
|
||
<sys/clib2_net.h> which, for backwards compatibility, can be include
|
||
from within <unistd.h> if the preprocessor symbol __USE_CLIB2_NETLIB
|
||
is defined early on. Eventually, <sys/clib2_net.h> should be removed
|
||
from the general header files and become a local library build header
|
||
file altogether. Note that in this case you would have to build your
|
||
own software using common TCP/IP SDK header files.
|
||
|
||
- <sys/types.h> now also includes <time.h> and <stddef.h>.
|
||
|
||
|
||
c.lib 1.193 (4.6.2005)
|
||
|
||
- fpclassify() now returns FP_ZERO both for 0 and -0.
|
||
|
||
- nan() and nanf() now return quiet NaNs.
|
||
|
||
- Added internal __inf() and __inff() functions.
|
||
|
||
- strtof() now calls nanf() and __inff(), respectively, to produce
|
||
the special floating point values for nan/inf/infinity.
|
||
|
||
- strtod() now calls nan() and __inf(), respectively, to produce
|
||
the special floating point values for nan/inf/infinity.
|
||
|
||
- The scanf() family now calls nan() and __inf(), respectively, to
|
||
produce the special floating point values for nan/inf/infinity.
|
||
|
||
- Added %D, %e, %F, %g, %G and %h for strftime(); repaired %I.
|
||
|
||
- Documented __strip_double_slash() and plugged in a memmove()
|
||
in place of the copying loop.
|
||
|
||
- Modified __translate_unix_to_amiga_path_name() and
|
||
__translate_amiga_to_unix_path_name() to not to call strlen()
|
||
on the results of __strip_double_slash().
|
||
|
||
- For %C strtime() should return the century number, not the
|
||
year number mod 100.
|
||
|
||
- The record locking code in fcntl() is no longer part of the
|
||
regular libc.a, but only of libunix.a.
|
||
|
||
- Changed the definition of the D_S() macro to cast the pointer
|
||
address to an unsigned 32 bit integer.
|
||
|
||
- Modified the locale-aware isalnum(), isalpha(), iscntrl(),
|
||
isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(),
|
||
isupper(), isxdigit(), tolower() and toupper() functions
|
||
to clamp the input parameter to the "unsigned char" range before
|
||
it is submitted to the respective locale.library function. This
|
||
should be in sync with what the specs demand, which state that
|
||
if the input parameter is neither EOF nor in the range of an
|
||
"unsigned char" variable, then the results are undefined.
|
||
|
||
- ungetc() now returns the input character, clamped to an unsigned
|
||
char value, upon success. Previously, if the input parameter was
|
||
negative and not EOF, the result was identical to the input, which
|
||
could have had negative side-effects.
|
||
|
||
-<2D>Added NAN, INFINITY, FLT_EVAL_METHOD, float_t and double_t to
|
||
<math.h> (C99).
|
||
|
||
- Added skeleton code for acosf(), acosh(), acoshf(), asinf(), asinh(),
|
||
asinhf(), atan2f(), atanf(), atanh(), atanhf(), cbrt(), cbrtf(),
|
||
ceilf(), cosf(), coshf(), erf(), erfc(), erfcf(), erff(),
|
||
exp2(), exp2f(), expf(), expm1(), expm1f(), fdim(), fdimf(),
|
||
floorf(), fma(), fmaf(), fmax(), fmaxf(), fmin(), fminf(),
|
||
fmodf(), frexpf(), hypotf(), ilogb(), ilogbf(), ldexpf(), lgamma(),
|
||
lgammaf(), log10f(), log1p(), log1pf(), log2(), log2f(), logbf(),
|
||
logf(), lrint(), lrintf(), lround(), lroundf(), modff(), nearbyint(),
|
||
nearbyintf(), powf(), remainder(), remainderf(), remquo(), remquof(), round(),
|
||
roundf(), scalbn(), scalbnf(), sinf(), sinhf(), sqrtf(), tanf(),
|
||
tanhf(), tgamma(), tgammaf(), trunc() and truncf(), to be filled in
|
||
later...
|
||
|
||
- Implemented fmin()/fminf(), fmax()/fmaxf(), fdim()/fdimf() for C99.
|
||
|
||
- Ported acosf(), asinf(), atan2f(), atanf(), ceilf(), expf(), floorf(),
|
||
fmodf(), frexpf(), ldexpf(), log10f(), logbf(), logf(), modff(), powf(), sqrtf(),
|
||
scalbn() and scalbnf() for C99.
|
||
|
||
- Ported cbrt(), cbrtf(), erf(), erff(), erfc(), erfcf(), expm1(),
|
||
expm1f(), ilogb(), ilogbf(), log1p() and log1pf() for C99.
|
||
|
||
- Ported cosf(), coshf(), sinf(), sinhf(), tanf(), tanhf()
|
||
and hypotf() for C99.
|
||
|
||
- Ported acosh(), acoshf(), asinh(), asinhf(), lgamma(), lgammaf(),
|
||
remainder() and remainderf() for C99.
|
||
|
||
- The scanf() family now supports character ranges for the %[
|
||
conversion. Note that this is a non-standard feature!
|
||
|
||
- Integrated Peter Bengtsson's termios code. Thank you very much! I chose
|
||
to add it to libunix.a rather than keeping it in a separate libtermios.a
|
||
library.
|
||
|
||
|
||
c.lib 1.192 (12.5.2005)
|
||
|
||
- Changed how errors are detected, as returned by Write(), Read() and
|
||
Seek(). Seek() is particularly challenging because the value it
|
||
returns might be a valid file position and not an error.
|
||
|
||
- Replaced numeric function return codes of 0 and -1 with macros OK,
|
||
SEEK_ERROR/ERROR to clarify the respective purposes.
|
||
|
||
- Changed how ftell() and fseek() are used, double-checking the return
|
||
value and the errno code.
|
||
|
||
- The record locking semaphore could wind up getting added to the public
|
||
list twice. Fixed.
|
||
|
||
- Fixed two linker errors which were caused by duplicate symbol definitions.
|
||
|
||
- Added code to the startup routine which allows you to monitor where a command
|
||
was started from and which parameters it was invoked with.
|
||
|
||
- If fread()/fwrite() fail to read/write any data because either the number
|
||
of records or the size of each record is zero, both now call clearerr() to
|
||
avoid giving the caller the wrong impression that an EOF or error occured.
|
||
|
||
- The libunix.a flavour of system() no longer attempts to translate the name
|
||
of a command unless it contains path separator characters.
|
||
|
||
- Added strtof(), llabs(), lldiv(), vsscanf() and vscanf() for C99.
|
||
|
||
- strftime() now supports %C, %n, %r, %R, %t, %T, %u, %V, and %z for C99.
|
||
And it ignores the E and O modifiers.
|
||
|
||
- The printf() family now supports the %hh, %j, %t and %z modifiers and the
|
||
%a/%A conversions for C99. The %j is treated like %ll; %t and %z are treated
|
||
like %l. Also, the "infinity"/"not a number" signals now come out as the
|
||
strings "inf" and "nan".
|
||
|
||
- Added HUGE_VALF to <math.h>.
|
||
|
||
- For the printf() "%a" conversion the exponent now comes out as a binary
|
||
number rather than a decimal one. Now how odd is that?
|
||
|
||
- strtod() and strtof() now support "inf"/"infinity"/"nan"/"nan(..)" and
|
||
hexadecimal floating point numbers, for C99.
|
||
|
||
- Added the fpclassify(), isfinite(), isnormal() and signbit() macros for C99.
|
||
|
||
- Reimplemented isnan() and isinf() as macros for C99. The corresponding
|
||
functions will be dropped from the library. Note that the isinf() macro
|
||
does not return -1, 0 or 1 like the old function did, but only 0 or 1
|
||
depending upon whether the parameter represents +/- infinity or not.
|
||
|
||
- Added fabsf() for C99.
|
||
|
||
- The scanf() family now supports the %hh, %j, %t and %z modifiers and the
|
||
%a/%A conversions for C99. The %j is treated like %ll; %t and %z are treated
|
||
like %l. Also, the "inf"/"infinity"/"nan"/"nan()" keywords are processed.
|
||
|
||
- The strftime() %z conversion now prints the time zone difference as a
|
||
"decimal" number. That is, if the difference is 5 hours and 30 minutes,
|
||
then %z will now print "530" rather than "330".
|
||
|
||
- mktime() now handles one leap second gracefully.
|
||
|
||
- Added isblank().
|
||
|
||
- Added isunordered(), isgreater(), isgreaterequal(), isless(),
|
||
islessequal() and islessgreater() to <math.h> for C99.
|
||
|
||
- The wchar_t type is now an 'unsigned short' integer (16 bits wide).
|
||
|
||
- Added PTRDIFF_MIN/PTRDIFF_MAX, WCHAR_MIN/WCHAR_MAX and
|
||
WINT_MIN/WINT_MAX to <stdint.h> for C99.
|
||
|
||
- Added imaxdiv() and imaxabs() for C99.
|
||
|
||
- Added strtoimax() and strtoumax() for C99.
|
||
|
||
- Added nextafter() and nextafterf() for C99.
|
||
|
||
- Added copysign() and copysignf() for C99.
|
||
|
||
- Unless I missed something, clib2 should now be functionally complete
|
||
with regard to C99, except for the floating point operations covered.
|
||
These are a major challenge all by themselves, and I wonder both
|
||
whether they are worth the effort and how one could implement them
|
||
correctly.
|
||
|
||
- fflush() now consistently supports a NULL parameter, causing all
|
||
streams to be flushed for which this behaviour is defined.
|
||
|
||
- The printf() family can now produce output for floating point
|
||
numbers with more than about 77 characters, provided sufficient
|
||
memory is available. C99 calls for a minimum of 4095 characters,
|
||
but we're trying to allocate the space required dynamically.
|
||
|
||
|
||
c.lib 1.191 (9.4.2005)
|
||
|
||
- The name of the public record locking semaphore has to be preallocated
|
||
for OS4 if the AllocSysObject() function is used to create it.
|
||
|
||
- Moved the signal block mask and the signal function table out of
|
||
signal_data.c and into signal_raise.c where they are actually used.
|
||
This makes it possible to override the default definition of the
|
||
__check_abort_enabled variable in your own programs.
|
||
|
||
- raise() no longer resets the signal handler before it invokes the one
|
||
currently configured. It merely blocks the delivery of the respective
|
||
signal to prevent recursion.
|
||
|
||
- raise() now drops into abort() if a signal handler is set to
|
||
SIG_DFL. The exception is in SIGINT delivery, which has the
|
||
effect of printing a different termination message but otherwise
|
||
program flow takes the same path as abort().
|
||
|
||
- Moved the __UtilityBase/__IUtility variable declarations into
|
||
a separate file.
|
||
|
||
- Simplified the library/open close code in "stdlib_main.c".
|
||
|
||
- File descriptors produced by dup() or dup2() now work exactly like
|
||
the original file descriptors they are duplicates of. I modified the
|
||
function which maps file descriptor numbers to file descriptor
|
||
table entries to return the table entries of the original files.
|
||
|
||
- In the thread-safe library, duplicated stdin/stdout/stderr
|
||
descriptors now work like the "real" ones. This is true even if
|
||
the "real" ones were closed and only their former aliases remain.
|
||
|
||
- Invoking fstat() on what maps to a con-handler stream now produces
|
||
information identifying it as a character special file.
|
||
|
||
- Added more code and changes contributed by Peter Bengtsson, thank you
|
||
very much! This includes the following:
|
||
|
||
- Added SSIZE_MAX to <limits.h>.
|
||
|
||
- Added <sys/uio.h>, readv() and writev().
|
||
|
||
- Cut back the soft link resolution code in lstat().
|
||
|
||
- In <fcntl.h> O_NDELAY is now an alias for O_NONBLOCK.
|
||
|
||
- Added <complex.h>, carg(), cargf(), cargl(), cimag(), cimagf(),
|
||
cimagl(), conj(), conjf(), conjl(), creal(), crealf() and creall().
|
||
|
||
Note that the C99 support for the complex floating point data
|
||
types is limited to GCC 3.x for now.
|
||
|
||
- Added va_copy() to <stdarg.h>.
|
||
|
||
- Added _Exit() to <stdlib.h>.
|
||
|
||
- Added <stdbool.h>.
|
||
|
||
- Added vfscanf() to <stdio.h>.
|
||
|
||
- The stdio locking in fcntl() wasn't working correctly. Fixed.
|
||
|
||
- Made the clearerr(), feof() and ferror() macros thread-safe.
|
||
|
||
|
||
c.lib 1.190 (25.3.2005)
|
||
|
||
- DoTimer() now calls AllocSysObject() rather than making up
|
||
a MsgPort locally.
|
||
|
||
- The record locking semaphore code now builds a semaphore to add
|
||
before it tries to find the public one in memory. That way, the
|
||
code can spend less time in Forbid() state and, heaven forbid,
|
||
refrain from allocating memory while in that state.
|
||
|
||
- Split the general stdio initialization/cleanup code from the
|
||
initialization of the stdin/stdout/stderr streams.
|
||
|
||
- Moved the Workbench console stream initialization into the
|
||
initialization code for the stdin/stdout/stderr streams and
|
||
out of the program parameter setup.
|
||
|
||
- The current program name is now set up in the stdlib
|
||
initialization function.
|
||
|
||
- Simplified the machine test code; moved the FPU check into
|
||
the math initialization code.
|
||
|
||
- Added more safety checks to verify that file descriptor
|
||
file handles are valid.
|
||
|
||
- Made the file descriptor checks in the fsync() and fdatasync()
|
||
functions more robust.
|
||
|
||
- Cleaned up the 68k build makefile, so that the CPU and FPU
|
||
tests and the error message display can run safely even
|
||
on plain 68000 machines. This won't work for the 32 bit small
|
||
data model, which implies 68020 code, but so there...
|
||
|
||
- Moved the CPU/FPU type tests into the respective linker
|
||
libraries.
|
||
|
||
- Moved the data declarations out of math_data.c, stat_data.c,
|
||
socket_data.c, dirent_data.c and stdio_data.c and into the
|
||
code that initializes them.
|
||
|
||
- Moved a few __delete_semaphore() calls into conditional compilation
|
||
sections where they should have been in the first place.
|
||
|
||
- Thanks to J<>rg Strohmayer, the GCC library build now manages to
|
||
invoke the library's constructor/destructor functions in a
|
||
very particular order. That way, you can use constructor/destructor
|
||
functions in your own code and not have them clash with the library's
|
||
own functions.
|
||
|
||
- Reimplemented the constructor/destructor invocation code for GCC.
|
||
Both the 68k and PowerPC platform now invoke them in the same order
|
||
and the 68k code uses the designated invocation priorities. The
|
||
PowerPC destructor function now sets up the exit() jmp_buf before
|
||
the destructor functions are called.
|
||
|
||
- Added S_IREAD, S_IWRITE and S_IEXEC aliases to <sys/stat.h>.
|
||
|
||
- Moved data out of stdlib_data.c and into the code that references
|
||
or initializes it.
|
||
|
||
- The stdlib constructor now performs the CPU/FPU compatibility test.
|
||
|
||
- Introduced new constructor types and changed the overall priority
|
||
order.
|
||
|
||
- Switched over the startup code and the library itself to use
|
||
constructor/destructor functions for initialization and cleanup
|
||
purposes.
|
||
|
||
- The destructor function invocation code no longer calls
|
||
setjmp(). This is now done within stdlib_main.c prior to
|
||
calling the destructor function invocation code.
|
||
|
||
- Fixed the SAS/C destructor function prototypes and verified
|
||
that the constructors/destructors are called in the proper
|
||
order, too.
|
||
|
||
- Aliases of file descriptors are now using the signal semaphore
|
||
of the original file descriptor.
|
||
|
||
- close() did not return 0 if the file descriptor in question
|
||
was really just an alias. Fixed.
|
||
|
||
- Added a feature which makes it possible to have several clients
|
||
use the standard I/O streams (stdin/stdout/stderr) and have these
|
||
referring to their process' Input()/Output()/ErrorOutput()
|
||
streams. This is intended to support the upcoming shared
|
||
library feature.
|
||
|
||
- Turns out that the 68k GCC port does not sort constructor and
|
||
destructor functions in any way at all. I reimplemented the
|
||
entire library constructor/destructor functionality to use the
|
||
same approach as libnix.
|
||
|
||
- ftruncate() ended up changing the current file position, contrary
|
||
to what it is supposed to do. Fixed.
|
||
|
||
- fcntl() did not work for sockets. Fixed.
|
||
|
||
- Reorganized the local header files, removing redundancies.
|
||
|
||
- Dropped unused stub code which is now redundant because of
|
||
the constructor/destructor mechanism.
|
||
|
||
- Moved the call chain printing out of stdlib_main.c and into
|
||
separate files.
|
||
|
||
- Removed some more redundant data from stdlib_main.c.
|
||
|
||
- Added the first "real" C99 function: _Exit() ;-)
|
||
|
||
- assertion failures early on during program initialization
|
||
should no longer spell big trouble on account of the stdio
|
||
data structures possibly not being in a well-defined and
|
||
initialized state.
|
||
|
||
- Turns out that the constructor/destructor calling sequence
|
||
was still wrongish for the OS4 library. So I had to change
|
||
it *again*. Which probably means that the 68k library will
|
||
need further changes...
|
||
|
||
- Moved stdlib_main.o into the regular libc.a, at least for
|
||
the 68k build. The PowerPC build may follow later, provided
|
||
I manage to get the specs file fixed. Actually, stdlib_main.o
|
||
is in the libc.a library already. Now about that specs file...
|
||
|
||
- Moved the check for the presence of an FPU into the
|
||
math_init.c code. I am far from certain whether this will
|
||
have the desired effect, though. Due to how the GNU ld linker
|
||
works, libraries are scanned once only. And the FPU check will
|
||
be pulled in only if something references the HUGE_VAL
|
||
constant.
|
||
|
||
- Activated the dormant thread-safe standard input/output/error
|
||
handling code.
|
||
|
||
- Small fixes to fcntl() and select() to cover the thread-safe
|
||
fd->fd_DefaultFile == ZERO case.
|
||
|
||
|
||
c.lib 1.189 (5.3.2005)
|
||
|
||
- Rewrote the __translate_unix_to_amiga_path_name() function to
|
||
translate patterns such as "foo/bar/../../baz" properly, and to
|
||
use strlen() a lot less.
|
||
|
||
- Major, major changes! Moved most of the monolithic code out of
|
||
the file descriptor hook and into the respective functions,
|
||
such as dup2(), fchmod(), fchown(), fcntl(), fdatasync(), fstatfs(),
|
||
fsync(), ftruncate() and lseek(). Code which is not strictly
|
||
required will no longer find its way into your programs if you
|
||
link with the updated library.
|
||
|
||
NOTE: these changes require that the entire library is rebuilt!
|
||
|
||
- The buffered and unbuffered file hook code is now invoked through
|
||
function pointers alone. The utility.library/CallHookPkt mechanism
|
||
is no longer required.
|
||
|
||
- Moved the entire lseek() code relevant for files into the hook
|
||
function.
|
||
|
||
- Simplified the close() function which now just calls into the
|
||
hook code to perform whatever is necessary. The hook code is
|
||
responsible for cleaning up after aliases, etc. This change in
|
||
turn made it possible to greatly simplify the hook code for
|
||
buffered files which now bypasses close/read/write/lseek and
|
||
directly invokes the hook code for unbuffered files.
|
||
|
||
- Added various floating point constants to <math.h>, courtesy
|
||
of Henning Nielsen Lund. Thank you very much!
|
||
|
||
- When using the wildcard expansion code for command line
|
||
parameters (which is by default linked in with libunix.a),
|
||
regular expressions can no longer prompt dos.library requesters
|
||
to appear. However, to be on the safe side, if you are expecting
|
||
to pass regular expressions on the command line, do not use
|
||
the wildcard expansion code such as by overriding the library
|
||
symbols with dummy functions such as are used in the file
|
||
"stdlib_wildcard_expand.c".
|
||
|
||
- Added a new variable '__open_locale'<27>which can be used to
|
||
restrict all library functions to use the "C" language locale
|
||
rather than the current system locale settings. In addition
|
||
to that, two new functions __locale_exit() and __locale_init()
|
||
can be used to close and (re-)open the system locale at a
|
||
later time.
|
||
|
||
- Local ("static") functions are now identified by the STATIC
|
||
qualifier. This was done in preparation for changes that will
|
||
deal with global and local data and the issue of thread safety.
|
||
|
||
- Added stdio thread locking functions flockfile(), funlockfile(),
|
||
and ftrylockfile().
|
||
|
||
- Modified the internal FILE structure to allow for thread locking.
|
||
Note that this again requires that the library is rebuilt!
|
||
|
||
- Added or modified macros for getc_unlocked(), getchar_unlocked(),
|
||
putc_unlocked() and putchar_unlocked().
|
||
|
||
- Added rand_r().
|
||
|
||
- Added flockfile()/funlockfile() wrappers around all stdio
|
||
functions.
|
||
|
||
- Added more semaphore locking around the basic stdio, memory, locale
|
||
and dirent data operations. That should do it! While the library is
|
||
not reentrant (this is not ixemul.library) it should be thread-safe
|
||
now. Thread-safe in the sense of POSIX 1003.1c-1995.
|
||
|
||
- The thread-safety code is now subject to conditional compilation.
|
||
Both the library and the user code need to be rebuilt with the
|
||
preprocessor symbol __THREAD_SAFE defined to get thread-safe
|
||
code.
|
||
|
||
- Extended the thread-safety locking to the file descriptors.
|
||
|
||
NOTE: these changes require that the entire library is rebuilt!
|
||
|
||
- The translation of Unix to Amiga path names now silently accepts
|
||
absolute Amiga path names passed to it and will use them without
|
||
changing them.
|
||
|
||
- Added atoll(), ffs(), ftw(), nftw(), lstat() and uname() code
|
||
contributed by Peter Bengtsson. Thank you very much!
|
||
|
||
- Reworked the code that handles quoting for the wildcard expansion
|
||
routine. We no longer allocate memory and then modify it, but
|
||
call a function for each quoted parameter which does whatever is
|
||
necessary.
|
||
|
||
- The shell command parameter parser now considers the non-breaking
|
||
space character (ISO code 160) to be a blank space character, too.
|
||
|
||
- Moved the signal semaphore allocation/initialization/deallocation
|
||
into a dedicated module. This also has the advantage that it's
|
||
harder to break code by accidentally forgetting to call
|
||
InitSemaphore() after having allocated the memory for it.
|
||
|
||
- Rewrote the code that allocates the file descriptor and file
|
||
buffer tables so that all the memory allocations are in one
|
||
place and it's possible to specify exactly how many table
|
||
entries are required at a time.
|
||
|
||
- Creation and initialization of semaphores now uses the AmigaOS4
|
||
specific functions for this purpose, if available.
|
||
|
||
- In the thread-safe variant, the library now tries to allow
|
||
multiple concurrent callers to use the socket functions. Note
|
||
that this works only with the Roadshow TCP/IP stack, and the
|
||
results with other TCP/IP stacks are rather unpredictable.
|
||
|
||
|
||
c.lib 1.188 (7.2.2005)
|
||
|
||
- Folded duplicate code in "stdio_init_exit.c" into a common function.
|
||
|
||
- Simplified the code in "time_asctime_r.c" which builds the time
|
||
string. It gracefully handles buffer sizes which are too short
|
||
by returning an empty string.
|
||
|
||
- Moved the "tm->tm_wday" initialization out of the hook function
|
||
in "time_strftime.c" since it was to be called only once anyway.
|
||
|
||
- Lost a few compiler warnings in "unistd_time_delay.c" and
|
||
"time_gettimeofday.c".
|
||
|
||
- Folded duplicate code in "time_mktime.c"; also, errno is no longer
|
||
modified unless the library is built with the "CHECK_FOR_NULL_POINTERS"
|
||
option.
|
||
|
||
- We now allocate the AnchorPath used in the unistd_wildcard_expand.c
|
||
code. Also, the contents of the AnchorPath structure are no longer
|
||
modified between calls. MatchEnd() has to be sufficient.
|
||
|
||
- Moved redundant code out of the readdir()/opendir()/closedir()
|
||
functions which is not required unless the code is built for
|
||
Unix compatibility mode.
|
||
|
||
- Lost the __not_a_number and __infinity variables, including the
|
||
code which initialized them.
|
||
|
||
- Reading/changing the errno variable is no longer done directly, but
|
||
involves accessor functions.
|
||
|
||
- References to the HUGE_VAL quantity now involve an accessor function, too.
|
||
|
||
- Changed the manner in which the __huge_val constant is initialized by
|
||
the __math_init() function. The new approach should be more portable.
|
||
|
||
- The library no longer sends ACTION_DISK_INFO packets to the console
|
||
handler. The side-effects were too varied and irritating after all.
|
||
|
||
- Added the fsync() and fdatasync() functions and the <stdint.h> and
|
||
<inttypes.h> header files contributed by Peter Bengtsson. Thank
|
||
you very much!
|
||
|
||
- Tweaked the build makefiles to produce fewer meaningless warnings.
|
||
|
||
|
||
c.lib 1.187 (29.1.2005)
|
||
|
||
- The default console output window opened when a program is launched
|
||
from Workbench would open and stay open. This was not intended to
|
||
happen and is a side-effect of the new stdio initialization code which
|
||
checks if the stdio streams are in non-blocking mode. Fixed.
|
||
|
||
- Moved the common DateStamp to time_t conversion code into a shared
|
||
function.
|
||
|
||
- The fall-back function for converting time into a string in strftime()
|
||
now calls itself for the "%c", "%x" and "%X" format specifiers.
|
||
|
||
- mktime() is supposed to convert the time specification, given as local
|
||
time, into the number of seconds since January 1st, 1970, relative to
|
||
UTC. This didn't really work up until now since the time value returned
|
||
was given as local time.
|
||
|
||
- Plugged in a different algorithm for calculating the day of the week in
|
||
strftime() and asctime_r(). This one isn't sensitive to the effects of
|
||
adding/subtracting the local time zone.
|
||
|
||
- Changed the algorithm that calculates the number of days that have passed
|
||
so far as used by the the __convert_time() function and the conversion
|
||
code in strftime().
|
||
|
||
- Also changed the algorithm used by strftime() to produce the week numbers
|
||
(the '%U' and '%W' format specifiers). The new method is much simpler
|
||
than the old one.
|
||
|
||
- Made the code that converts a 'time_t' value into the 'struct DateStamp',
|
||
as used by strftime() and utime(), into its own function. This also
|
||
fixes a bug in the code strftime() would use which was completely
|
||
unaware of the local time zone settings.
|
||
|
||
|
||
c.lib 1.186 (14.1.2005)
|
||
|
||
- Redirecting stderr to a file no longer has the effect of showing error
|
||
messages and assertion failure notifications as requesters. The exception
|
||
is in redirecting stderr to NIL: which will prompt the requester use.
|
||
|
||
- gettimeofday() now calls GetSysTime() rather than DateStamp() to obtain
|
||
the current system time. This resolves granularity issues since the
|
||
DateStamp() result was only accurate by 1/50 of a second.
|
||
|
||
- The "ptrdiff_t" definition in <stddef.h> now defaults to type 'int' rather
|
||
than 'long int'.
|
||
|
||
- The "char" limits in <limits.h> are now set up according to the current
|
||
compiler settings, which can either default to an unsigned or
|
||
signed definition.
|
||
|
||
- Changed the rules again for the use of stderr/stdout redirection when
|
||
printing error messages. It is always safe to redirect them now and
|
||
no requester will appear unless you specifically set the value of the
|
||
"__no_standard_io" variable to TRUE in your program.
|
||
|
||
- Removed a misplaced IsInteractive() from the stdio initialization
|
||
function. Now this could have been big trouble...
|
||
|
||
- Removed tests for FileHandle->fh_Type != NULL which used to precede
|
||
all IsInterative() tests. I verified that IsInteractive() will always
|
||
return FALSE for NIL: type file handles.
|
||
|
||
- Dropped the special flag variable used by the abort() function that
|
||
tracks whether or not console output is possible. We now use the
|
||
global "__no_standard_io" instead.
|
||
|
||
- Made the <ctype.h> macros more robust.
|
||
|
||
- Removed the "NIL:" file handle tests preceding the Open("CONSOLE:",..)
|
||
calls. As of Kickstart 2.x and beyond these are no longer a source of
|
||
trouble.
|
||
|
||
- The V37/V40 compatibility code is no longer built for the AmigaOS4
|
||
version of the library.
|
||
|
||
- Switched over the last use of DeviceProc() to GetDeviceProc(), etc.
|
||
|
||
- open() no longer examines a file after opening it in order to figure
|
||
out whether read/write accesses are permitted. This decision is now
|
||
for the file system to make.
|
||
|
||
- Whether or not stdio console streams are blocking or non-blocking
|
||
is now determined at initialization time. The I/O mode is restored before
|
||
the program exits. Previously, any changes to the I/O mode would persist.
|
||
|
||
- Lost some more code that is not required for AmigaOS 4.x and can be
|
||
handled conveniently through conditional compilation.
|
||
|
||
- close() did not reset the non-blocking file property, as it should
|
||
have. This only worked for files which were closed anyway, but not
|
||
for the stdio streams. Fixed.
|
||
|
||
- Added a missing definition to stdio_init_exit.c which is part of
|
||
the OS4 header files, but not of the older header file distributions.
|
||
|
||
|
||
|
||
c.lib 1.185 (2.1.2005)
|
||
|
||
- Moved the environment variable cleanup code into a destructor function.
|
||
|
||
- Fixed a typo in the hstrerror() function.
|
||
|
||
- The common error reporting function __show_error() could throw Enforcer
|
||
hits if the program was not launched from Shell. Fixed.
|
||
|
||
- Moved the memory initialization and cleanup functions into the
|
||
malloc/free code itself and updated the alloca code to do its
|
||
own data management.
|
||
|
||
- Finally optimized the alloca() memory cleanup code.
|
||
|
||
- Tried to make it possible to have debug versions of the memory
|
||
management code in the default link library along with the
|
||
normal versions. Let's see how well this works out in the GCC
|
||
version. SAS/C does not seem to like it...
|
||
|
||
- Changed the definition of alloca() for GCC, which now defaults
|
||
to the built-in function.
|
||
|
||
- Updated the stdio.h, stdlib.h, string.h and unistd.h header files
|
||
to declare function prototypes for the __MEM_DEBUG versions of the
|
||
library functions only if that preprocessor symbol is defined.
|
||
|
||
- If a SIGINT signal is caught and processed by the default signal
|
||
handler, the localized "*** BREAK" string will be printed rather
|
||
than the built-in one.
|
||
|
||
- The data structure alignment (file I/O buffer) is now configurable
|
||
at compile time. The default used to be 16 bytes, which is appropriate
|
||
for the 68040/68060 but not for the PowerPC, which uses 32 or 128
|
||
bytes per cache line.
|
||
|
||
- fwrite() now flushes the entire "buffer" for unbuffered files. The
|
||
exception are "interactive" files such as console windows. For these
|
||
line buffered output is used.
|
||
|
||
- Whether or not a file is bound to an interactive device, such as a
|
||
console window, is now checked and remembered after a file descriptor
|
||
has been associated with it.
|
||
|
||
|
||
c.lib 1.184 (28.11.2004)
|
||
|
||
- Added asctime_r(), ctime_r(), gmtime_r(), localtime_r() and strtok_r().
|
||
|
||
- Added stubs for the Rexx Variables Interface code that used to
|
||
be part of amiga.lib. While comparable functionality is available
|
||
in rexxsyslib.library V45, the new stubs might be helpful during
|
||
porting. Care must be taken since these functions don't work
|
||
exactly like the originals.
|
||
|
||
- Integrated strlcpy() and strlcat() which are intended to be safer
|
||
replacements for strncpy() and strncat().
|
||
|
||
- The program's task priority is now configurable through an external
|
||
variable '__priority'.
|
||
|
||
- The process name to be used when detaching can be configured through
|
||
the new '__process_name' variable.
|
||
|
||
- The minimum required operating system version can be configured
|
||
through the new '__minimum_os_lib_version' variable; a matching
|
||
error message can be provided through the new '__minimum_os_lib_error'
|
||
variable.
|
||
|
||
- The default console window specification can be overriden through
|
||
the new '__stdio_window_specification' variable.
|
||
|
||
- The socket initialization code did not set up a reference to the
|
||
'h_errno' variable correctly. This had the effect of making name
|
||
and address resolution errors trash the 'errno' variable instead
|
||
and leaving 'h_errno' always set to 0. Fixed.
|
||
|
||
- For sockets, ioctl() and fcntl() now interact on the FIONBIO/FIOASYNC
|
||
requests (ioctl) and the O_NOBLOCK/O_ASYNC flags (fcntl).
|
||
|
||
- popen() now accepts "rb" and "wb" as mode parameters. However, "r+",
|
||
"w+" and variants thereof are still unsupported due to the
|
||
unidirectional pipe support in the standard "PIPE:" device.
|
||
|
||
|
||
c.lib 1.183 (13.11.2004)
|
||
|
||
- Cleaned up the OS4 build makefile, losing redundant libraries,
|
||
adding more startup object code and ultimatively making the whole
|
||
rebuild logic work again: if code changes and dependencies are
|
||
set up correctly, it will now get rebuilt. Previously, such
|
||
changes went unnoticed and you had to rebuild the entire library
|
||
from scratch.
|
||
|
||
- Added stubs for CreatePort(), DeletePort(), CreateTask(), DeleteTask()
|
||
and NewList() which have equivalents in exec.library V50 but for which
|
||
it might be useful if ported code didn't have to reference these
|
||
explicitly.
|
||
|
||
- mktemp() was broken in libunix.a with Unix path semantics enabled.
|
||
This was because the name template was translated and translated
|
||
back again, overwriting the translation buffer. This, funny enough,
|
||
broke Samba's printing feature. Fixed by translating the name only
|
||
before each test for "uniqueness" is made. The new code also handles
|
||
empty "" templates gracefully, which was a problem with both the
|
||
"standard" and the Unix path semantics flavour.
|
||
|
||
Why is it that I find bugs like this always after having just
|
||
released another library update?
|
||
|
||
|
||
c.lib 1.182 (8.11.2004)
|
||
|
||
- Changed the error abort condition for the %s conversion of the
|
||
scanf() family. It now matches the abort conditions for all other
|
||
conversions and no longer ignores whether any other parameters were
|
||
converted before. This was a quirk in the older implementation.
|
||
|
||
- The scanf() family now accepts %E and %G in place of %f and %X in
|
||
place of %x.
|
||
|
||
- Simplified the common code that fopen(), freopen() and fdopen()
|
||
share and which has to figure out by looking at a file access
|
||
mode specification which parameters should be used.
|
||
|
||
- Dropped error detection in the scanf() family. The EOF has to be
|
||
good enough. Also, ungetc() failure still leads to error handling.
|
||
|
||
|
||
|
||
c.lib 1.181 (26.10.2004)
|
||
|
||
- The scanf() family now always returns the number of assignments made
|
||
unless an error occured or an EOF was hit during conversion before the
|
||
first assignment could be made.
|
||
|
||
- strtok() did not terminate properly if the last token in the string
|
||
did not end with a separator character but with a '\0' byte. Fixed.
|
||
|
||
- The directory scanning functions opendir/closedir did not get the global
|
||
directory data tracking data structure initialized which later led to
|
||
Enforcer hits and maybe trashed memory. Fixed.
|
||
|
||
|
||
c.lib 1.180 (23.10.2004)
|
||
|
||
- The printf() family now produces no output at all for %e, %f and %g if the
|
||
floating point support code is disabled. Previously, a minimum field width
|
||
specification could take effect, printing a series of 0 or blank space
|
||
characters where no output should have been produced.
|
||
|
||
|
||
c.lib 1.179 (22.10.2004)
|
||
|
||
- The scanf() family no longer assumes that a leading '0' indicates that the
|
||
following digits form an octal number if the conversion type has been
|
||
specified as already '%x' already.
|
||
|
||
|
||
c.lib 1.178 (7.10.2004)
|
||
|
||
- The OS4 version had floating point math support code enabled in all
|
||
libraries and not just "libm.a". Fixed.
|
||
|
||
|
||
c.lib 1.177 (29.9.2004)
|
||
|
||
- Moved the locale initialization/cleanup code into constructors
|
||
and destructors.
|
||
|
||
- The socket cleanup function is now a destructor.
|
||
|
||
- The math cleanup function is now a destructor.
|
||
|
||
- The wildcard cleanup function is now a destructor.
|
||
|
||
- The stdio cleanup function is now a destructor.
|
||
|
||
- The stack extension cleanup function is now a destructor.
|
||
|
||
- The code that cleans up after the program's current directory
|
||
was changed is now a destructor function.
|
||
|
||
- Moved the initialization/cleanup code for unlink() into constructors
|
||
and destructors.
|
||
|
||
- Moved the initialization/cleanup code for usergroup.library into
|
||
constructors and destructors.
|
||
|
||
- Added usleep(), and created wrapper code that both sleep() and
|
||
usleep() can use.
|
||
|
||
- Added strtoll() and strtoull(), with further changes to <limits.h>
|
||
and <stdlib.h>.
|
||
|
||
- The socket exit code now calls the common stdio function which
|
||
flushes and shuts down all buffered and unbuffered files.
|
||
|
||
- Fixed the stack swapping function which, for reasons unknown, ceased
|
||
to work...
|
||
|
||
- The start time used by clock() is now initialized by a constructor
|
||
function.
|
||
|
||
- NOTE THAT ALL THE CHANGES WITH REGARD TO USE OF DESTRUCTOR AND
|
||
CONSTRUCTOR FUNCTIONS REQUIRE A COMPLETE REBUILD OF THE LIBRARY! IF
|
||
YOU DO NOT DO THIS, THE CONSTRUCTOR/DESTRUCTOR FUNCTIONS MAY NOT
|
||
GET CALLED.
|
||
|
||
|
||
c.lib 1.175 (10.9.2004)
|
||
|
||
- <stdarg.h> now tries to use the compiler supplied, machine specific
|
||
<stdarg.h> file and also includes the OS4-specifc <sys/amigaos-va.h>
|
||
file, if necessary.
|
||
|
||
- Added another test to <sys/time.h> to check if the "timeval" definition is
|
||
already in place. If it is, <exec/types.h> will not be included.
|
||
|
||
- <sys/time.h> can be made to define the timeval data structure locally if
|
||
the __USE_CLIB2_TIMEVAL preprocessor symbol is defined. In this case no
|
||
<exec/types.h> or <devices/timer.h> file will be read.
|
||
|
||
- The sprintf() family did not properly handle empty strings as format
|
||
specifications. This would result in a necessary buffer flush action
|
||
getting skipped, which consequently did not put the string termination
|
||
character into the output buffer.
|
||
|
||
|
||
c.lib 1.174 (27.8.2004)
|
||
|
||
- The parameters of atan2() were swapped. Fixed.
|
||
|
||
- Merged fdlibm 5.3 changes with __kernel_tan(), __exp() and __pow()
|
||
functions.
|
||
|
||
- Replaced the rint() and rintf() functions with the fdlibm code.
|
||
|
||
|
||
c.lib 1.173 (25.8.2004)
|
||
|
||
- The <assert.h> header file was missing the C++ 'extern "C" { .. }'
|
||
declarations.
|
||
|
||
- Added a new function __get_default_file() which allows direct access
|
||
to the low level file handle/socket descriptor associated with a
|
||
file descriptor.
|
||
|
||
|
||
c.lib 1.172 (21.8.2004)
|
||
|
||
- acos() now returns 0 for a domain error.
|
||
|
||
- asin() now returns 0 for a domain error.
|
||
|
||
- atan2() now returns 0 for a domain error.
|
||
|
||
- fmod() now returns x if y == 0 and sets a
|
||
domain error.
|
||
|
||
- sqrt() now returns 0 for a domain error.
|
||
|
||
- Added NaN and +Inf constants to the math library
|
||
initialization code which could come in handy later.
|
||
|
||
|
||
c.lib 1.171 (16.8.2004)
|
||
|
||
- Added "math_hypot.c"
|
||
|
||
- The 68k build makefile now builds the vfprintf/vfscanf functions
|
||
with %lld/%llu support.
|
||
|
||
- Split the release notes file into changes and actual release notes,
|
||
which may overlap but differ in technical content.
|
||
|
||
|
||
c.lib 1.170 (14.8.2004)
|
||
|
||
- Added "math_logb.c", and it appears to work, too.
|
||
|
||
|
||
c.lib 1.169 (8.8.2004)
|
||
|
||
- Since the 'long double' data type is not really supported by the GCC
|
||
versions we use (and not supported by SAS/C either) building the
|
||
library with support code for it is now a configurable option. Unless
|
||
enabled, 'long double' is now treated like 'double'.
|
||
|
||
- Reworked the HUGE_VAL definition which previously would default to
|
||
Infinity. The new code properly defines this to the largest
|
||
representable floating point number. The 'great' thing about the
|
||
HUGE_VAL definition in this library is that it's a reference to
|
||
a binary constant initialized by the library startup code. So any
|
||
application checking for HUGE_VAL merely needs to be relinked
|
||
rather than recompiled.
|
||
|
||
|
||
c.lib 1.168 (7.8.2004)
|
||
|
||
- Ditched __is_infinity() and __is_not_a_number(), brought them back
|
||
as isinf() and isnan().
|
||
|
||
- Updated code and header files to state exactly which ISO 'C' version
|
||
is meant by the "The following is not part of the ISO 'C' standard."
|
||
warning.
|
||
|
||
- Integrated rint() and rintf().
|
||
|
||
|
||
c.lib 1.167 (29.7.2004)
|
||
|
||
- Modified __is_infinity() and __is_not_a_number() to use more portable
|
||
methods for accessing the low level representation of the IEEE 754
|
||
numbers they work on.
|
||
|
||
- Fixed a compiler warning in h_strerror()
|
||
|
||
|
||
c.lib 1.166 (28.7.2004)
|
||
|
||
- Added h_strerror() function to libnet.a; there's a global 'h_errno'
|
||
variable available, too.
|
||
|
||
- <signal.h> now defines a type 'sig_t'.
|
||
|
||
- <unistd.h> now allows the 'fd_set' type to be referenced as
|
||
'struct fd_set', too.
|
||
|
||
|
||
c.lib 1.165 (26.7.2004)
|
||
|
||
- In printf(), if the precision is 0 and the value to be printed for
|
||
the %d, %i, %u, %o and %x conversion types is 0, no output should
|
||
be produced. Fixed.
|
||
|
||
- Fixed the rounding for %g (again). The maximum number of significant
|
||
digits produced by a precision given for %g is different for numbers
|
||
< 1.0 and those >= 1.0: the leading 0 for numbers < 1.0 does not count
|
||
as a significant digit.
|
||
|
||
- The calculation of the number of leading digits in a floating point
|
||
number now uses a mixture of log10() and a fall-back just in case
|
||
log10() returns gunk.
|
||
|
||
- For floating point numbers, the sign, the digits, trailing zeroes
|
||
and the exponent are now set up and 'assembled' separately. This
|
||
removes the artificial limitation of floating point numbers to
|
||
a maximum of 78 digits to follow the decimal point.
|
||
|
||
|
||
c.lib 1.164 (25.7.2004)
|
||
|
||
- The precision given for the printf() %g conversion types determines the
|
||
number of digits to generate, not the number of digits to follow the
|
||
decimal point. Fixed. The GCC FPU code generation now works again.
|
||
Previously, the floating point number conversion crashed cc1 since the
|
||
output amounted to 32 digits plus a terminating NUL, which overran the
|
||
30 byte buffer sprintf() stored the output in. My, this was very hard
|
||
to find :(
|
||
|
||
- Restored the floor() loop to figure out the size of the integer part
|
||
of a floating point number. For some strange reason, the log10() function
|
||
can return HUGE_VAL for numbers >= MAX_INT if mathieeedoubtrans.library
|
||
is involved. This crashes the conversion, which has the effect of making
|
||
the number come out as 0 rather than MAX_INT. Now that was nasty, too :(
|
||
|
||
|
||
c.lib 1.163 (25.7.2004)
|
||
|
||
- Simplified the %e/%f/%g conversion some more. We now call log10 and pow
|
||
instead of looping and scaling the floating point number to be printed.
|
||
|
||
|
||
c.lib 1.162 (25.7.2004)
|
||
|
||
- Simplified the floating point number output code in vfprintf().
|
||
Instead of two separate branches handling output for the %e and
|
||
%f conversion types, the two now share the same code.
|
||
|
||
|
||
c.lib 1.161 (24.7.2004)
|
||
|
||
- Dropped all the non-public source code fragments from the library,
|
||
including the memory pools, ARexx variable support and asyncio
|
||
functionality.
|
||
|
||
|
||
c.lib 1.160 (24.7.2004)
|
||
|
||
- fputc() never flushed the output buffer if the stream in question
|
||
was unbuffered.
|
||
|
||
- Rewrote puts() not to call fputs(). This avoids flushing the output
|
||
buffer twice if stdout is unbuffered.
|
||
|
||
|
||
c.lib 1.159 (23.7.2004)
|
||
|
||
- Trying to open a directory like a file now reliably produces the
|
||
error code EISDIR. Previously, the error code could have come
|
||
out as ENOTDIR instead.
|
||
|
||
|
||
c.lib 1.158 (21.7.2004)
|
||
|
||
- freopen() was broken since it tried to reuse data from an already
|
||
closed stream. Fixed.
|
||
|
||
- Fixed a number of small compiler problems resulting from debug
|
||
output code that had never been exercised, or was not adapted to
|
||
subsequent code changes.
|
||
|
||
- You can now enable debug output and have assertions come out
|
||
correctly.
|
||
|
||
|
||
c.lib 1.157 (21.7.2004)
|
||
|
||
- The file hook message action "file_hook_action_write_and_flush" was
|
||
not handled properly by the socket and scanf/printf hooks. Fixed.
|
||
|
||
- Removed a few assertions from the select() wrapper code which
|
||
prevented it from working properly.
|
||
|
||
- Changed the stdio buffered I/O flushing code so that data can stay
|
||
in the cache, if necessary, rather than get written to disk. This
|
||
should help the asynchronous I/O feature.
|
||
|
||
|
||
c.lib 1.156 (21.7.2004)
|
||
|
||
- Brought back the __unix_path_semantics variable. If you link with
|
||
-lunix and set this variable to FALSE, you'll still get Unix-like
|
||
behaviour from certain routines, only the translations of Unix<->Amiga
|
||
path name semantics will be disabled, leaving you with Amiga path
|
||
semantics.
|
||
|
||
- sscanf(), asprintf(), vasprintf(), snprintf(), vsnprintf(), sprintf()
|
||
and vsprintf() now use short local buffers to speed up conversion rather
|
||
than a single measly byte.
|
||
|
||
- opendir() now avoids returning duplicate volume names.
|
||
|
||
|
||
|
||
c.lib 1.155 (21.7.2004)
|
||
|
||
- Lost all special case code which took care of unbuffered output
|
||
and input. The new implementation works by using one byte of
|
||
buffer, which is part of the iob structure. Unbuffered output
|
||
is produced by 'flushing' the buffer once data has been written
|
||
to it. The new code also has the advantage of making ungetc()
|
||
work on unbuffered streams.
|
||
|
||
NOTE THAT THIS MEANS THAT THE ENTIRE LIBRARY NEEDS TO BE REBUILT!
|
||
|
||
- Each FILE buffer now sports back-link information which can be
|
||
tested to verify that it is valid.
|
||
|
||
|
||
c.lib 1.154 (21.7.2004)
|
||
|
||
- fwrite() has to call fputc() for each byte to be written. Oops...
|
||
fwrite() no longer changes the file position if a write access
|
||
went wrong. Trying to write to a stream which is not available
|
||
for writing now counts as an error.
|
||
|
||
- fread() has to call fgetc() for each byte to be read. fread() no
|
||
longer changes the file position if a partial read would yield
|
||
fewer data than is necessary to fill an element. Trying to read
|
||
from a stream which is not available for reading now counts as
|
||
an error.
|
||
|
||
- Lost all the code that tested if the hook pointer embedded in a
|
||
file descriptor table entry or buffered file was NULL. It
|
||
simply has to be a valid pointer.
|
||
|
||
|
||
c.lib 1.153 (19.7.2004)
|
||
|
||
- Oops: cli->cli_DefaultStack does not necessarily match the size
|
||
of the program's stack if it was launched from the shell and the
|
||
"$STACK:" keyword embedded in the program overrides the default
|
||
shell command stack size.
|
||
|
||
- Stack space allocated locally is now public rather than private
|
||
memory (although it probably should be private).
|
||
|
||
|
||
c.lib 1.152 (19.7.2004)
|
||
|
||
- Simplified the code that figures out how much stack space was
|
||
provided to the program when it was launched. The number does
|
||
not need to be absolutely accurate at the time it is calculated.
|
||
|
||
- vfprintf() now prints a pointer (%p) as if it were a hexadecimal
|
||
number with 8 digits (0x%08x).
|
||
|
||
|
||
c.lib 1.151 (18.7.2004)
|
||
|
||
- Oops: I mixed up the file descriptor and buffered I/O flags
|
||
in fflush() and __fill_iob_read_buffer().
|
||
|
||
|
||
c.lib 1.150 (18.7.2004)
|
||
|
||
- Checked the dos.library/InternalRunCommand() code to see if
|
||
the fiddling with Process->pr_ReturnAddresss is really necessary to
|
||
figure out how much stack space is available. Turns out that it
|
||
isn't under Kickstart 2.0 and beyond. Since this is what the library
|
||
requires, only the task lower/upper bound and the current stack
|
||
pointer address are consulted now.
|
||
|
||
- isascii() is now a macro.
|
||
|
||
|
||
c.lib 1.149 (17.7.2004)
|
||
|
||
- Reworked the ctype table layout and how the table is used by
|
||
the optional ctype macros.
|
||
|
||
|
||
c.lib 1.148 (17.7.2004)
|
||
|
||
- Changed the flag definitions used by buffered files.
|
||
|
||
NOTE THAT THIS MEANS THAT THE ENTIRE LIBRARY NEEDS TO BE REBUILT!
|
||
|
||
- Added new macros to <stdio.h> and <ctype.h> which replace functions
|
||
of the same name and which might be more efficient.
|
||
|
||
|
||
c.lib 1.147 (17.7.2004)
|
||
|
||
- Removed the isascii() macro and replaced it with a real function.
|
||
|
||
|
||
c.lib 1.146 (17.7.2004) <jlangner>
|
||
|
||
- added a missing isascii() define to the ctype.h include file
|
||
as it is quiet a common function macro and should be included
|
||
|
||
|
||
c.lib 1.145 (16.7.2004)
|
||
|
||
- Oops, I broke strncpy() *again*. Fixed.
|
||
|
||
|
||
c.lib 1.144 (16.7.2004)
|
||
|
||
- The file descriptor duplication code now sits in a separate
|
||
function rather than in the different file/socket descriptor
|
||
hooks.
|
||
|
||
- The code which reduces AmigaDOS path names by dropping path
|
||
components followed by two slashes now sits in a separate
|
||
function. Previously, it appeared twice in the Amiga<->Unix
|
||
path name translation code.
|
||
|
||
- Simplified the select() function considerably.
|
||
|
||
|
||
c.lib 1.143 (16.7.2004) <jlangner>
|
||
|
||
- added missing hook_entry object files to GNU OS4 makefile
|
||
|
||
- added required newlines "\n" to the 68k GNU inline assembler
|
||
functions to make them compile with GCC version 3 and upwards.
|
||
|
||
|
||
c.lib 1.142 (15.7.2004)
|
||
|
||
- ferror() does not return the code of the error for the stream
|
||
which ran into trouble, it merely signals that an error occured.
|
||
There goes another iob state variable.
|
||
|
||
NOTE THAT THIS MEANS THAT THE ENTIRE LIBRARY NEEDS TO BE REBUILT!
|
||
|
||
- Removed all the code that set the value of 'errno' to 0.
|
||
|
||
- Likewise, removed all the code that reset the error condition
|
||
that might have been set for a file. The only function which
|
||
can do that is clearerr().
|
||
|
||
- No functions other but clearerr(), ungetc() and fseek() clear the
|
||
'eof detected' flag now.
|
||
|
||
- Simplified vfprintf() some more, merging the %x formatting code
|
||
with the other integer conversion code.
|
||
|
||
- vfscanf() now decides that with the %i conversion, a number is
|
||
in octal notation if the first digit converted is a 0 and there
|
||
is no 'x' or 'X' character following it.
|
||
|
||
- vfscanf() no longer counts '%n' as an assignment/conversion operation.
|
||
|
||
- Rewrote strtol() and strtoul() again. The overflow detection is
|
||
now different in both routines and they avoid performing a
|
||
conversion if the base is 1 (which would lead to an infinite
|
||
loop). Also, the possible base values are limited to <= 36 and
|
||
letters in the range a..z are allowed, too.
|
||
|
||
- All buffered streams which hold data and which operate in line buffering
|
||
mode are now flushed before the buffer of a line buffered input stream
|
||
is filled.
|
||
|
||
- fflush() now flushes all buffered files if the stream parameter
|
||
is NULL.
|
||
|
||
- Unlike fgets(), gets() does *not* put the terminating '\n' character
|
||
into the buffer. Fixed.
|
||
|
||
- rewind() now clears both the 'end of file' and error indicator flags.
|
||
|
||
- Replaced all memcpy() calls with memmove().
|
||
|
||
- Cleaned up error code translation and forwarding within the hook
|
||
functions. Instead of mucking around with the global errno variable,
|
||
the hook functions now return the error code as part of the hook
|
||
message. The error code translation is now done entirely through
|
||
two functions rather than one function, which fiddled with the
|
||
global errno variable, and local code which, if necessary, translated
|
||
ERROR_OBJECT_WRONG_TYPE into ENOTDIR.
|
||
|
||
NOTE THAT THIS, TOO, MEANS THAT THE ENTIRE LIBRARY NEEDS TO BE REBUILT!
|
||
|
||
- Lost the unconditional address alignment test in the qsort() data
|
||
swapping routine. If the code is built for an 68020 and beyond, it
|
||
is replaced by a no-op.
|
||
|
||
|
||
c.lib 1.141 (14.7.2004)
|
||
|
||
- Rewrote the buffered file I/O code, and in particular how the read
|
||
access interacts with the file's state information. Rather than
|
||
counting how many bytes can be read from the buffer still, the
|
||
new code checks the buffer position against the number of bytes
|
||
stored in the buffer. This makes maintenance easier since only
|
||
one state variable needs to be modified at a time.
|
||
|
||
Note that this means that code which would use the getc() macro
|
||
needs to be rebuilt!
|
||
|
||
- The pid_t type used by kill() and returned by getpid() is now
|
||
really a Process address pointer. It used to be a CLI number.
|
||
|
||
|
||
c.lib 1.140 (12.7.2004)
|
||
|
||
- The stack alignment code used when reallocating new stack space and
|
||
swapping it with the current configuration pushed the end of the
|
||
stack beyond the boundaries of the allocated stack. This crashed
|
||
in no time at all, but sometimes it just about worked without
|
||
blowing up. The fixed code is simpler than before and now initializes
|
||
both the lower and the upper stack boundaries to be aligned to
|
||
multiples of 16 bytes.
|
||
|
||
|
||
c.lib 1.139 (11.7.2004)
|
||
|
||
- snprintf/vsnprintf were broken: instead of limiting output to
|
||
the size given as a parameter, data beyond the end of the buffer
|
||
was trashed.
|
||
|
||
|
||
c.lib 1.138 (11.7.2004)
|
||
|
||
- Greatly simplified the vfscanf() code. Added new code which
|
||
initializes each parameter before the conversion begins.
|
||
This should help software which tosses data at scanf()
|
||
and expects it to come back initialized without checking for
|
||
the function's return code.
|
||
|
||
- The vfscanf() '%f' conversion method could have consumed one
|
||
more character than it was really allowed to. Fixed.
|
||
|
||
- If vfscanf() is built without floating point support, the
|
||
'%f' conversion method now properly pulls the respective
|
||
floating point number from the stack but performs no
|
||
conversion and does not modify the contents of the
|
||
variable.
|
||
|
||
|
||
c.lib 1.137 (11.7.2004)
|
||
|
||
- Moved the initialization for the stack size checking out
|
||
of the _main() code and into its own initialization function
|
||
where it belongs. That way, the test also works for programs
|
||
that detach from the shell.
|
||
|
||
- The '%g' and '%G' vfprintf() format specifiers now have the
|
||
effect of stripping trailing 0 and . characters in the number
|
||
string produced. Previously, this effect was also enabled for
|
||
the '%f', '%e' and '%E' formats.
|
||
|
||
- Greatly simplified the vfprintf() code and verified that the
|
||
output matches the requirements.
|
||
|
||
|
||
c.lib 1.136 (9.7.2004)
|
||
|
||
- Dropped in loads more of assertions to check the validity of
|
||
files and descriptors.
|
||
|
||
|
||
c.lib 1.135 (6.7.2004)
|
||
|
||
- Fixed the last two issues in puts() and fputs() caused by the
|
||
bug fix I made to fputc() which would not return the character
|
||
value passed in. Occasionally, this could cause puts() to omit
|
||
the trailing '\n'.
|
||
|
||
|
||
c.lib 1.134 (4.7.2004)
|
||
|
||
- Simplified and reordered the init/exit procedure in "stdlib_main.c".
|
||
Initializations which could be done on the spot when required are
|
||
no longer performed that early on. The stdio initialization is
|
||
performed earlier so that error messages can be printed using
|
||
stdio methods.
|
||
|
||
- A stack overflow can no longer turn into an infinite loop.
|
||
|
||
- Removed some more redundant data from the memory management data
|
||
structures.
|
||
|
||
- The temporary file cleanup in fclose() did not properly turn off
|
||
profiling. Fixed.
|
||
|
||
- Both close() and fclose() now fill their data structures with 0
|
||
bytes before they return.
|
||
|
||
- The tables for the file descriptors and buffered files are now
|
||
allocated dynamically.
|
||
|
||
- If the asynchronous I/O options is not in effect, then the
|
||
global file data structures will not include a pointer to
|
||
the AsyncFile.
|
||
|
||
- Lost some duplicate code from the locale cleanup routines.
|
||
|
||
- Simplified the code that picks a vacant file descriptor table
|
||
slot.
|
||
|
||
- NOTE: YOU NEED TO REBUILD THE ENTIRE LIBRARY IF YOU WANT TO USE
|
||
THESE CHANGES!
|
||
|
||
|
||
c.lib 1.133 (4.7.2004)
|
||
|
||
- The memory routines no longer look up the management data structures
|
||
before they deallocate or modify an allocated memory chunk. This is
|
||
now done only in the debug version of the library.
|
||
|
||
- Moved the code that performs memory deallocations in the debug and
|
||
nodebug versions of the library. Instead of separate functions, a
|
||
single common routine is used.
|
||
|
||
- When launched from shell, the program's name is no longer allocated
|
||
through malloc() but through AllocVec(), and released separately later.
|
||
This helps the memory debug code which otherwise wouldn't be able to
|
||
print meaningful information when starting up and shutting down.
|
||
|
||
- You can now get additional information out of the memory debugging
|
||
code, covering the locations where memory is allocated and released,
|
||
including how much memory is involved.
|
||
|
||
- The month and day names used by the time conversion code are now
|
||
declared as 'const'.
|
||
|
||
- Replaced all uses of the EPERM error code with EACCES.
|
||
|
||
|
||
|
||
c.lib 1.132 (26.6.2004)
|
||
|
||
- abort() and raise() now call a common termination routine.
|
||
|
||
- Chopped the math_kernel.c code into individual files. Some local constant
|
||
values had to be duplicated, but so there...
|
||
|
||
- Lost "smakefile.old" and "math_kernel.c".
|
||
|
||
- Got rid of more compiler warnings...
|
||
|
||
- Fixed a typo in the "stdlib_headers.h" header file.
|
||
|
||
- In libdebug.a, for 'va_arg()' to work with 'char' type parameters, these must
|
||
be picked up as type 'int' from the stack. Otherwise we get a linker error later...
|
||
This should finally make the PowerPC 'native' kprintf() function work.
|
||
|
||
|
||
c.lib 1.131 (21.6.2004)
|
||
|
||
- The '%i' conversion method in the scanf() family did not take
|
||
a leading '0' properly into account when updating the number of
|
||
letters to be read and processed.
|
||
|
||
- If the '%c' conversion method reads fewer than the required
|
||
characters, it stops the conversion rather than aborting it
|
||
with an error.
|
||
|
||
- The scanf() family now watches more carefully what data it still
|
||
requires to satisfy a conversion. For example, while it may accept
|
||
a '-' character to indicate that a sign is given to the number to
|
||
follow, if there is no number to follow will trigger an error
|
||
condition.
|
||
|
||
|
||
c.lib 1.130 (20.6.2004)
|
||
|
||
- The scanf() family now returns EOF if an error was detected
|
||
(not just an end of file) or if the stream ended before a
|
||
conversion could be performed.
|
||
|
||
- The file type reported by stat() did not really take pipes into
|
||
account. Fixed.
|
||
|
||
- Cleaned up the data structure definitions and references. This turned
|
||
up a bug in the Unix<->Amiga path name translation which would use
|
||
a local data structure which was larger than the public version. Fixed.
|
||
|
||
|
||
c.lib 1.129 (18.6.2004)
|
||
|
||
- Added a free memory threshold test feature to malloc(); how it works
|
||
is described in <dos.h>.
|
||
|
||
- The PowerPC debug.lib now calls RawPutChar() and RawMayGetChar()
|
||
through the 68k LVO. This should finally make kprintf() and friends
|
||
usable on the PowerPC.
|
||
|
||
- The asyncio code now defaults to allocate at least twice as much
|
||
memory as a buffered file would require (so that double buffering
|
||
can be used). Also, the fundamental asyncio support functions require
|
||
that enough memory is allocated to allow for four disk blocks to
|
||
be read at a time.
|
||
|
||
- When opening a file for asynchronous I/O access, both read-only and
|
||
write-only access is supported now. Previously, the functionality
|
||
was limited to read-only access.
|
||
|
||
|
||
c.lib 1.128 (14.6.2004)
|
||
|
||
- Moved the stack size usage reporting code again so that the name of
|
||
the program can be printed correctly. Also, the data from the
|
||
initial stack size swapping is now cached until it is used.
|
||
|
||
- Reordered the resource allocations and initializations in tmpname()
|
||
to make error recovery more robust.
|
||
|
||
|
||
c.lib 1.127 (13.6.2004)
|
||
|
||
- Truncating a file to size 0 was, if successful, considered a failure.
|
||
Fixed.
|
||
|
||
- ftruncate() no longer changes the file position.
|
||
|
||
- Advisory record locking now checks if the lock should be shared or
|
||
exclusive and verifies that the file open mode supports this access
|
||
mode.
|
||
|
||
- Negative record lengths are now supported in the advisory record
|
||
locking code.
|
||
|
||
|
||
c.lib 1.126 (13.6.2004)
|
||
|
||
- Unless Unix path semantics are in use, lseek() no longer defaults
|
||
to 'seek and extend' operation.
|
||
|
||
- There are no longer two separate functions to take care of 'seek'
|
||
and 'seek and extend' operations.
|
||
|
||
- The Unix-like lseek() behaviour now takes advantage of cached
|
||
file seek position information. Previously, it just ignored it.
|
||
|
||
- The 'truncate' file action now makes sure that once the size of
|
||
the file has been trimmed, the new file position refers to the
|
||
end of the file. There also was a problem with growing the size
|
||
of the file which could have started at the wrong file offset.
|
||
|
||
- The advisory file locking code now handles integer overflows
|
||
gracefully when the end of a locked region is to be calculated.
|
||
In this case, the end is assumed to be the (2^31)-1st byte.
|
||
Also, when removing a lock the search for the locked region in
|
||
question keys off the start position and the length rather than
|
||
the start position and the adjusted end position.
|
||
|
||
- Added more sanity checks to file system operations which invariably
|
||
have to deal with FileHandle->fh_Type.
|
||
|
||
- Rewrote the Unix->Amiga path name translation function again.
|
||
|
||
|
||
c.lib 1.125 (13.6.2004)
|
||
|
||
- Rewrote the Amiga->Unix path name conversion code. Double slashes are
|
||
translated more robustly into '../' and the translation of the volume
|
||
name and the path to follow it are now done separately. The current
|
||
directory name ("") could wind up getting translated to a string pointing
|
||
into a local buffer. Fixed. Also, the new code knows how to translate
|
||
":" to a path relative to the current directory (if that directory is
|
||
defined by an absolute path name).
|
||
|
||
- The code that parsed and initialized the command line parameter
|
||
array to be passed to the main() function made different assumptions
|
||
during the counting and the initialization of the different parameters.
|
||
Fixed.
|
||
|
||
- snprintf() and vsnprintf() now handle zero length buffer
|
||
sizes properly.
|
||
|
||
- The stack size usage measuring code got broken when the
|
||
constructor/destructor mechanism was reimplemented. It
|
||
now works again.
|
||
|
||
|
||
c.lib 1.124 (12.6.2004)
|
||
|
||
- Dropped the fseek() optimization for files with a write buffer. This
|
||
feature had little impact, but complicated buffer management enormously.
|
||
|
||
- In fputc(), __fputc(), fwrite(), __flush(), etc. and the functions which
|
||
build upon them flushing the buffer now always takes place before new data
|
||
is pushed into the buffer. The exception is fputc()/__fputc() which can
|
||
flush the buffer if the file is in line buffering mode and a line feed
|
||
character has just been written. Also, failure to flush the buffer now
|
||
implies that the character/data to be stored in the respective function
|
||
was not successful. Previously, the different functions either stored the
|
||
data in the cache before and/or after the buffer was flushed, making it
|
||
difficult to tell if it had been written. Which in turn made it impossible
|
||
to recover from the failure since you could not be sure if another attempt
|
||
to store that data would really store it at the proper file position.
|
||
|
||
- mktime() now insists that the year must be 1978 or later.
|
||
|
||
- In debug.lib, KPutFmt() and the functions which build upon it now
|
||
should work even on the PowerPC. This works by analyzing the format
|
||
string and by converting the parameters to fit into a table whose
|
||
contents RawDoFmt() can handle.
|
||
|
||
- For the asyncio code, all write accesses immediately flushed the buffer,
|
||
thus nullifying any advantage the asynchronous I/O might have provided.
|
||
Fixed.
|
||
|
||
- The optimized memset(), memcpy() and memmove() functions now use
|
||
displacement addressing rather than post- and preincrement in the
|
||
unrolled loop. This should help strictly pipelined processors. It
|
||
does not seem to make any difference at all for the 68060, though.
|
||
|
||
- The locale cleanup code now separately closes the specific locales
|
||
and the 'all' locale.
|
||
|
||
|
||
c.lib 1.123 (12.6.2004)
|
||
|
||
- The distribution license no longer requires that for binaries using
|
||
the library a mention of the license text is mandatory.
|
||
|
||
- closedir() now checks for a NULL pointer and backs out if it finds
|
||
one.
|
||
|
||
- opendir() now exits with an error if it cannot allocate enough memory
|
||
for a volume name to be added to the list.
|
||
|
||
- readdir() now checks for a NULL pointer and backs out if it finds one.
|
||
|
||
- readdir() no longer builds with volume list scanning code unless
|
||
Unix path compatibility is enabled.
|
||
|
||
- rewinddir() now ignores a NULL directory pointer.
|
||
|
||
- strncmp() now treats the parameters as strings of unsigned characters.
|
||
|
||
- strdup() no longer traverses the string to be copied twice to figure
|
||
out how much data needs to be copied.
|
||
|
||
- strerror() now knows how to produce an error message for error
|
||
code 0x80000000.
|
||
|
||
- strtol() and strtoul() always need to initialize the 'ptr'
|
||
parameter before they exit, not just when they succeed.
|
||
|
||
- fputc() did not return the character value written, but 0. Fixed.
|
||
|
||
- fputs() now returns EOF if it couldn't flush the write buffer,
|
||
if that was necessary.
|
||
|
||
- fseek() no longer changes the value of the global 'errno' variable,
|
||
as required by the specification.
|
||
|
||
- fseek() now sets the buffer position to 0 if the number of bytes that
|
||
can be read from the buffer drops to 0. This avoids clashes with write
|
||
access to the same file.
|
||
|
||
- ftell() now always sets the global 'errno' variable to a well-defined
|
||
value.
|
||
|
||
- fwrite() now tries to seek back to the original file position if
|
||
flushing the buffer failed. This complements similar code in fread().
|
||
|
||
- fwrite() no longer flushes the buffer before it returns. It appears
|
||
that this behaviour is not mandated by the specifications. The
|
||
buffer will only be flushed upon entry, and even then only to make
|
||
room for new data to be stored.
|
||
|
||
- fread() now preserves error status information when recovering from
|
||
a failed buffer fill attempt. Previously, the error status information
|
||
would revert to 'no error' during this task.
|
||
|
||
- mktemp() now also adds the current Task address to the seed value that
|
||
goes into the creation of the temporary name.
|
||
|
||
- If dup2() fails to close a file, if that is necessary, it will return
|
||
an error rather than ignoring the failure.
|
||
|
||
- Lost a return statement in dup2(). Also, growing the size of the
|
||
file descriptor table can now be aborted with ^C.
|
||
|
||
- In fcntl(), growing the size of the file descriptor table can now be
|
||
aborted with ^C.
|
||
|
||
|
||
c.lib 1.122 (1.6.2004)
|
||
|
||
- Lost the NULL tests in front of all UnLock() and FreeDeviceProc() calls.
|
||
|
||
- The command line is now trimmed, dropping leading and trailing
|
||
blank spaces.
|
||
|
||
- The ftruncate() functionality did not write 0 bytes to the file
|
||
being extended. Fixed.
|
||
|
||
- popen() allocated a few bytes less than necessary for the command
|
||
name and the parameters.
|
||
|
||
- Neither popen() nor system() now quote the command name unless it
|
||
is really necessary.
|
||
|
||
|
||
c.lib 1.121 (30.5.2004)
|
||
|
||
- Made the memory debugging options a little more flexible and easier to
|
||
configure.
|
||
|
||
|
||
c.lib 1.120 (30.5.2004)
|
||
|
||
- The asynchronous I/O code was never actually used by the library. Fixed.
|
||
|
||
- Tweaked the realloc() code to take the memory allocation granularity into
|
||
account. This means, for example, that for small allocation sizes < 8 bytes
|
||
no reallocation will ever be performed since it wouldn't amount to anything.
|
||
This complements similiar code in malloc() which also rounds up allocation
|
||
sizes to the OS memory allocation granularity limits.
|
||
|
||
|
||
c.lib 1.119 (27.5.2004)
|
||
|
||
- Got rid of a few compiler warnings involving signed/unsigned integer
|
||
comparisons.
|
||
|
||
- Fixed a bug in the Unix->Amiga translation routine which would cause
|
||
file names such as './../foo' come out as '/foo' and end up being
|
||
translated to 'foo:'. The new code now takes care of removing leading
|
||
'./' and embedded '/./' segments before further processing is
|
||
performed on the name string.
|
||
|
||
- Fixed up the 68k GNUmakefile so that it builds properly.
|
||
|
||
|
||
c.lib 1.118 (26.5.2004)
|
||
|
||
- Rewrote those putc/__putc macros again...
|
||
|
||
- The vfprintf()/fputs() code did not properly test the result of
|
||
the __putc() function call. There should have been a test for
|
||
'!= EOF' rather than '== OK'.
|
||
|
||
|
||
c.lib 1.117 (26.5.2004)
|
||
|
||
- realloc() now checks the size of blocks to be shrunk. If the block
|
||
shrinks by less than half its current size, then no new memory
|
||
is allocated for it. This saves the need to allocate memory and to
|
||
move the data.
|
||
|
||
- Implemented an option to have the allocated memory chunks managed
|
||
by a balanced tree, sorted by address. This should help applications
|
||
which claim a lot of memory, possibly in small chunks, which get
|
||
allocated/released a lot. While this is still not quite as good as
|
||
having the low level memory management code use buddy lists or
|
||
slab allocation, it might still do the trick. This feature is
|
||
activated in "stdlib_headers.h" via the __USE_MEM_TREES preprocessor
|
||
symbol. You will need to rebuild the files stdlib_data.o, stdlib_free.o,
|
||
stdlib_init_exit.o, stdlib_malloc.o, and stdlib_red_black.o if you
|
||
change this.
|
||
|
||
- The size of the physical memory allocation chunks is now taken into
|
||
account when making memory allocations. This means that allocations
|
||
are rounded up to multiples of 8 bytes each.
|
||
|
||
|
||
c.lib 1.116 (26.5.2004)
|
||
|
||
- Reworked the putc/getc macro definitions, moved them behind the
|
||
function prototype declarations in <stdio.h>.
|
||
|
||
- The putc() macro did not return the same result as the equivalent
|
||
fputc() function would have done after flushing the buffer. The
|
||
new macro now calls a special flush routine which itself safely
|
||
returns the last character written.
|
||
|
||
|
||
c.lib 1.115 (24.5.2004)
|
||
|
||
- Prior to performing ^C checking, the respective routines now verify first
|
||
if ^C checking is enabled in the first place. This saves a function call.
|
||
|
||
- Replaced all ^C handling code that would drop straight into raise(SIGINT)
|
||
with a proper call to __check_abort(), which the user may have set up to
|
||
his own liking.
|
||
|
||
- The wildcard matching argument list build code no longer defaults to
|
||
allow for ^C checking. This is permitted only if the global checking
|
||
flag is enabled.
|
||
|
||
|
||
c.lib 1.114 (24.5.2004)
|
||
|
||
- Replaced most of the internal single character I/O calls with macros.
|
||
|
||
- I/O buffers are now allocated so that their start addresses are aligned
|
||
to cache line boundaries.
|
||
|
||
- Buffer size and position are now both signed integers. This fixes a
|
||
tricky issue with the newly-introduced macros and zero length buffer
|
||
sizes.
|
||
|
||
|
||
c.lib 1.113 (23.5.2004)
|
||
|
||
- The 'FILE' structure now has a public part. Flags and layout have changed!
|
||
|
||
- Reimplemented getc() and putc() as macros, which helps a lot with some
|
||
applications.
|
||
|
||
- Added more of the SAS/C internal floating point support code, which makes
|
||
sprintf() and friends build even with floating point options enabled.
|
||
|
||
- Replaced CheckSignal() with SetSignal(), which helped the ^C checking
|
||
code a lot.
|
||
|
||
|
||
c.lib 1.112 (23.5.2004)
|
||
|
||
- Plugged in the SAS/C code profiling functionality. This works by measuring
|
||
calling time intervals and should be very portable.
|
||
|
||
- Duplicating file descriptors could lead to trouble if the descriptor
|
||
number in question exactly matched the number of descriptors. Fixed.
|
||
|
||
- Reactivated code in open() which was disabled for OS4 but which
|
||
should have stayed active.
|
||
|
||
- Reduced the overhead of the single character input/output routines,
|
||
especially when called from within the library. This helped fgets(),
|
||
scanf(), fputs() printf() and others.
|
||
|
||
|
||
c.lib 1.111 (12.5.2004)
|
||
|
||
- chdir() now checks if the object in question is really a directory.
|
||
|
||
- Added special tests to a number of Open(), Lock() and Delete() calls
|
||
to catch attempts to open "subdirectories" of files. If it happens,
|
||
e.g. trying to open <utility/tagitem.h> when "utility" is a header
|
||
file on the search list, errno will be set to ENOTDIR.
|
||
|
||
|
||
c.lib 1.110 (10.4.2004)
|
||
|
||
- memmove() no longer tries to move large chunks of data if the source
|
||
and destination overlap by fewer bytes than can be moved at a time.
|
||
The original code should not have done this in the first place, but
|
||
it's safer to check rather than to assume that it will work out fine.
|
||
|
||
|
||
c.lib 1.109 (9.4.2004)
|
||
|
||
- Fixed a bug in the PPC version of setjmp that would trash floating
|
||
point registers.
|
||
|
||
- Fixed a bug in dup2: If the second fd didn't exist, it would return -1,
|
||
which is wrong (it should not close the second fd when it doesn't exist).
|
||
|
||
- Added F_DUPFD to fcntl
|
||
|
||
|
||
c.lib 1.108 (15.3.2004)
|
||
|
||
- Fixed a bug in the printf() family which affected how the %e
|
||
output was formed (and by extension, %E, %g and %G). The %e
|
||
format must put exactly one digit in front of the decimal
|
||
point, followed by the mantissa and the exponent. This worked
|
||
fine unless the round-off fudge added to the number caused
|
||
an overflow, producing two digits in front of the decimal point.
|
||
This has been fixed by checking for an overflow after having
|
||
added the round-off fudge and rescaling the result, if
|
||
necessary [Andrija Antonijevic].
|
||
|
||
|
||
c.lib 1.107 (15.2.2004)
|
||
|
||
- The setjmp() code now actually manages to save and restore the
|
||
FPU state in the 68k library form.
|
||
|
||
- The SAS/C constructor/destructor invocation finally works.
|
||
|
||
- Added an option to cache the current file position, which should
|
||
help seek performance.
|
||
|
||
- Added targets "version" and "cvs-tag" to the makefiles.
|
||
|
||
|
||
c.lib 1.106 (14.2.2004)
|
||
|
||
- index() now calls strchr() and rindex() calls strrchr().
|
||
|
||
- strchr() and strrchr() now read each byte of the string to
|
||
be searched exactly once.
|
||
|
||
- Added optimized versions of memchr() and memcmp().
|
||
|
||
- The optimized versions of memchr(), memcmp(), memcpy(), memmove()
|
||
and memset() check first if the amount of data involved justifies
|
||
the expense of gearing up to perform an optimized operation.
|
||
|
||
- strstr() no longer calls strlen() even once.
|
||
|
||
|
||
c.lib 1.105 (12.2.2004)
|
||
|
||
- Replaced memcpy(), memmove() and memset() with optimized portable
|
||
versions.
|
||
|
||
|
||
c.lib 1.104 (11.2.2004)
|
||
|
||
- When open() calls Lock() and fails to obtain a correct result, the
|
||
error code checking now also covers ERROR_ACTION_NOT_KNOWN (which is
|
||
ignored). This should help handlers which are no file systems, such
|
||
as PAR: and PIPE:.
|
||
|
||
- The file->iob_BufferWriteBytes and file->iob_BufferPosition counters
|
||
no longer have to be in sync. In fact, the position can be smaller
|
||
than the number of bytes waiting to be written. The buffer flushing
|
||
has to take this into account now (it may have to seek back after
|
||
having dumped the buffer, which is nasty).
|
||
|
||
- Worked J<>rg's changes into the fseek() code. This covers two fields:
|
||
if possible, an absolute positioning command is converted into a
|
||
relative position change; if the current file buffer allows for it,
|
||
the buffer access position is updated rather than forcing the buffer
|
||
to be flushed to disk/reread.
|
||
|
||
|
||
c.lib 1.103 (8.2.2004)
|
||
|
||
- The bug fixes in version 1.101 broke ungetc(). Fixed. Also reworked the
|
||
sanity checks in ungetc() which previously were performed either out
|
||
of order or were entirely missing.
|
||
|
||
- Renamed socket_get_socket_descriptor.c to socket_get_descriptor.c to
|
||
make it easier to build the library on the Amiga.
|
||
|
||
|
||
c.lib 1.102 (22.1.2004) <jlangner>
|
||
|
||
- modified string.h to also include strings.h within the non ISO 'C' standard
|
||
part. This should make porting of existing applications a bit easier as many
|
||
sources only include <string.h>. As the current string.h anyway defines the
|
||
symbols of i.e. bcmp() and bcopy() etc, which should normally also be
|
||
in strings.h, I don't see any problem with that.
|
||
|
||
- added function macros for stricmp() and strnicmp() to non ISO 'C' standard
|
||
part of <strings.h> to make it easier to port applications relying on
|
||
stricmp()/strnicmp().
|
||
|
||
|
||
c.lib 1.101 (18.1.2004)
|
||
|
||
- Draining an stdio buffer via fgetc/fread, etc. completely before switching
|
||
over to using the same buffer for writing data to a file would flop because
|
||
one of two important variables did not get reset to zero. This would also
|
||
end up trashing the buffer management. New code makes sure that if a read
|
||
access ends up setting the number of bytes available for reading from the
|
||
buffer to 0, the buffer position is reset to 0 as well.
|
||
|
||
- fwrite() now pushes the buffer contents to disk if it has completely
|
||
filled up rather than allowing the full buffer to stick around until
|
||
another opportunity presents itself to flush it to disk.
|
||
|
||
|
||
c.lib 1.100 (18.1.2004)
|
||
|
||
- abort() and raise() no longer call fprintf(stderr,..) but rather
|
||
use fputs(..,stderr) instead.
|
||
|
||
- Updated the copyright text.
|
||
|
||
|
||
c.lib 1.99 (28.12.2003)
|
||
|
||
- Updated "stdlib_constructor_begin.c" to invoke the SAS/C constructors
|
||
and destructors and to make the OS4 specific destructor handling
|
||
safer: destructors calling exit() will now cause the next following
|
||
destructor function to be called.
|
||
|
||
|
||
c.lib 1.98 (23.12.2003)
|
||
|
||
- Fixed up Hans-J<>rg's previous fix for strncat(). Added comments
|
||
explaining as to what this function is supposed to accomplish in
|
||
order to avoid making the same mistake again and again.
|
||
|
||
- accept() now returns a properly wrapped socket descriptor (thanks to
|
||
Marcus!).
|
||
|
||
- TODO: fix up the PowerPC destructor code; currently, a destructor
|
||
function calling exit() will cause all subsequent destructors to
|
||
be either skipped or the entire destructor list to be rerun ad
|
||
inifinitum (haven't checked this in detail yet). Change the code to
|
||
work more like the 68k version, which plants a setjmp() at the beginning
|
||
of the loop and remembers which one was the last destructor called.
|
||
|
||
|
||
c.lib 1.97 (15.12.2003)
|
||
|
||
- The library can now use constructors and destructors internally.
|
||
|
||
- Added the realpath() function.
|
||
|
||
- Put the dirent functions back in libc.a.
|
||
|
||
|
||
c.lib 1.96 (13.12.2003)
|
||
|
||
- gettimeofday() no longer reports microsecond values > 1000000.
|
||
|
||
|
||
c.lib 1.95 (13.12.2003)
|
||
|
||
- The default memory pool and puddle sizes can now be configured at link
|
||
time by defining the __default_pool_size and __default_puddle_size
|
||
variables in your program.
|
||
|
||
- strncat() no longer eats the last character copied.
|
||
|
||
|
||
c.lib 1.94 (9.12.2003)
|
||
|
||
- <utime.h> now includes <time.h> rather than <sys/types.h>, if
|
||
necessary.
|
||
|
||
- Changed DoTimer() to allocate the MsgPort and the timerequest from
|
||
public memory rather than from the stack (which could be allocated
|
||
as private memory).
|
||
|
||
|
||
c.lib 1.93 (29.11.2003)
|
||
|
||
- Fixed up the Unix->Amiga path name translation code to map "volume:/" style
|
||
paths to the virtual root directory.
|
||
|
||
- The file operations (open, chmod, mkdir, rmdir, mktemp, chown, unlink,
|
||
utime and rename) now watch out for the root directory to come out of a
|
||
Unix->Amiga path name translation and will react according to it.
|
||
|
||
- access() now also works on the virtual root directory.
|
||
|
||
|
||
c.lib 1.92 (28.11.2003)
|
||
|
||
- Replaced qsort() with a different, iterative implementation. In terms of
|
||
performace it seems to beat everything out there.
|
||
|
||
- Tinkered with the select() code again. The local FD_ZERO() implementation
|
||
was too smart. It would attempt to optimize the operation by breaking it
|
||
down in to series of bytes to be set to zero, followed by individual bits.
|
||
This went wrong because this isn't how the fd_set bits are organized.
|
||
The code now clears all the long words involved.
|
||
|
||
- Updated the fix_datestamp() function which is part of the select()
|
||
wrapper. The updated version should be less vulnerable against
|
||
overflows.
|
||
|
||
|
||
c.lib 1.91 (25.11.2003)
|
||
|
||
- Fixed up the dependencies in the makefiles. The libunix.a routines which
|
||
would involve the asynchronous I/O code would not get rebuilt if the
|
||
associated header file would change.
|
||
|
||
- Added extra code to the fd hook function which looks after files that
|
||
should be unlinked, but which didn't get deleted at the first attempt
|
||
because they were still in use. That extra code checks, after a file is
|
||
closed, if the file in question was set up for deletion. This seems to
|
||
help the Samba port a lot, which no longer accumulates scores of lock
|
||
files in "Samba:log/locks" which get deleted only when smbd exits.
|
||
|
||
|
||
c.lib 1.90 (24.11.2003)
|
||
|
||
- The wildcard pattern expansion for command line arguments no longer
|
||
drops parameters for which there is no match. Instead, the argument
|
||
is used as is. With the old behaviour, things like
|
||
"-D__interrupt=__attribute__((__interrupt__))" would expand to nothing,
|
||
breaking the GCC preprocessor.
|
||
|
||
- The special definitions & code that help GCC to build itself are now
|
||
enabled through a single line in a local header file.
|
||
|
||
- The file descriptor hook now sets errno to EBADF for file descriptors
|
||
which are not in use (this used to be ENOSYS).
|
||
|
||
|
||
c.lib 1.89 (23.11.2003)
|
||
|
||
- The asynchronous file I/O support can now be enabled at library build
|
||
time by uncommenting a definition in a single header file. The makefile
|
||
dependencies then do the rest...
|
||
|
||
- Fixed a bug in the Unix->Amiga path name conversion code. A trailing
|
||
"/." in a path name is now stripped.
|
||
|
||
|
||
c.lib 1.88 (22.11.2003)
|
||
|
||
- alloca() is now included in the library even if GCC is used as the
|
||
host compiler.
|
||
|
||
|
||
c.lib 1.87 (17.11.2003)
|
||
|
||
- truncate() and ftruncate() now safely extend the size of a file by
|
||
adding 0 bytes at the end.
|
||
|
||
|
||
c.lib 1.86 (17.11.2003)
|
||
|
||
- Fixed a bug in the Unix->Amiga name translation which could lead to
|
||
a path beginning with "../" to be mistakenly identified as being an
|
||
absolute path name starting with "/".
|
||
|
||
|
||
c.lib 1.85 (16.11.2003)
|
||
|
||
- The realignment code was missing in the FlushAsync() routine. Fixed.
|
||
|
||
- The alignment position was not calculated correctly in SeekAsync()
|
||
as the wrong variable was involved. Fixed.
|
||
|
||
- __umodsi3, __udivsi3, __udivsi4, __modsi3, __divsi3, __divsi4 would
|
||
not refer to the proper __UtilityBase library symbol. Fixed.
|
||
|
||
|
||
c.lib 1.84 (12.11.2003)
|
||
|
||
- Updated the optional asyncio code to return to a block-aligned
|
||
file position after seeking in a write-only file. Also added
|
||
code to check if read/write access is actually allowed.
|
||
|
||
- Multiple inclusion of debug.h no longer leads to trouble.
|
||
|
||
- Merged duplicate file advisory lock testing code.
|
||
|
||
- The dirent functions are now a part of libunix.a and no longer
|
||
appear in libc.a.
|
||
|
||
- Advisory file locks can now start beyond the end of the (current)
|
||
file and it is possible to lock a region until the end of the file.
|
||
Previously, the latter was rejected as an invalid range.
|
||
|
||
- If several exactly overlapping regions are locked on a file,
|
||
they all are now unlocked by a single call.
|
||
|
||
- Replaced the qsort() code.
|
||
|
||
- The assertion handling has moved into its own routine which
|
||
tries to make sure that the failure message is shown.
|
||
|
||
- Rewrote clock() (again) to be much simpler in operation.
|
||
|
||
- The opendir/readdir/closedir cleanup code now actually invokes the
|
||
closedir() function rather than doing the cleanup job manually.
|
||
|
||
- open() no longer tests for delete protection after the file has
|
||
been already opened. If it's open, only a possible write protection
|
||
may be problematic and ought to be flagged.
|
||
|
||
- __drop_iob_read_buffer() now checks if the buffered file is actually
|
||
in use.
|
||
|
||
- If fseek(..,0,SEEK_CUR) is is called, it no longer results in the
|
||
read/write buffers to be dropped.
|
||
|
||
- The snprintf() family now returns the proper number of characters
|
||
that would have gone into the buffer, if enough room were available.
|
||
Previously, it would stop counting after the buffer had filled up.
|
||
|
||
- Merged duplicate code around free().
|
||
|
||
- The memory cleanup code now calls the free functions if memory
|
||
debugging code is enabled.
|
||
|
||
- If the memory debugging code is enabled, allocations and deallocations
|
||
will trigger consistency checks now and then (with a likelyhood of
|
||
about 6% per operation).
|
||
|
||
- mktime() now properly fills in the day of the week.
|
||
|
||
- strftime() now expects the format hook code to provide for the NUL-
|
||
termination.
|
||
|
||
- __translate_amiga_to_unix_path_name() now performs a sanity check
|
||
before it proceeds to use the supplied path name. The check is
|
||
to make sure that the local buffer does not overflow. Rearranged
|
||
code in __translate_unix_to_amiga_path_name() to perform a similar
|
||
test.
|
||
|
||
- Rewrote the command line wildcard expansion code to use standard
|
||
Exec lists rather than the tricky singly linked list stuff, coupled
|
||
with tricky pointer arithmetic. If the code crashes, it's now much
|
||
easier to tell why.
|
||
|
||
- The __usergroup_init() function now returns an error code rather
|
||
than dropping into exit() in case of trouble.
|
||
|
||
- They 'key' parameter of bsearch() is now of type "void *" rather
|
||
than "char *".
|
||
|
||
|
||
c.lib 1.83 (5.11.2003)
|
||
|
||
- The scanf() family now skips over initial whitespace preceding
|
||
data to be converted. Exceptions are the %c, %n and %[ conversions
|
||
which are documented not to bother.
|
||
|
||
|
||
c.lib 1.82 (4.11.2003)
|
||
|
||
- Fixed another bug in the scanf() family. Floating point numbers were
|
||
not converted correctly, only the integral part was picked up.
|
||
|
||
|
||
c.lib 1.81 (4.11.2003)
|
||
|
||
- Added assertions to track trashing of certain global variables.
|
||
|
||
- Rewrote the select() wrapper again. It no longer makes assumptions about
|
||
the size of the fd_set data structures passed in. The new code is, however,
|
||
significantly more complex than it used to be. It uses far less stack space,
|
||
though...
|
||
|
||
|
||
c.lib 1.80 (29.10.2003)
|
||
|
||
- More tweaking for the optional asyncio support. If requested, it's
|
||
always enabled for read-only files bound to descriptors, but never
|
||
for write-only or read/write access. It's always enabled for buffered
|
||
files standard I/O files because there's an fflush() to take care
|
||
of pushing the buffer contents to disk. There is no fsync() for
|
||
file descriptors which would accomplish the same.
|
||
|
||
|
||
c.lib 1.79 (29.10.2003)
|
||
|
||
- The optional asyncio code now also sports a function similiar
|
||
to fflush() which will write the current contents of the buffer
|
||
to the file.
|
||
|
||
|
||
c.lib 1.78 (27.10.2003)
|
||
|
||
- The asyncio code support is now an optional feature which can be
|
||
enabled at library build time by defining the ASYNCIO_SUPPORT
|
||
preprocessor symbol.
|
||
|
||
- Cleaned up the code that uses the buffered I/O data structure
|
||
'iob', which used to be a much bigger data structure with
|
||
a hard-coded buffer attached to it. The buffer is now allocated
|
||
dynamically when needed.
|
||
|
||
Note that this change requires that the library is rebuilt or the
|
||
I/O buffer data structures will cause trouble.
|
||
|
||
|
||
c.lib 1.77 (26.10.2003)
|
||
|
||
- Worked an updated version of the asyncio code into the library.
|
||
File I/O performance will benefit from this if, and only if, a
|
||
file is opened either for read or write access only. If both
|
||
read and write access are requested for a file, the asyncio layer
|
||
will not kick in. Also, in order to enable it, you have to declare
|
||
a '__asyncio_buffer_size' variable (see "stdio_asynciobuffersize.c")
|
||
somewhere in your program.
|
||
|
||
Note that this change requires that the library is rebuilt or the
|
||
file descriptor data structures will cause trouble.
|
||
|
||
|
||
c.lib 1.76 (22.10.2003)
|
||
|
||
- Added <sys/amigaos-va.h> to define the macros va_startlinear() and
|
||
va_getlinearva().
|
||
|
||
|
||
c.lib 1.75 (20.10.2003)
|
||
|
||
- __initialize_fd() and __initialize_iob() now perform the bulk of the
|
||
data structure initialization rather than just setting the data to
|
||
zero and plugging in a hook function.
|
||
|
||
|
||
c.lib 1.74 (19.10.2003)
|
||
|
||
- Renamed the global __fd_table variable to __fd to match the buffered
|
||
I/O data structure name.
|
||
|
||
- Further modifications to make the debug version of the library build
|
||
without errors.
|
||
|
||
- Moved the stack size usage checking code from _main() into separate
|
||
routines which are found in the linker library.
|
||
|
||
|
||
c.lib 1.73 (19.10.2003)
|
||
|
||
- __grow_fd_table(), __grow_iob_table(), __flush_iob_write_buffer(),
|
||
__drop_iob_read_buffer(), __fill_iob_read_buffer() and __open_iob()
|
||
now returns 0 for success, -1 otherwise.
|
||
|
||
- __grow_fd_table() and __grow_iob_table() now both set errno in
|
||
case of failure.
|
||
|
||
- Lost the unnecessary file descriptor and buffered I/O table
|
||
initializations.
|
||
|
||
|
||
c.lib 1.72 (19.10.2003)
|
||
|
||
- fopen(), freopen() and fdopen() now all call the same common
|
||
routine to set up a buffered stdio stream. Previously, the
|
||
fdopen() code was seperate and did things differently from
|
||
the rest.
|
||
|
||
- Deletion of temporary files upon program exit could lead to
|
||
a crash (worst case), but never actually deleted anything. Fixed.
|
||
|
||
- The stdio_exit() cleanup function now actually calls into
|
||
fclose() and close() rather than doing the same job all over
|
||
again manually.
|
||
|
||
- Lost code which didn't make much sense in the socket descriptor
|
||
hook. Same thing for the temp file cleanup code.
|
||
|
||
- dup() now invokes dup2() with the second parameter set to -1.
|
||
|
||
- Simplified the duplicate cleanup in close().
|
||
|
||
|
||
c.lib 1.71 (19.10.2003)
|
||
|
||
- Added missing prototype for setbuf() in <stdio.h>.
|
||
|
||
- Put the definition of HUGE_VAL in <math.h> inside #ifndef, to allow
|
||
GCC to do its thing.
|
||
|
||
|
||
c.lib 1.70 (18.10.2003)
|
||
|
||
- The tests to verify that a file descriptor was valid all had a
|
||
problem. This test is now done in a separate function which
|
||
performs the necessary error checking.
|
||
|
||
- The dup2() function did not close the second file descriptor
|
||
prior to duplicating the first one. Also, the dup(..,-1) case
|
||
did not return the number of the new file descriptor but -1
|
||
instead.
|
||
|
||
- The tests to check whether a Hook is attached to a file
|
||
descriptor now set errno to EBADF if no Hook is found.
|
||
|
||
- All file descriptor flags are now cleared when a descriptor
|
||
is closed. Same thing for buffered files.
|
||
|
||
|
||
c.lib 1.69 (14.10.2003)
|
||
|
||
- Not all conversions performed by the scanf() family would respect
|
||
the maximum field width. Fixed.
|
||
|
||
- The local sscanf() file hook function had the last two parameters
|
||
reversed. Fixed.
|
||
|
||
- strftime() now fills in the week day if it's not provided.
|
||
|
||
|
||
c.lib 1.68 (13.10.2003)
|
||
|
||
- To activate the memory debugging code, use "#define __MEM_DEBUG".
|
||
Other debugging code (assertions) is deactivated through
|
||
"#define NDEBUG".
|
||
|
||
|
||
c.lib 1.67 (11.10.2003)
|
||
|
||
- Reworked the program startup code. Instead of rattling down a number of
|
||
initialization functions, one at a time, the whole thing is now performed
|
||
through a 'constructor style' table. This ought to be replaced by the
|
||
real thing once it's safely possible.
|
||
|
||
|
||
c.lib 1.66 (11.10.2003)
|
||
|
||
- UtilityBase, LocaleBase, SocketBase and UserGroupBase no longer override
|
||
any user defined global variables. The library now keeps them under
|
||
private names.
|
||
|
||
- The wildcard expansion code would not return an empty argument list in
|
||
case no match was found. Fixed.
|
||
|
||
- Cleaned up the stdlib_main.c code, moved all the data and function
|
||
references into local header files.
|
||
|
||
- Completed the usergroup.library API integration for the OS4 variant.
|
||
|
||
- The constructors are now called in forward order and the destructors
|
||
in reverse order.
|
||
|
||
- Moved the constructor/destructor invocation code into a separate file.
|
||
|
||
|
||
c.lib 1.65 (9.10.2003)
|
||
|
||
- In <sys/types.h> dev_t is now an unsigned long.
|
||
|
||
|
||
c.lib 1.64 (9.10.2003)
|
||
|
||
- Bum. The old and the new clock() code was wrong. The clock() function
|
||
is supposed to return how much processor time the current process
|
||
consumed since it was started, which is a monotonously increasing
|
||
number (or something like it, unless the system time is reset).
|
||
The new code should deliver proper data, although it might be better
|
||
to switch it over to timer.device/ReadEClock.
|
||
|
||
|
||
c.lib 1.63 (8.10.2003)
|
||
|
||
- Ouch, the old clock() code was correct, it just didn't look like it.
|
||
I rewrote it to make it clearer what happens and why it happens like
|
||
that [Andrija Antonijevic].
|
||
|
||
|
||
c.lib 1.62 (6.10.2003)
|
||
|
||
- A "+" and a "*" had been mixed up in clock(). Fixed.
|
||
|
||
|
||
c.lib 1.61 (5.10.2003)
|
||
|
||
- Now that main.o is a platform neutral startup code file, it's possible
|
||
to do some machine type checks in "stdlib_machine_test.c". This code
|
||
checks for presence of an FPU and an MC68020 CPU (or better). It may
|
||
not work for -fbaserel32 which by the time the test is performed
|
||
will have already crashed.
|
||
|
||
- Added the missing stdlib_dosbase.c, stdlib_localebase.c, stdlib_sysbase.c,
|
||
stdlib_utilitybase.c and math_init_exit.c files to the repository.
|
||
|
||
|
||
c.lib 1.60 (5.10.2003)
|
||
|
||
- Renamed the source code files which implement the strtod(), strtol(),
|
||
strtoul(), atof(), atoi() and atol() functions.
|
||
|
||
- Moved main() out of libc.a and made it into a startup object file
|
||
which needs to be added to the GCC specs file in the "*startfile"
|
||
section, right at the end of the list. This solves practically all
|
||
linking problems I encountered so far. Which means that -lunix
|
||
and -lsocket actually work and that you don't have to tweak the
|
||
specs file to build the compiler.
|
||
|
||
|
||
c.lib 1.59 (4.10.2003)
|
||
|
||
- The math initialization/test function is now always invoked by the
|
||
_main() function. The math init/exit code defaults to stubs, though,
|
||
unless libm.a is linked in.
|
||
|
||
|
||
c.lib 1.58 (4.10.2003)
|
||
|
||
- Moved the global library base/interface definitions from stdlib_main.c
|
||
into separate files, each of which defines a base/interface pair.
|
||
|
||
- Moved the math library initialization/testing into libm.a where it
|
||
really belongs. The MathIEEE library base definitions went there,
|
||
too.
|
||
|
||
|
||
c.lib 1.57 (1.10.2003)
|
||
|
||
- Calling dup2() on a stdio file reinitialized the source fd instead of the
|
||
destination fd. Fixed.
|
||
|
||
- Added const declaration to first argument of sscanf().
|
||
|
||
- <assert.h> no longer enforces the inclusion of <dos.h>.
|
||
|
||
|
||
c.lib 1.56 (30.9.2003)
|
||
|
||
- Moved the scalbn() function prototype into math_pow.c, where it is
|
||
used. This is not an ISO 'C' function to start with.
|
||
|
||
- strtod(), strtol(), strtoul(), atof(), atoi() and atol() moved
|
||
from <string.h> into <stdlib.h>.
|
||
|
||
- fputs() no longer adds a newline character at the end of the line.
|
||
This is now done only by puts().
|
||
|
||
- fdopen(), fopen(), freopen() and popen() no longer mix up file
|
||
access mode options such as "r" and "r+".
|
||
|
||
- popen() now adds the current time stamp to the name of the
|
||
temporary files it opens.
|
||
|
||
|
||
c.lib 1.55 (21.9.2003)
|
||
|
||
- Added support for 'long long' quantities in the printf/scanf
|
||
families. This is not yet enabled by default since I couldn't
|
||
seem to make it work on the 68k platform.
|
||
|
||
|
||
c.lib 1.54 (18.9.2003)
|
||
|
||
- fputs()/puts() didn't add the '\n' character at the end of the
|
||
line. Fixed.
|
||
|
||
|
||
c.lib 1.53 (25.8.2003)
|
||
|
||
- Added hooks for code to perform wildcard expansion for all
|
||
command line parameters. Excluded are those parameters which
|
||
are surrounded by quotes (").
|
||
|
||
|
||
c.lib 1.52 (19.8.2003)
|
||
|
||
- fpos_t is now a scalar data type.
|
||
|
||
- size_t is now an unsigned integer.
|
||
|
||
- Lost the file descriptor table usage counter. Whether or not a
|
||
file descriptor is in use is now indicated by a flag.
|
||
|
||
- Temporary buffered files now have a dynamically allocated temporary
|
||
file name string attached. Previously, a statically allocated
|
||
buffer was part of each file buffer data structure.
|
||
|
||
- The order of the hook parameters for the file descriptor and
|
||
buffered files was wrong.
|
||
|
||
- All the buffered file routines now check if the file in question
|
||
is actually in use before they proceed.
|
||
|
||
NOTE: the last four changes require a rebuild of the entire library,
|
||
just to be safe!
|
||
|
||
|
||
c.lib 1.51 (12.8.2003)
|
||
|
||
- setvbuf() now sets the buffer size to 0 when switching a stream
|
||
into unbuffered mode. Also, with buffering mode _IONBF (no
|
||
buffering) no memory is allocated and no supplied buffer is
|
||
used.
|
||
|
||
- The stdio cleanup code no longer runs all file descriptors and
|
||
files through the shutdown code. Only those which are actually
|
||
in use.
|
||
|
||
- Fixed a typo in the BSD style license text.
|
||
|
||
- Cosmetic changes...
|
||
|
||
- fopen("a+", ..) did not actually append any data.
|
||
|
||
- The unlink() cleanup code didn't unlock the temporary locks
|
||
it maintained.
|
||
|
||
|
||
c.lib 1.50 (2.8.2003)
|
||
|
||
- Rewrote the entire Amiga->Unix and Unix->Amiga name/path translation
|
||
code from scratch. It's now much more robust than it used to be.
|
||
|
||
- Restored the original difftime() code.
|
||
|
||
|
||
c.lib 1.49 (1.8.2003)
|
||
|
||
- vfprintf() now treats the '%' format specifier as an escape
|
||
character and produces the next following letter as is if that
|
||
letter does not indicate a specific format.
|
||
|
||
|
||
c.lib 1.48 (31.7.2003)
|
||
|
||
- vfprintf() now sets up the buffer it uses for converting numbers
|
||
into text every time it goes through the main loop. This means
|
||
that a terminating '\0' is placed at the end.
|
||
|
||
- vfprintf() now first checks if a floating point number is
|
||
+/-infinity or not a number and then performs the '%g' check
|
||
to figure out which output format should be used.
|
||
|
||
- Fixed the alternate conversion option for precision == 0 and
|
||
the %e/%f/%g conversions.
|
||
|
||
- In vfprintf(), if there is no digit following the precision
|
||
specifier, the precision is now set to 0.
|
||
|
||
- In vfscanf() only %c, %s and %[ respond to the maximum field
|
||
width option, all other conversion methods ignore it.
|
||
|
||
- readdir() again returns the ".." entry for the root
|
||
directory.
|
||
|
||
|
||
c.lib 1.47 (31.7.2003)
|
||
|
||
- Fixed vfscanf() and strtol() again to accept very small negative
|
||
integers (-2147483648). The previous check to avoid overflows
|
||
was too strict.
|
||
|
||
|
||
c.lib 1.46 (31.7.2003)
|
||