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

349 Commits

Author SHA1 Message Date
c7fbdf27e1 - Added Steven Solie's new OS4 build makefile.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15057 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-11-04 09:35:02 +00:00
010d4c1c06 - Preparations for clib2 1.197 release.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15056 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-11-04 09:21:44 +00:00
81958fd44b - Tried to reduce the number of compiler warnings generated.
- The cross compiler GNUmakefile.os4 variant now also logs all warnings
  and errors to a compiler.log file.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15055 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-27 08:58:41 +00:00
937169c0ba - Updated the OS4 build makefile to allow for a parallel build to work
better. Note that this is not yet entirely succesful.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15054 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-27 08:26:17 +00:00
dda36eb609 - IsServerProcess() should have read ProcessIsServer().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15053 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-23 11:58:12 +00:00
867e6d500a - Updated the new __obtain_daemon_message() function to call a
bsdsocket.library API function to determine if what appears to be
  a valid daemon startup message is sound.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15052 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-23 09:53:39 +00:00
99e9ebfc15 - Moved the code which rebinds the standard I/O streams to the server
socket into a separate function which can be overridden by user code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15051 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-20 07:19:16 +00:00
63c08cfe0e - The network startup code no longer checks for the presence of a possible
daemon startup message by default. You now have to enable this feature
  by declaring a global variable called "__check_daemon_startup" which is
  described in <dos.h>.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15050 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-20 06:50:32 +00:00
b6de3e4c48 - In <stdbool.h> the preprocessor definition should read
"__bool_true_false_are_defined" rather than "__bool_true_and_false_are_defined".
  Thanks go to Peter Bengtsson for finding and fixing it.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15049 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-19 08:11:44 +00:00
090753282b - Added __set_h_errno() and __get_h_errno() functions.
- The thread-safe library now tries to enable bsdsocket.library base
  sharing and attempts to make the TCP/IP stack call the local
  __set_errno() and __set_h_errno(), so that any Process calling
  the library functions will get a chance to see proper error
  codes. Whether any of these features could be enabled can be tested
  through two global variables __can_share_socket_library_base and
  __thread_safe_errno_h_errno which are defined in <dos.h>. Note that
  for both features to work you will need the Roadshow bsdsocket.library
  version 4.275 or higher.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15048 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-17 13:54:25 +00:00
d45da0acd4 - Corrected a variable name.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15047 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-16 09:17:11 +00:00
3480ec40b3 - Updated the build files so that atanh() and atanhf() are built for the
respective math libraries.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15046 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-16 09:14:28 +00:00
f9e782d358 - Implemented atanh() and atanhf() which were not listed in the TODO
file but were still unimplemented up until now.

- Replaced ldexp() and modf().


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15045 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-16 09:05:03 +00:00
44bcf889e5 - Corrected a typo.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15044 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-16 08:34:52 +00:00
257dd6af88 - Updated math_hypot.c to a newer (e_hypot.c 1.3 95/01/18) version from
fdlibm which uses macros for manipulating the high and low words of a
  double, like the rest of fdlibm functions in clib2. The previous version
  would give bogus results when compiled with -O3 in clib2 which lead to
  "interesting" results (and lots of fun while searching for the problem)
  in Ghostscript. Wish I managed to track this down yesterday for 1.196
  release... <aantonijevic>


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15043 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 19:05:18 +00:00
acafd14bc2 - Removed <sys/clib2_net.h> and every reference to it.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15042 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 11:24:53 +00:00
b63587ed80 - Removed the compiler log file generation.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15041 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 09:37:27 +00:00
b861ed19c4 - Removed a couple of compiler warnings; fishing for more...
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15040 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 09:28:29 +00:00
ccfea73fc5 - Updated the thread-safe library documentation section.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15039 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2005-10-11 08:28:32 +00:00
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