Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:20

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 
0029 #ifdef _WIN32
0030 # define WIN32_LEAN_AND_MEAN
0031 # include <windows.h>
0032 # include <malloc.h>
0033 # define PATH_DEV_NULL  "nul"
0034 # ifdef _WIN64
0035 #  define SIZE_FMT_SPECIFIER    "%I64u"
0036 # else
0037 #  define SIZE_FMT_SPECIFIER    "%u"
0038 # endif
0039 # ifndef ssize_t
0040 # ifndef __MINGW32__
0041 #  include <BaseTsd.h>
0042 # else
0043 #  include <basetsd.h>
0044 # endif
0045 #  define ssize_t SSIZE_T
0046 # endif
0047 # ifndef __MINGW32__
0048 #  include "win-dirent.h"
0049 # else
0050 # include <dirent.h>
0051 # endif
0052 # define PKGCONF_ITEM_SIZE (_MAX_PATH + 1024)
0053 #else
0054 # define PATH_DEV_NULL  "/dev/null"
0055 # define SIZE_FMT_SPECIFIER "%zu"
0056 # ifdef __HAIKU__
0057 #  include <FindDirectory.h>
0058 # endif
0059 # include <dirent.h>
0060 # include <unistd.h>
0061 # include <limits.h>
0062 # include <strings.h>
0063 # ifdef PATH_MAX
0064 #  define PKGCONF_ITEM_SIZE (PATH_MAX + 1024)
0065 # else
0066 #  define PKGCONF_ITEM_SIZE (4096 + 1024)
0067 # endif
0068 #endif
0069 
0070 #endif