2004-01-28 20:02:12 -05:00
|
|
|
/* Icecast
|
|
|
|
*
|
|
|
|
* This program is distributed under the GNU General Public License, version 2.
|
|
|
|
* A copy of this license is included with this source.
|
|
|
|
*
|
|
|
|
* Copyright 2000-2004, Jack Moffitt <jack@xiph.org,
|
|
|
|
* Michael Smith <msmith@xiph.org>,
|
|
|
|
* oddsock <oddsock@xiph.org>,
|
|
|
|
* Karl Heyes <karl@xiph.org>
|
|
|
|
* and others (see AUTHORS for details).
|
|
|
|
*/
|
|
|
|
|
2004-11-11 17:36:03 -05:00
|
|
|
#ifndef __COMPAT_H__
|
|
|
|
#define __COMPAT_H__
|
|
|
|
|
2001-10-20 17:28:09 -04:00
|
|
|
/* compat.h
|
|
|
|
*
|
|
|
|
* This file contains most of the ugliness for header portability
|
|
|
|
* and common types across various systems like Win32, Linux and
|
|
|
|
* Solaris.
|
|
|
|
*/
|
|
|
|
|
2007-11-22 22:17:39 -05:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2005-12-17 07:41:34 -05:00
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2007-11-22 22:17:39 -05:00
|
|
|
#ifdef TIME_WITH_SYS_TIME
|
|
|
|
# include <sys/time.h>
|
|
|
|
# include <time.h>
|
|
|
|
#else
|
|
|
|
# ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
# else
|
|
|
|
# include <time.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
2005-12-17 07:41:34 -05:00
|
|
|
|
2001-10-20 17:28:09 -04:00
|
|
|
/* Make sure we define 64 bit types */
|
|
|
|
#ifdef _WIN32
|
2005-12-17 07:41:34 -05:00
|
|
|
# define PATH_SEPARATOR "\\"
|
|
|
|
# define size_t unsigned int
|
|
|
|
# define ssize_t int
|
2001-10-20 17:28:09 -04:00
|
|
|
# define int64_t __int64
|
|
|
|
# define uint64_t unsigned __int64
|
2004-01-14 20:01:09 -05:00
|
|
|
# define uint32_t unsigned int
|
2007-11-23 11:27:10 -05:00
|
|
|
# define PRIu64 "I64u"
|
2009-08-05 18:32:47 -04:00
|
|
|
# define PRId64 "I64d"
|
2001-10-20 17:28:09 -04:00
|
|
|
#else
|
2005-12-17 07:41:34 -05:00
|
|
|
# define PATH_SEPARATOR "/"
|
2007-11-23 11:27:10 -05:00
|
|
|
# if defined(HAVE_INTTYPES_H)
|
2004-03-09 13:33:06 -05:00
|
|
|
# include <inttypes.h>
|
2007-11-23 11:27:10 -05:00
|
|
|
# elif defined(HAVE_STDINT_H)
|
|
|
|
# include <stdint.h>
|
2001-10-20 17:28:09 -04:00
|
|
|
# endif
|
|
|
|
#endif
|
2004-11-11 17:36:03 -05:00
|
|
|
|
2008-09-08 22:18:22 -04:00
|
|
|
/* some defaults if not provided above */
|
|
|
|
#ifndef SCNdMAX
|
|
|
|
# define SCNdMAX "lld"
|
|
|
|
#endif
|
|
|
|
|
2004-11-11 17:36:03 -05:00
|
|
|
#endif /* __COMPAT_H__ */
|
|
|
|
|