skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

posixishard.h (1019B)


      1 /* ISC license. */
      2 
      3 #ifndef SKALIBS_POSIXISHARD_H
      4 #define SKALIBS_POSIXISHARD_H
      5 
      6 #include <string.h>
      7 #include <errno.h>
      8 #include <limits.h>
      9 #include <sys/socket.h>
     10 
     11 #include <skalibs/gccattributes.h>
     12 #include <skalibs/stat.h>
     13 
     14  /*
     15     This header must be used with some broken OSes who have
     16     serious trouble implementing even easy parts of POSIX.
     17     It's supposed to be included *after* system headers, so
     18     it won't catch behaviour such as "this macro must be defined
     19     prior to including system headers in order to define that
     20     symbol". If that's what you need, include skalibs/nonposix.h
     21     instead, which must happen *before* system headers.
     22  */
     23 
     24 extern size_t strnlen (char const *, size_t) gccattr_pure ;
     25 
     26 #ifndef EPROTO
     27 #define EPROTO EPROTOTYPE
     28 #endif
     29 
     30 #ifndef MSG_NOSIGNAL
     31 #define MSG_NOSIGNAL 0
     32 #endif
     33 
     34 #ifdef PATH_MAX
     35 #define SKALIBS_PATH_MAX PATH_MAX
     36 #else
     37 #define SKALIBS_PATH_MAX 4096
     38 #endif
     39 
     40 #ifdef NAME_MAX
     41 #define SKALIBS_NAME_MAX NAME_MAX
     42 #else
     43 #define SKALIBS_NAME_MAX 255
     44 #endif
     45 
     46 #endif