Files

76 lines
3.0 KiB
C
Raw Permalink Normal View History

2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
/* Copyright (c) 2015 Carsten Larsen
2015-03-17 10:02:28 +01:00
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
2015-03-17 10:02:28 +01:00
#ifndef NTIMED_COMPILER_H
#define NTIMED_COMPILER_H
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
2015-03-19 14:41:38 +01:00
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
// More info at:
// http://codewiz.org/projects/amiga/Headers/CompilerSpecific.h
//--------------------------------------------------------------------------//
2015-03-17 10:02:28 +01:00
#ifdef __VBCC__
2015-04-18 22:08:39 +02:00
# include <stdint.h>
# include <sys/socket.h>
# define nan(p) NAN
# define __inline
# define __printflike(a, b)
# define round(x) x > 0.0 ? floor(x + 0.5) : ceil(x - 0.5)
2015-03-17 10:02:28 +01:00
typedef uint32_t register_t;
#endif
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
2015-04-18 22:08:39 +02:00
#ifdef __GNUC__
# if (__GNUC__ == 2 && __GNUC_MINOR__ == 95)
# include <math.h>
# include <sys/types.h>
# define round(x) x > 0.0 ? floor(x + 0.5) : ceil(x - 0.5)
# define nan(p) 0./0.
2015-07-25 23:11:11 +02:00
typedef u_int8_t uint8_t;
typedef u_int16_t uint16_t;
typedef u_int32_t uint32_t;
typedef u_int64_t uint64_t;
typedef uint32_t uintptr_t;
typedef unsigned int socklen_t;
2015-04-18 22:08:39 +02:00
# endif
# ifdef AROS
# include <stdint.h>
2015-07-25 23:11:11 +02:00
typedef uint32_t register_t;
2015-04-18 22:08:39 +02:00
# endif
2015-07-25 23:11:11 +02:00
typedef uint16_t in_port_t;
typedef unsigned int sa_family_t;
2015-03-17 10:02:28 +01:00
#endif
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
2015-03-17 10:02:28 +01:00
struct sockaddr_storage {
2015-07-25 23:11:11 +02:00
sa_family_t ss_family;
char __ss_pad1[128 - sizeof(sa_family_t)];
2015-03-17 10:02:28 +01:00
};
2015-07-25 23:11:11 +02:00
//--------------------------------------------------------------------------//
2015-03-17 10:02:28 +01:00
#endif