mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
4801 lines
166 KiB
Plaintext
4801 lines
166 KiB
Plaintext
c.lib 1.216 (xxx)
|
||
|
||
- Add some wchar and multbyte-string related functions to allow gcc
|
||
building a libstdc++ library with wide char support. For now, the
|
||
functions are mostly stub ones only. They can be implemented on
|
||
demand.
|
||
|
||
|
||
c.lib 1.215 (26.6.2017)
|
||
|
||
- Added -fno-aggressive-loop-optimizations option when building crtbegin.c
|
||
to work around constructor/destructor hack with GCC 5.4.0 on AmigaOS 4.
|
||
|
||
- Added -fno-builtin option to fix conflicts with builtin memset()
|
||
with GCC 5.4.0 on AmigaOS 4.
|
||
|
||
|
||
c.lib 1.214 (27.4.2017)
|
||
|
||
- Added integer overflow test to calloc().
|
||
|
||
- Tiny change in getopt_long() so that the value pointed to by longindex
|
||
is always initialized to an invalid index position (that being -1),
|
||
instead of 0. The value of 0 can break some shell commands, most notably
|
||
GNU wget.
|
||
|
||
|
||
c.lib 1.213 (4.12.2016)
|
||
|
||
- Added the __decay_unused_slabs() function which brings all currently
|
||
empty slabs which are still protected from reuse closer to getting
|
||
reused or released.
|
||
|
||
- The slab-test program now exercises the memory allocation functions
|
||
to a greater degree. Memory is allocated in random chunk sizes,
|
||
the allocations are resized (to other random chunk sizes),
|
||
33% of all allocations are randomly freed, empty slabs readied for
|
||
reuse then discarded. The output in JSON format now shows a bit
|
||
more information as to what is being done.
|
||
|
||
- Rewrote __get_slab_stats() to use setjmp() and longjmp() in the
|
||
print() callback invocation.
|
||
|
||
- __get_slab_stats() now reports how many times a slab was reused
|
||
after having stuck around in the "empty slab" list.
|
||
|
||
- Changing the slab size through an environment variable is now
|
||
a feature of the debug build.
|
||
|
||
- Small changes to allow the library to be built with SAS/C again.
|
||
This includes adding code to disable/re-enable profiling,
|
||
fixing "stdlib_profile.h" and updating the smakefiles.
|
||
|
||
- Still not sure what it does, but _CXV45 now sits along with _CX25
|
||
and _CX35 in "sas_cxv.asm". "sas_cxv54.asm" is not needed any
|
||
more.
|
||
|
||
- Found the last use of MEMF_PRIVATE which should have been compiled
|
||
only for the OS4 version.
|
||
|
||
|
||
c.lib 1.212 (27.11.2016)
|
||
|
||
- Unused slabs which get recycled are no longer reinitialized from
|
||
scratch if their chunk size matches what the allocator needed.
|
||
If the chunk size matches, the list of available chunks is
|
||
left unchanged, and just the various counters are reset.
|
||
|
||
- Added __get_slab_stats() function.
|
||
|
||
- Added support for global __slab_purge_threshold tuning variable.
|
||
|
||
|
||
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 |