text: /*
   * Bits and pieces taken from bitrig.org and openbsd.org repos.
   *
   * Permission to use, copy, modify, and distribute this software for any
   * purpose with or without fee is hereby granted, provided that the above
   * copyright notice and this permission notice appear in all copies.
   *
   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  
  #define nitems(_a)  (sizeof((_a)) / sizeof((_a)[0]))
  
  #define _PW_NAME_LEN 31 /* max length, not counting NUL */
  
  #define setresgid(a, b, c) setgid(a)
  #define setresuid(a, b, c) setuid(a)
  #define srand_deterministic srand
  
  #define _DARWIN_C_SOURCE
  #define st_mtim st_mtimespec
  
  #include <time.h>
  #ifndef timespeccmp
  #define	timespeccmp(tsp, usp, cmp)					\
  	(((tsp)->tv_sec == (usp)->tv_sec) ?				\
  	    ((tsp)->tv_nsec cmp (usp)->tv_nsec) :			\
  	    ((tsp)->tv_sec cmp (usp)->tv_sec))
  #endif
  
  long long strtonum(const char *, long long, long long, const char **);
  