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

330 Commits

Author SHA1 Message Date
d74640b15b - Getting ready to make a new release.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15038 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 07:37:58 +00:00
db9a1c69e5 - Resolved the vulnerability by caching the socket descriptor while the
stdio data is still locked.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15037 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-09 14:48:19 +00:00
cb1f1a4a10 - Removed the various workarounds associated with <unistd.h>, required
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
2005-10-09 12:32:18 +00:00
bb2376a6ed - Implemented lrintf(), lrint(), lroundf(), lround(), nearbyintf(),
nearbyint(), remquof(), remquo(), roundf(), round(), tgammaf(),
  tgamma(), truncf(), trunc(). Sort of implemented fmaf() and fma(),
  which really ought to be done in "SIMD" fashion.

  This completes the "real" floating point math library (ignoring
  for a moment that the floating point environment code is still
  not implemented).


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15035 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-09 10:38:56 +00:00
159e55f1e6 - Fixed the locking and the NULL pointer reference.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15034 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-09 09:05:27 +00:00
4e30f5604d - accept() now calls the bsdsocket.library accept() function first
and then hooks up the socket with the clib2 data structures. This
  makes it possible to have several Processes calling the accept()
  stub at the same time.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15033 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-08 15:59:56 +00:00
095a14bf1f - When the main() function returns directly or indirectly by way of
calling exit(), the IoErr() value set at this time will now be
  preserved until the program really returns control to the shell.
  This turned out to be easier to implement than I had originally
  thought, thanks to the fact that the atexit() functions are all
  invoked straight after the exit() call.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15032 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-28 10:28:38 +00:00
f84fbc32cb - The ERANGE initialization is not necessary.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15031 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-28 09:51:16 +00:00
3099f6210a - strtoimax(), strtoumax(), strtod(), strtof(), strtol(), strtoll(),
strtoul() and strtoull() now count how many digits were converted.
  If that number is zero, then the conversion is considered to have
  failed: 0 is returned, errno is set to ERANGE and the 'ptr' parameter
  reference is initialized with a pointer to the string to be converted.
  This has two consequences:

     1) A floating point number that has no digits in the significand
        is no longer converted to zero. For example ".e10" can no longer
        result in a successful conversion.

     2) You can detect if a conversion is successful by comparing pointers
        after the conversion function has returned:

           char * str;
           char * ptr;
           long n;

           n = strtol(str,&ptr,10);
           if(n == 0 && str == ptr)
              printf("conversion has failed");


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15030 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-28 09:28:39 +00:00
378e50d2ab - tmpnam() wrote more than L_tmpnam bytes to the name buffer. Also, the
TMP_MAX value was off by one.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15029 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-04 11:28:00 +00:00
0d85b41a2d - Following detection of a stack overflow, the startup code eventually
called _exit(). It should have called exit() instead.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15028 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-04 07:38:51 +00:00
7a57c4d499 - Fixed a typo in the new tag item list.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15026 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-03 14:45:14 +00:00
cef75752d9 - Getting ready for release...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15025 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-09-03 14:09:56 +00:00
d31a351d6c - DoTimer() did not allocate the local MsgPort correctly. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15024 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-31 07:26:13 +00:00
2e56caa3fb - The 68020/030/040/060 versions of the library now include the
64 bit integer conversion code. The plain 68000 version does not.

- The 64 bit integer conversion code used in by the scanf() family
  was broken due to a misplaced overflow check, which had the cruel
  effect of triggering for 32 bit integers as well. Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15023 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-27 12:57:26 +00:00
4cde124d5d - Added the sscanf_64 test program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15022 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-27 12:52:26 +00:00
1d1d340ae1 - The 68020/030/040/060 library version now supports 64 bit integers
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
2005-08-27 12:12:50 +00:00
6612118e97 - log(+/-0), logb(+/-0), log10(+/-0) now return -infinity.
- getcwd() now considers a buffer size of 0 an error, and it sets
  the errno code to ERANGE if the buffer is too small.

- With Unix path semantics enabled, rename() now fails if either
  the old or the new name are empty strings. Same thing for
  opendir(), utime(), unlink(), chown(), link(), readlink(),
  realpath(), chdir(), access(), stat(), rmdir(), lstat(),
  chmod(), statfs() and open()/fopen().

- Fixed several issues with the formatted output of strftime()
  for the "C" locale: "%p" could return " PM", "%c" is now
  equivalent to "%a %b %e %T %Y", "%x" is equivalent to "%m/%d/%y"
  and "%X" is now equivalent to "%T".


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15020 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-26 12:39:33 +00:00
5acfef419b - Added the "date_test" program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15019 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-26 12:21:51 +00:00
eb10d40332 - The startup code now references the linker symbol generated for
the user-supplied main() function.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15018 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-20 14:25:20 +00:00
6aaa439593 - Fixed to built properly.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15017 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-15 11:31:39 +00:00
b76ec2c143 - We now check if the file refers to a pipe before we make assumptions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15016 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-15 10:43:54 +00:00
773035a695 - Modified select() to support plain files, too. The new code now
compares the current file position against the current file size,
  if that file is on a file system, or simply checks if there is
  any data in the file (which works for the default PIPE: device).

- The raw file descriptor structure member fd_Position is now
  always updated, regardless of whether the file supports random
  access or not.

- The wildcard escape character used in __wildcard_expand_init() was
  wrong. It should have been "'" but it was "`". Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15015 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-15 10:17:48 +00:00
79be2279ec - In __time_delay() the CheckIO() test was wrong and should have
tested for a request still in progress. Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15014 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-08-02 10:18:50 +00:00
b1f08e4123 - Getting ready for a new release...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15013 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-15 14:45:01 +00:00
872c9bc39c - <sys/types.h> now also includes <time.h> and <stddef.h>.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15012 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-15 14:31:37 +00:00
132aaa8293 - The socket/usergroup API function and data type definitions that used to
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
2005-07-12 13:35:58 +00:00
882875d79a - The thread-safe version of isatty() should now work for stdio
file descriptors, too.

- Retrofitted thread-safety into the termios code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15010 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-06 18:48:53 +00:00
cd7b02f4d7 - Added some documentation on the skeleton library code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15009 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 13:24:35 +00:00
2ed463f8e3 - Added a complete shared library skeleton example to demonstrate how the
clib2 shared library initialization/cleanup functions should be used.
  This is a dual-build library which will both work with the plain 68k
  AmigaOS and the PowerPC native AmigaOS4. The example source code can be
  found in the "skeleton_library" subdirectory.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15008 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 11:25:34 +00:00
acaf12ee7c - Fixed an important error in the documentation...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15007 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 11:22:23 +00:00
fdb188da1a - Added the clib2 shared library initialization/cleanup code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15006 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 11:21:14 +00:00
9d2ab96b56 - Modified to build with the thread-safe library on OS4.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15005 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 11:14:27 +00:00
6ba2f7a178 - Updated to use the proper OS4 build environment.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15004 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 11:06:23 +00:00
525bdde6d5 - Updated for dual PowerPC/68k build.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15002 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 10:25:33 +00:00
38818e6502 - Added shared library skeleton code (68k-only for now).
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15000 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-07-04 09:39:00 +00:00
ebf5d63bc6 - Moved all the constructor code out of "stdlib_init_exit.c" and into the
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
2005-07-03 10:36:48 +00:00
2421ffcbb9 Removed unneeded baserel stuff
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14998 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 12:02:56 +00:00
2bdd055f4b Fixed a bug in getopt_long
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14997 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 12:01:50 +00:00
039c805161 *** empty log message ***
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14996 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 12:01:00 +00:00
e19974fe47 Added file system names
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14995 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 11:59:37 +00:00
bb41d5e549 *** empty log message ***
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14994 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 11:58:26 +00:00
fd163c7105 output_buffer wasn't set correctly when the buffer was allocated
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14993 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 11:57:26 +00:00
a3d61a67c8 - Corrected a typo in the object build list (math_exp2f.c rather than
math_expf2.c).


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14992 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 11:46:21 +00:00
459d57da9c - Dropped stdlib_wildcard_expand.c, which is no longer necessary.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14991 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 11:34:44 +00:00
3d58795d0f - Repaired the pattern matching code which expands command line arguments:
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
2005-06-26 10:23:05 +00:00
e293873dc7 - The pattern matching code which expands command line arguments, as part
of libunix.a, now translates the "*" wildcard into "#?" unless you prefix
  it with a backtick ("`"), which is the wildcard pattern escape character
  used on AmigaOS.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14989 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-26 09:57:52 +00:00
17e3b3b0e2 - Implemented exp2()/exp2f() and log2()/log2f() as suggested by
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
2005-06-26 09:06:12 +00:00
ae1ac21c71 *** empty log message ***
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14987 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-21 15:03:14 +00:00
2025e39014 lstat would overwrite the passed-in name in lstat_lock with ReadLink
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14986 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-06-21 15:01:08 +00:00