libnostd

Not-so-standard standard macros and routines
Download

libnostd Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • William Ahern
  • Publisher web site:
  • http://25thandclement.com/~william/projects/

libnostd Tags


libnostd Description

Not-so-standard standard macros and routines libnostd is a collection of both cross-platform compatibility routines and macros, and common macros and routines used in general-purpose C programming.For example, one compatibility issue addressed are the < sys/time.h > timer macros and gettimeofday(2) routine, some or all of which are not available in a WIN32 environment but provided in this library. Similarly, the popular strlcpy(3) and strlcat(3) routines are provided.As a general rule, libnostd only contains interfaces which have a long history in the generally available body of C code. A de jure or de facto standard counts strongly (e.g. WinSock or ISO C99 routines).Most interfaces--setproctitle() the exception--are provided in headers files using macros and static inline function definitions. No extra compilation steps are required to make use of the library; simply add the appropriate include paths. In general, compatability is provided transparently. For instance, for strlcpy() simply #include < string.h >, as-if on any modern BSD environment.Some of the interfaces provided: * setproctitle() * arc4random() * arc4random_buf() * strlcpy() * strlcat() * err.h * sys/param.h * sys/queue.h * sys/tree.h * sys/time.h * stdatomic.h * strdupa() * strndupa() * strnlen() What's New in This Release: · Implement setproctitle() for Linux and Darwin/OS X. It doesn't seem possible to implement this inline as it needs to initialize a global state from the original argv and environ using __attribute__((constructor)). · It is thus currently presumed that if setproctitle is used the application will build the included setproctitle.c.


libnostd Related Software