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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15094 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15081 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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".
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15076 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15073 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- You can now request that your program uses the clib2 alloca() function
rather than the built-in compiler alloca().
- alloca() is now part of libunix.a, too.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15072 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15070 87f5fb63-7c3d-0410-a384-fd976d0f7a62
request to allocate 0 bytes as an error, returning NULL. They all
return a 1 byte memory chunk initialized to 0 instead.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15064 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15062 87f5fb63-7c3d-0410-a384-fd976d0f7a62
socket into a separate function which can be overridden by user code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15051 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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>.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15050 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- 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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15048 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15036 87f5fb63-7c3d-0410-a384-fd976d0f7a62
in the printf(), scanf(), atoll(), strtoll() and strtoull() functions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15021 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15011 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14999 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14990 87f5fb63-7c3d-0410-a384-fd976d0f7a62
Henning Nielsen Lund. Thank you very much!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14988 87f5fb63-7c3d-0410-a384-fd976d0f7a62
the wildcard pattern expansion functions not getting included.
- Replacing "int" with "socklen_t" in the header files caused compilation
errors with the source code which wasn't using the new typedef yet. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14985 87f5fb63-7c3d-0410-a384-fd976d0f7a62
least for clib2) ftell() and fseek() functions, respectively.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14983 87f5fb63-7c3d-0410-a384-fd976d0f7a62
to add it to libunix.a rather than keeping it in a separate libtermios.a
library.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14971 87f5fb63-7c3d-0410-a384-fd976d0f7a62
remainder() and remainderf() for C99.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14965 87f5fb63-7c3d-0410-a384-fd976d0f7a62
and hypotf() for C99.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14964 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- 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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14948 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14943 87f5fb63-7c3d-0410-a384-fd976d0f7a62
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
- 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@14925 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
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
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
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
- 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
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
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
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
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