Welcome, Guest. Please login or register.

Author Topic: New clib2 release 1.196  (Read 986 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SystemTopic starter

  • Full Member
  • ***
  • Join Date: Jul 2003
  • Posts: 199
    • http://amiga.org
New clib2 release 1.196
« on: October 15, 2005, 07:18:08 AM »
Olaf Barthel has relased a new version of clib2, an Amiga ANSI C Library. Read more for a full list of changes

Changes:
c.lib 1.196 (11.10.2005)

- Removed the various workarounds associated with , 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 , , , , , , and and updated , and 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.

- 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).

- 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.

- 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.

- 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 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");

- Following detection of a stack overflow, the startup code eventually called _exit(). It should have called exit() instead.

- tmpnam() wrote more than L_tmpnam bytes to the name buffer. Also, the TMP_MAX value was off by one.

Original : http://utilitybase.com/article?action=show&id=129