Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-08 10:22:29

0001 /*
0002  * stdinc.h
0003  * pull in standard headers (including portability hacks)
0004  *
0005  * Copyright (c) 2012 pkgconf authors (see AUTHORS).
0006  *
0007  * Permission to use, copy, modify, and/or distribute this software for any
0008  * purpose with or without fee is hereby granted, provided that the above
0009  * copyright notice and this permission notice appear in all copies.
0010  *
0011  * This software is provided 'as is' and without any warranty, express or
0012  * implied.  In no event shall the authors be liable for any damages arising
0013  * from the use of this software.
0014  */
0015 
0016 #ifndef LIBPKGCONF_STDINC_H
0017 #define LIBPKGCONF_STDINC_H
0018 
0019 #include <ctype.h>
0020 #include <stdio.h>
0021 #include <stdlib.h>
0022 #include <stddef.h>
0023 #include <stdbool.h>
0024 #include <stdarg.h>
0025 #include <string.h>
0026 #include <sys/types.h>
0027 #include <stdint.h>
0028 #include <errno.h>
0029 
0030 #ifdef _WIN32
0031 # define WIN32_LEAN_AND_MEAN
0032 # include <windows.h>
0033 # include <malloc.h>
0034 # define PATH_DEV_NULL  "nul"
0035 # ifdef _WIN64
0036 #  ifndef __MINGW32__
0037 #   define SIZE_FMT_SPECIFIER   "%I64u"
0038 #  else
0039 #   define SIZE_FMT_SPECIFIER   "%llu"
0040 #  endif
0041 # else
0042 #  define SIZE_FMT_SPECIFIER    "%u"
0043 # endif
0044 # ifndef ssize_t
0045 # ifndef __MINGW32__
0046 #  include <BaseTsd.h>
0047 # else
0048 #  include <basetsd.h>
0049 # endif
0050 #  define ssize_t SSIZE_T
0051 # endif
0052 # ifndef __MINGW32__
0053 #  include "win-dirent.h"
0054 # else
0055 # include <dirent.h>
0056 # endif
0057 # define PKGCONF_ITEM_SIZE (_MAX_PATH + 1024)
0058 #else
0059 # define PATH_DEV_NULL  "/dev/null"
0060 # define SIZE_FMT_SPECIFIER "%zu"
0061 # ifdef __HAIKU__
0062 #  include <FindDirectory.h>
0063 # endif
0064 # include <dirent.h>
0065 # include <unistd.h>
0066 # include <limits.h>
0067 # include <strings.h>
0068 # ifdef PATH_MAX
0069 #  define PKGCONF_ITEM_SIZE (PATH_MAX + 1024)
0070 # else
0071 #  define PKGCONF_ITEM_SIZE (4096 + 1024)
0072 # endif
0073 #endif
0074 
0075 #endif