1
0
mirror of https://frontier.innolan.net/rainlance/amiga-ntimed.git synced 2025-11-21 05:50:14 +00:00
Files
amiga-ntimed/ntimed_platform.h
2015-03-20 17:13:13 +01:00

103 lines
2.9 KiB
C

/*
* Copyright (c) 2015 Carsten Larsen
* 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.
*
*/
#ifndef NTIMED_PLATFROM_H
#define NTIMED_PLATFROM_H
#if defined(AROS) || defined(AOS3)
#ifndef AMIGA
#define AMIGA
#endif
#endif
#include "mem.h"
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <resources/battclock.h>
#include <clib/battclock_protos.h>
#include <clib/utility_protos.h>
#ifdef AROS
#ifdef Debug
#undef Debug
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <proto/socket.h>
#include <sys/socket.h>
#include <bsdsocket/socketbasetags.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef Debug
#undef Debug
#endif
#endif
#ifdef AOS3
#define ARGPTR STRPTR
#define ARGS_FORMAT ARGSFORMAT
#define BSDLIB_NAME "bsdsocket.library"
#define BSDLIB_REV 04L
#define UTILLIB_NAME "utility.library"
#define UTILLIB_REV 33L
#define TIMER_NAME TIMERNAME
#define BATTCLOCK_NAME BATTCLOCKNAME
#endif
#ifdef AROS
#define ARGPTR CONST_STRPTR
#define ARGS_FORMAT (CONST_STRPTR)ARGSFORMAT
#define BSDLIB_NAME (CONST_STRPTR)"bsdsocket.library"
#define BSDLIB_REV 04L
#define UTILLIB_NAME (CONST_STRPTR)"utility.library"
#define UTILLIB_REV 33L
#define TIMER_NAME (CONST_STRPTR)TIMERNAME
#define BATTCLOCK_NAME (CONST_STRPTR)BATTCLOCKNAME
#define APRT IPRT
#endif
void amiga_save_time(void);
void amiga_sync_time(int seconds);
void EnableDebug();
void EnableTraceDebug();
#define SetSyncTime amiga_sync_time
#define Time_Amiga_Save amiga_save_time
#ifdef Debug
#undef Debug
#endif
#endif