1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00
Commit Graph

204 Commits

Author SHA1 Message Date
09b52e077f - Moved the __UtilityBase/__IUtility variable declarations into
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
2005-03-30 19:37:47 +00:00
9c2c44b008 - 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().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14907 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-27 10:02:50 +00:00
df01f27551 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14906 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-26 11:01:13 +00:00
58d26ce8cb - The name of the public record locking semaphore has to be preallocated
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
2005-03-26 10:53:35 +00:00
b1ac45a0b9 - Updated the specs file not to reference the main.o files any more.
- Clarified the caveats of the libm.a use.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14904 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-26 09:15:07 +00:00
aafda37c84 - Ready for release...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14903 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-25 09:14:38 +00:00
3eb15a612f - Oops, nearly broke fcntl() again for sockets.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14902 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-25 08:59:22 +00:00
590d1b8eec - Small fixes to fcntl() and select() to cover the thread-safe
fd->fd_DefaultFile == ZERO case.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14901 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-25 08:50:59 +00:00
1fbe4bd0a5 - Added a description of the thread-safe stdin/stdout/stderr behaviour.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14900 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-25 08:50:10 +00:00
8edfcc3f86 - Activated the dormant thread-safe standard input/output/error
handling code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14899 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-24 16:40:16 +00:00
a6daababe7 - The thread-safe system() call now blocks all standard I/O operations
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
2005-03-24 15:31:16 +00:00
5695784272 - Moved stdlib_main.o into the regular lib.c, at least for
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
2005-03-20 17:14:58 +00:00
5eefcf4555 - Fixed the constructor/destructor invocation sequence for the SAS/C and
GCC 68k library builds.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14896 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-20 12:14:09 +00:00
d85d6648ea - Modified the SAS/C constructor/destructor invocation sequence, now that
the names of the functions assigned through the new macros are different.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14895 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-20 11:57:11 +00:00
c471c50784 - 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...


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14894 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-20 11:18:06 +00:00
cd10dc9a1a - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14893 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-19 11:06:57 +00:00
7d3ea7fae6 - 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().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14892 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-19 10:15:56 +00:00
ead29c1850 - Reorganized the local header files, removing redundancies.
- 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
2005-03-18 12:38:25 +00:00
f492e6a6c0 - fcntl() did not work for sockets. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14890 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-16 09:28:37 +00:00
dc80018239 - Re-added the long word alignment check for MC68020 I didn't commit
at home.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14889 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-15 11:18:32 +00:00
966851e8bd - ftruncate() ended up changing the current file position, contrary
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
2005-03-14 10:03:06 +00:00
a60623bbc6 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14887 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-12 14:10:09 +00:00
d8bf652ae6 - Added a table size check to guard against accesses beyond the last
file descriptor.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14886 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-12 09:49:47 +00:00
b048323196 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14885 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-12 09:43:48 +00:00
08cc54d3fa - Fixed the SAS/C destructor function prototypes and verified
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
2005-03-11 18:27:27 +00:00
419172fb0e - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14883 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-11 16:04:51 +00:00
f289140266 - Switched over the startup code and the library itself to use
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
2005-03-11 13:23:18 +00:00
86b7e5c429 - Introduced new constructor types and changed the overall priority
order.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14880 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-11 11:35:31 +00:00
42963b39c4 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14879 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-11 09:37:29 +00:00
678cab02fb - The macro definitions deserved better documentation. Well, they probably still do...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14878 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 13:58:13 +00:00
59d7f8d07f - Fixed another interesting bug in the OS4 destructor code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14877 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 13:30:11 +00:00
9a7c8a8705 - Corrected a typo in the OS4 destructor code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14876 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 13:28:05 +00:00
96e74015f0 - Added S_IREAD, S_IWRITE and S_IEXEC aliases to <sys/stat.h>.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14875 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 11:40:57 +00:00
db8710d2ae - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14874 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 09:55:03 +00:00
91f12dd8f0 - Reworked the constructor/destructor macros again.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14873 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 07:53:57 +00:00
d2f157b0a1 - Cleaned up the GCC constructor/destructor macros again. There is more to come.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14872 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-10 07:47:51 +00:00
e3e82b3657 - Thanks to Joerg 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14871 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-09 21:07:25 +00:00
4d3dc4a77f - The stdio destructor no longer resets the __iob pointer to NULL. This
avoids trouble with destructor functions which use stdio code. Unsolved
  problem: the order in which destructors and constructors are called.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14870 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-09 16:56:05 +00:00
ee556fcb35 - Moved a few __delete_semaphore() calls into conditional compilation
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
2005-03-09 12:06:10 +00:00
cc8a8e42c0 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14868 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-09 10:48:59 +00:00
0fad53e56e - Moved the CPU/FPU type tests into the respective linker
libraries.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14867 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-07 16:56:36 +00:00
d33e3e909e - 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...


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14866 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-07 14:04:09 +00:00
ef43011783 - Made the file descriptor checks in the fsync() and fdatasync()
functions more robust.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14865 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-07 11:58:50 +00:00
a9c8cdc554 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14864 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-07 11:16:43 +00:00
d370bd123b - Corrected the names of macros.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14863 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-06 09:04:44 +00:00
6931123dc1 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14862 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-06 09:00:16 +00:00
b2ddf28fa7 - Replaced the plain text documentation with HTML versions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14861 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-05 18:34:01 +00:00
1bc19a04d3 - Fixed a compiler problem in the socket setup.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14860 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-05 17:55:26 +00:00
1a0999bc1c - Feature freeze!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14859 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-05 17:16:55 +00:00
1bf430d1d6 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14858 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-04 20:08:19 +00:00