2012-05-11 18:47:20 +00:00
|
|
|
/*
|
|
|
|
* stdinc.h
|
|
|
|
* pull in standard headers (including portability hacks)
|
|
|
|
*
|
2012-07-26 02:09:31 +00:00
|
|
|
* Copyright (c) 2012 pkgconf authors (see AUTHORS).
|
2012-05-11 18:47:20 +00:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or 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.
|
|
|
|
*
|
2012-07-20 19:29:58 +00:00
|
|
|
* This software is provided 'as is' and without any warranty, express or
|
|
|
|
* implied. In no event shall the authors be liable for any damages arising
|
|
|
|
* from the use of this software.
|
2012-05-11 18:47:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __STDINC_H
|
|
|
|
#define __STDINC_H
|
|
|
|
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2016-08-26 06:11:50 +00:00
|
|
|
#include <stddef.h>
|
2012-05-11 18:47:20 +00:00
|
|
|
#include <stdbool.h>
|
2015-09-06 17:01:12 +00:00
|
|
|
#include <stdarg.h>
|
2012-05-11 18:47:20 +00:00
|
|
|
#include <string.h>
|
2012-07-26 05:07:27 +00:00
|
|
|
#include <sys/types.h>
|
2015-05-22 04:16:37 +00:00
|
|
|
#include <stdint.h>
|
2012-05-11 18:47:20 +00:00
|
|
|
|
2012-05-12 22:54:47 +00:00
|
|
|
#ifdef _WIN32
|
2012-05-11 18:47:20 +00:00
|
|
|
# define WIN32_LEAN_AND_MEAN
|
|
|
|
# include <windows.h>
|
|
|
|
# include <malloc.h>
|
2012-07-21 19:33:07 +00:00
|
|
|
# define PATH_DEV_NULL "nul"
|
2017-09-08 23:44:28 +00:00
|
|
|
# ifdef _WIN64
|
|
|
|
# define SIZE_FMT_SPECIFIER "%llu"
|
|
|
|
# else
|
|
|
|
# define SIZE_FMT_SPECIFIER "%lu"
|
|
|
|
# endif
|
2017-06-05 02:19:55 +00:00
|
|
|
# ifndef ssize_t
|
2017-07-16 18:21:45 +00:00
|
|
|
# ifndef __MINGW32__
|
2017-06-05 02:19:55 +00:00
|
|
|
# include <BaseTsd.h>
|
2017-07-16 18:21:45 +00:00
|
|
|
# else
|
|
|
|
# include <basetsd.h>
|
|
|
|
# endif
|
2017-06-05 02:19:55 +00:00
|
|
|
# define ssize_t SSIZE_T
|
|
|
|
# endif
|
2017-07-16 18:21:45 +00:00
|
|
|
# ifndef __MINGW32__
|
|
|
|
# include "win-dirent.h"
|
|
|
|
# else
|
|
|
|
# include <dirent.h>
|
|
|
|
# endif
|
2012-07-21 19:33:07 +00:00
|
|
|
#else
|
|
|
|
# define PATH_DEV_NULL "/dev/null"
|
2017-09-08 23:44:28 +00:00
|
|
|
# define SIZE_FMT_SPECIFIER "%zu"
|
2017-06-05 02:19:55 +00:00
|
|
|
# include <dirent.h>
|
|
|
|
# include <unistd.h>
|
2012-05-11 18:47:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|