mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Add check for stdint.h, since Solaris doesn't have it. This is needed
on Linux for uint64_t, but Solaris defines this in sys/types.h. Use check where appropriate, and also add typedefs for Win32. svn path=/trunk/icecast/; revision=2206
This commit is contained in:
parent
9e6fddca93
commit
42688a8366
@ -61,6 +61,8 @@ AC_SEARCH_LIBS(getipnodebyname, nsl,
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADER(stdint.h, AC_DEFINE(HAVE_STDINT_H, 1),,)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
|
16
src/compat.h
Normal file
16
src/compat.h
Normal file
@ -0,0 +1,16 @@
|
||||
/* compat.h
|
||||
*
|
||||
* This file contains most of the ugliness for header portability
|
||||
* and common types across various systems like Win32, Linux and
|
||||
* Solaris.
|
||||
*/
|
||||
|
||||
/* Make sure we define 64 bit types */
|
||||
#ifdef _WIN32
|
||||
# define int64_t __int64
|
||||
# define uint64_t unsigned __int64
|
||||
#else
|
||||
# ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#endif
|
@ -1,7 +1,8 @@
|
||||
#ifndef __CONNECTION_H__
|
||||
#define __CONNECTION_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include "compat.h"
|
||||
|
||||
typedef struct connection_tag
|
||||
{
|
||||
|
@ -3,13 +3,15 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <mmsystem.h>
|
||||
# include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
#include "timing.h"
|
||||
|
@ -1,7 +1,14 @@
|
||||
#ifndef __TIMING_H__
|
||||
#define __TIMING_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
typedef int64_t __int64;
|
||||
typedef uint64_t unsigned __int64;
|
||||
#endif
|
||||
|
||||
uint64_t timing_get_time(void);
|
||||
void timing_sleep(uint64_t sleeptime);
|
||||
|
Loading…
Reference in New Issue
Block a user