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

13 Commits

Author SHA1 Message Date
df89c636db - Fixed a typo in the semaphore creation code. Ouch.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14928 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-25 15:39:56 +00:00
876039440f - The record locking semaphore could wind up getting added to the public
list twice. Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14924 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-24 12:19:06 +00:00
0c553faff1 - 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14923 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-24 09:53:12 +00:00
1d611fefbe - Changed how error conditions raised by dos.library file I/O functions
are detected.

- Modified function return values of 0 and -1 to use macros like OK,
  ERROR/SEEK_ERROR instead, to better convey what the purpose of these
  values is.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14922 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-04-24 08:46:37 +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
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
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
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
f2d1a3238d - Rewrote the code that allocates the file descriptor and file
buffer tables so that all the memory allocations are in one
  place and it's possible to specify exactly how many table
  entries are required at a time.

- Creation and initialization of semaphores now uses the AmigaOS4
  specific functions for this purpose, if available.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14857 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-03-04 09:07:09 +00:00
1df294c07e - The thread-safety code is now subject to conditional compilation.
Both the library and the user code need to be rebuilt with the
  preprocessor symbol __THREAD_SAFE defined to get thread-safe
  code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14843 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-02-28 10:07:35 +00:00
1550c6fef3 - When using the wildcard expansion code for command line
parameters (which is by default linked in with libunix.a),
  regular expressions can no longer prompt dos.library requesters
  to appear. However, to be on the safe side, if you are expecting
  to pass regular expressions on the command line, do not use
  the wildcard expansion code such as by overriding the library
  symbols with dummy functions such as are used in the file
  "stdlib_wildcard_expand.c".

- Added a new variable '__open_locale' which can be used to
  restrict all library functions to use the "C" language locale
  rather than the current system locale settings. In addition
  to that, two new functions __locale_exit() and __locale_init()
  can be used to close and (re-)open the system locale at a
  later time.

- Local ("static") functions are now identified by the STATIC
  qualifier. This was done in preparation for changes that will
  deal with global and local data and the issue of thread safety.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14839 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-02-25 10:14:22 +00:00
c4c25649f2 - Cosmetic changes for (hopefully) better readability.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14837 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-02-21 10:22:02 +00:00
99547756fe - 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 entire library is rebuilt!


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14833 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-02-18 18:53:17 +00:00