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

567 Commits

Author SHA1 Message Date
a50aba0b64 - Reversed the change in rename() which enforced deletion of the target file.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14921 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-21 10:23:17 +00:00
2e9ac7d003 - The Unix-like rename() now removes the target file even if that
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
2005-04-20 12:06:00 +00:00
0a440c8405 - Added the two release archive build scripts.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14919 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-16 10:35:12 +00:00
f63a0788d5 - Fixed the startup build target directory names.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14918 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-16 10:11:26 +00:00
431dd488a1 - Changed how the startup code is built for the different library flavours,
and which files this involves.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14917 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-13 14:35:06 +00:00
15c16efd07 - Final version bump before release.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14916 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-09 09:30:29 +00:00
6e39efe7d7 - Added a hopefully enlightening comment on the subtleties of semaphore
locking in the stdio_fflush.c file.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14915 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-04 11:56:26 +00:00
92cc3e9a79 - The stdio locking in fcntl() wasn't working correctly. Fixed.
- 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
2005-04-04 10:10:02 +00:00
a18f415374 - Small tweaks to fix GCC 68k compiler warnings.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14913 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-03 10:53:24 +00:00
3096691d75 - 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>.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14912 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-03 10:22:48 +00:00
d5c36d66e4 - We now call IsInteractive() rather than send a type ACTION_DISK_INFO
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
2005-04-02 18:02:54 +00:00
7f9fbc453b - Invoking fstat() on what maps to a con-handler stream now produces
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
2005-04-02 13:25:55 +00:00
6f010ddf87 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14909 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-01 18:46:37 +00:00
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