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

444 Commits

Author SHA1 Message Date
bf4d3b763c - __get_default_file() called __fd_unlock() without having called
__fd_lock() first. Ouch.

- Removed an unnecessary pair of __fd_lock()..__fd_unlock() calls from
  ttyname_r().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15156 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-27 11:54:54 +00:00
9984a37cb4 - Unlink is now reentrant, or at least thread-safe.
- You can now make unlink() stop after a failed deletion attempt which
  failed because the object to be deleted was reported as being "in use".
  The libunix.a variant defaults to report the deletion to have succeeded
  under these circumstances and later tries to delete the files marked
  for deletion. See <dos.h> for a brief documentation of how to change
  the behaviour.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15155 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-27 09:40:06 +00:00
0b833b8680 - Added the base_dir_nametest test program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15154 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 18:20:09 +00:00
b8ba11b158 - basename() and dirname() can no longer return NULL. They truncate the
resulting path name instead. This is done so because some code that
  calls basename() or dirname() does not check if the function's return
  value is NULL.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15153 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 18:19:44 +00:00
872b2b335b - Forgot to update chown() to use the same bug fix as fchown().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15152 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 15:41:50 +00:00
b1f56b1bbe - The SetOwner() fall-back code for Kickstart 2.04 was passing the wrong
parameters to the file system. The first (dp_Arg1) should have been
  zero. Ouch.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15151 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 15:38:21 +00:00
9ce2ba234f - Got rid of some more compiler warnings by introducing function prototypes
which were missing and by casting pointers to the expected types.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15150 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 15:12:47 +00:00
d5bfee3917 - Corrected a couple more compiler warnings caused by mutable/constant
string pointer assignments.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15149 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 14:51:15 +00:00
9f37f76b01 - Replaced "char *" pointers with "const char *" pointers.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15148 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 14:12:15 +00:00
2f3de1dcd6 - ttyname() now calls ttyname_r(). Also, the libunix.a version of ttyname_r()
will produce "/CONSOLE" rather than "CONSOLE:".


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15147 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 14:05:31 +00:00
74b2838663 - asctime_r() now returns NULL if the buffer is too short to hold even a single
byte of data.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15146 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 13:43:06 +00:00
2c450a1e48 - basename() is not supposed to modify the string it is passed and should
return a pointer to a string which can be modified. Now it does. Same
  thing for dirname().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15145 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-25 13:29:47 +00:00
828e36f2d7 - Fixed another compiler warning.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15143 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-22 09:19:07 +00:00
502d1aaab7 - Removed some more compiler warnings.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15142 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-22 09:02:51 +00:00
d6e18a9266 - If defined, the local environment variable "DISABLE_COMMANDLINE_WILDCARD_EXPANSION"
will disable expansion of wildcard patterns passed on the command line.
  Note that if the variable is not set then the global variable
  '__expand_wildcard_args' will provide the defaults for the switch that
  controls whether the wildcard expansion takes place. And after the
  environment variable has been checked, the '__expand_wildcard_args_check'
  function pointer can still be used to override the switch.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15141 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-22 07:54:25 +00:00
3fe72eaa44 - Removed a couple more compiler warnings.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15140 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-21 09:24:20 +00:00
3541b011a6 - Preparations for release...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15139 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-21 08:48:19 +00:00
7b903355a7 - fstat() now works with "NIL:" and "/dev/null", respectively. Not that
it returns much useful information, though.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15138 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-20 19:46:57 +00:00
36c33073a5 - Added the fstat() test program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15137 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-20 19:46:37 +00:00
fba16b67fd - The _PC_MAX_INPUT query for file handles now returns the default
buffer size.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15136 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-17 17:53:15 +00:00
5c29f84a0d - Integrated the new OS4 build makefile collection, as contributed by
Steven Solie. Thank you very much!


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15135 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-17 17:37:27 +00:00
aa3240972a *** empty log message ***
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15134 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-17 17:36:42 +00:00
8aeb5072ab - fpathconf() should work with the stdio streams, even in the thread-safe
library version, again.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15133 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-17 16:36:48 +00:00
42dba39aef - Added a new callback function which can be used in programs which want
to avoid that the command line wildcard expansion takes place.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15132 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-15 06:58:17 +00:00
927407de1b - updated m68k specs file in /documentation to contain an own __CLIB2__
define so that existing m68k compilers also have this define. In addition,
  the common "-noixemul" option can now also be specified but will do a NOP
  so that Makefiles sharing multiple runtime lib setups work without
  a warning.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15131 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-15 06:50:47 +00:00
f3dcdfe1ce - __get_default_file() now dynamically fills in file handles for the
stdin/stdout/stderr streams if it's part of the thread-safe library.

- fpathconf() now checks if the file descriptor is really referring to a file.

- The termios hook entry code could file descriptor's embedded file handle
  rather than what the thread safe library had dynamically bound to the
  stdin/stdout/stderr streams.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15130 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-09-12 14:16:44 +00:00
ead90dee0d - execve() now finds commands in the current directory again, even if you
omit the leading "./" path name.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15129 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-14 14:08:06 +00:00
1721b10610 - Dropped an unused local variable.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15128 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-13 15:56:38 +00:00
05ef0d30bc - It is unwise to strip the volume name portion from the path name
used in the GetDeviceProc() loop.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15127 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-13 15:35:40 +00:00
3a7ac52248 - The execve() code that looks for the command/script file now begins by
checking if the file name includes path separators. If it does not,
  then the search for the command begins with the resident command list;
  otherwise the local directories are checked. The new code also properly
  cleans after itself (a FreeDeviceProc() was missing) and the "PROGDIR:"
  lock now always refers to the directory in which the command/script
  file is found.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15126 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-13 15:15:11 +00:00
2c81be592c - Cleaned up and updated the .cvsignore file.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15125 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-07 08:41:53 +00:00
e158a3fe18 - Changed the execvp() test program to reflect how the corrected
execvp() function works.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15124 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-07 08:39:56 +00:00
40d64e1413 - Added the missing fdim() and fdimf() functions to the build
makefiles. The OS4 build makefile was missing lrint() and
  lrintf(). Ouch.

- execve() now checks if an abort signal arrives while it's trying
  to read the first line of a script, or looking for an executable
  on an assignment path.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15123 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-06 08:31:06 +00:00
62d0c2dc81 - execve() no longer directly calls exit(), but a function which can be
replaced by the user. If that function __execve_exit() does not call
  exit but just returns to the caller without doing anything, execve()
  will return the caller with the return code of the RunCommand()
  function.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15122 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-06 08:15:42 +00:00
940b8295c0 - Small corrections...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15121 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 14:44:01 +00:00
a91cb96b1b - That's setlocale and not setlocate.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15120 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 14:14:57 +00:00
864a0e703e - Hid setlocale and execvp_test
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15119 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 14:14:30 +00:00
5828c6cdab - execve() now actually works!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15118 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 11:07:57 +00:00
cdfe0dad6f - Added the "execvp_test" program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15117 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 09:22:38 +00:00
85122893ff - Added the POSIX exec() family functions, based upon code contributed
by Henning Nielsen Lund. Thank you very much!

- atoll() no longer sets 'errno' directly but now calls __set_errno()
  instead.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15116 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 08:00:30 +00:00
9caa5b7ec4 - Fixed to compile correctly.
- Changed how multi-volume assignments are handled by execve().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15115 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-02 06:49:47 +00:00
6cf4cc5b4a - The types of the __default_path_delimiter and __default_path variables
were wrong.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15114 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-01 19:06:48 +00:00
42acda07f3 - Rewrote execve() from scratch and documented it.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15113 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-01 19:01:17 +00:00
8633c3a77b - The default configuration options for execvp() are now configurable at
link time.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15112 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-01 17:01:14 +00:00
5f42fb06f9 - Added the exec() family functions to the makefiles and the <unistd.h>
header file.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15111 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-01 16:41:02 +00:00
4e1c4967e6 - Added preliminary versions of the exec() family functions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15110 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-08-01 14:27:52 +00:00
2d48db0ce0 - Added the missing string pointer.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15109 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-07-31 13:32:35 +00:00
e2cadc9ea5 - Added pathconf() and fpathconf() as contributed by Peter Bengtsson. Thank you very much!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15108 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-07-28 14:37:28 +00:00
bde4d37a64 - Added sysinfo() as contributed by Peter Bengtsson. Thank you very much!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15107 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-07-28 14:02:32 +00:00
c3d55e94ec - Added ftime(), ulimit(), getrlimit() and setrlimit() as contributed by
Peter Bengtsson. Thank you very much!


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15106 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2006-07-28 13:36:17 +00:00