mirror of
https://frontier.innolan.net/rainlance/amiga-ntimed.git
synced 2025-11-22 11:01:41 +00:00
Removed unused IPv6 reference
This commit is contained in:
106
atimed.h
106
atimed.h
@ -1,106 +0,0 @@
|
||||
/*
|
||||
* 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 ATIMED_H
|
||||
#define ATIMED_H
|
||||
|
||||
#if defined(AROS) || defined(AOS3)
|
||||
#ifndef AMIGA
|
||||
#define AMIGA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef AOS3
|
||||
#include <exec/types.h>
|
||||
#include <exec/memory.h>
|
||||
#define IPTR APTR
|
||||
#define CONST_STRPTR STRPTR
|
||||
#define ARGSPTR LONG*
|
||||
#endif
|
||||
|
||||
#ifdef AROS
|
||||
#define ARGSPTR IPTR*
|
||||
#endif
|
||||
|
||||
#ifdef AOS3
|
||||
#include <machine/limits.h>
|
||||
#include <machine/types.h>
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef uint32_t uintptr_t;
|
||||
|
||||
#include <math.h>
|
||||
static inline double
|
||||
round(double x)
|
||||
{
|
||||
return x > 0.0 ? floor(x + 0.5) : ceil(x - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define nan(p) 0./0.
|
||||
|
||||
#ifdef AROS
|
||||
#include <stdint.h>
|
||||
typedef uint32_t register_t;
|
||||
#endif
|
||||
|
||||
#ifdef AOS3
|
||||
#define ATIMER TIMERNAME
|
||||
#endif
|
||||
|
||||
#ifdef AROS
|
||||
#define ATIMER (CONST_STRPTR)TIMERNAME
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
#define AF_INET6 10
|
||||
#endif
|
||||
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES (sizeof(register_t) - 1)
|
||||
#define ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
typedef unsigned int sa_family_t;
|
||||
typedef unsigned int socklen_t;
|
||||
typedef uint16_t in_port_t;
|
||||
|
||||
|
||||
// General socket address holding structure, big enough to hold either
|
||||
// struct sockaddr_in or struct sockaddr_in6 data:
|
||||
struct sockaddr_storage {
|
||||
sa_family_t ss_family; // address family
|
||||
|
||||
// all this is padding, implementation specific, ignore it:
|
||||
char __ss_pad1[128 - sizeof(sa_family_t)];
|
||||
};
|
||||
|
||||
void amiga_save_time(void);
|
||||
#define Time_Amiga_Save amiga_save_time
|
||||
|
||||
#endif
|
||||
@ -132,8 +132,6 @@ ntp_peerset_fillgroup(struct ocx *ocx, struct ntp_peerset *nps,
|
||||
Fail(ocx, 1, "hostname '%s', port '123': %s\n",
|
||||
lookup, gai_strerror(error));
|
||||
for (res = res0; res; res = res->ai_next) {
|
||||
if (res->ai_family != AF_INET && res->ai_family != AF_INET6)
|
||||
continue;
|
||||
np = NTP_Peer_New(ng->hostname, res->ai_addr, res->ai_addrlen);
|
||||
AN(np);
|
||||
TAILQ_FOREACH(np2, &nps->head, list)
|
||||
|
||||
Reference in New Issue
Block a user