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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14935 87f5fb63-7c3d-0410-a384-fd976d0f7a62
%a/%A conversions for C99. The %j is treated like %ll, %t and %z are treated
like %l.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14933 87f5fb63-7c3d-0410-a384-fd976d0f7a62
of a command unless it contains path separator characters.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14929 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14927 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Added code to the startup routine which allows you to monitor where command
was started from and which parameters it was invoked with.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14926 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14923 87f5fb63-7c3d-0410-a384-fd976d0f7a62
file has been protected from deletion.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14920 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Made the clearerr(), feof() and ferror() macros thread-safe.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14914 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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>.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14912 87f5fb63-7c3d-0410-a384-fd976d0f7a62
to a likely console handler file's MsgPort.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14911 87f5fb63-7c3d-0410-a384-fd976d0f7a62
information identifying it as a character special file. Side-effect:
if the input/output went to a CON:/AUTO window, that window will
pop open and stay open.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14910 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14909 87f5fb63-7c3d-0410-a384-fd976d0f7a62
a separate file.
- Simplified the library/open close code in "stdlib_main.c".
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14908 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14907 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14906 87f5fb63-7c3d-0410-a384-fd976d0f7a62
for OS4 if the AllocSysObject() function is used to create it.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14905 87f5fb63-7c3d-0410-a384-fd976d0f7a62
until the function has returned. Which is harsh, but there is no
elegant solution to the issue of keeping the same dos.library
file handles from concurrent use which SystemTagList() might just
end up using.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14898 87f5fb63-7c3d-0410-a384-fd976d0f7a62
the 68k build. The PowerPC build may follow later, provided
I manage to get the specs file fixed.
- Moved the check for the presence of an FPU into the
math_init.c code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14897 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14894 87f5fb63-7c3d-0410-a384-fd976d0f7a62
should no longer spell big trouble on account of the stdio
data structures possibly not being in a well-defined and
initialized state.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14893 87f5fb63-7c3d-0410-a384-fd976d0f7a62
separate files.
- Removed some more redundant data from stdlib_main.c.
- Added the first real C99 function: _Exit().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14892 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Dropped unused stub code which is now redundant because of
the constructor/destructor mechanism.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14891 87f5fb63-7c3d-0410-a384-fd976d0f7a62
to what it is supposed to do. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14888 87f5fb63-7c3d-0410-a384-fd976d0f7a62
destructor functions in any way at all. I reimplemented the
entire library constructor/destructor functionality to use the
same approach as libnix.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14887 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14885 87f5fb63-7c3d-0410-a384-fd976d0f7a62
that the constructors/destructors are called in the proper
order, too.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14884 87f5fb63-7c3d-0410-a384-fd976d0f7a62
setjmp(). This is now done within stdlib_main.c prior to
calling the destructor function invocation code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14883 87f5fb63-7c3d-0410-a384-fd976d0f7a62
constructor/destructor functions for initialization and cleanup
purposes.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14882 87f5fb63-7c3d-0410-a384-fd976d0f7a62
or initializes it.
- The stdlib constructor now performs the CPU/FPU compatibility test.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14879 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14874 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14871 87f5fb63-7c3d-0410-a384-fd976d0f7a62
sections where they should have been in the first place.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14869 87f5fb63-7c3d-0410-a384-fd976d0f7a62
socket_data.c, dirent_data.c and stdio_data.c and into the
code that initializes them.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14868 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14866 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14864 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14862 87f5fb63-7c3d-0410-a384-fd976d0f7a62