Add support for Solaris 2.6 on sun4m builds
It is an excellent platform for catching bugs: big-endian, slow enough that a context switch in the middle of an operation becomes a regular occurrence, and all that on a SMP box. Or: I just wanted to see if it would work. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
47920df65c
commit
fda285e2f5
52 changed files with 1266 additions and 4197 deletions
|
@ -16,12 +16,12 @@
|
|||
#include <lwip/sockets.h>
|
||||
#include <lwip/netdb.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -37,19 +37,32 @@ typedef int ddsrt_socket_t;
|
|||
# define DDSRT_HAVE_IPV6 1
|
||||
# endif
|
||||
# if LWIP_DNS && LWIP_SOCKET
|
||||
# define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_GETADDRINFO DDSRT_WITH_DNS
|
||||
# endif
|
||||
# define DDSRT_HAVE_SSM 0
|
||||
# define DDSRT_HAVE_SSM 0
|
||||
# define DDSRT_HAVE_INET_NTOP 1
|
||||
# define DDSRT_HAVE_INET_PTON 1
|
||||
|
||||
# define IFF_UP 0x1
|
||||
# define IFF_BROADCAST 0x2
|
||||
# define IFF_LOOPBACK 0x8
|
||||
# define IFF_POINTOPOINT 0x10
|
||||
# define IFF_UP 0x1
|
||||
# define IFF_BROADCAST 0x2
|
||||
# define IFF_LOOPBACK 0x8
|
||||
# define IFF_POINTOPOINT 0x10
|
||||
# define IFF_MULTICAST 0x1000
|
||||
#elif __SunOS_5_6
|
||||
# define DDSRT_HAVE_IPV6 0
|
||||
# define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_GETADDRINFO 0
|
||||
# define DDSRT_HAVE_SSM 0
|
||||
# define DDSRT_HAVE_INET_NTOP 0
|
||||
# define DDSRT_HAVE_INET_PTON 0
|
||||
#else /* LWIP_SOCKET */
|
||||
# define DDSRT_HAVE_IPV6 1
|
||||
# define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_SSM 1
|
||||
# define DDSRT_HAVE_IPV6 1
|
||||
# define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_GETADDRINFO DDSRT_WITH_DNS
|
||||
# define DDSRT_HAVE_SSM 1
|
||||
# define DDSRT_HAVE_INET_NTOP 1
|
||||
# define DDSRT_HAVE_INET_PTON 1
|
||||
#endif /* LWIP_SOCKET */
|
||||
|
||||
typedef struct iovec ddsrt_iovec_t;
|
||||
|
|
|
@ -12,8 +12,11 @@ typedef SOCKET ddsrt_socket_t;
|
|||
#define DDSRT_INVALID_SOCKET (INVALID_SOCKET)
|
||||
#define PRIdSOCK PRIuPTR
|
||||
|
||||
#define DDSRT_HAVE_IPV6 1
|
||||
#define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
#define DDSRT_HAVE_IPV6 1
|
||||
#define DDSRT_HAVE_DNS DDSRT_WITH_DNS
|
||||
#define DDSRT_HAVE_GETADDRINFO DDSRT_WITH_DNS
|
||||
#define DDSRT_HAVE_INET_NTOP 1
|
||||
#define DDSRT_HAVE_INET_PTON 1
|
||||
|
||||
#if defined(NTDDI_VERSION) && \
|
||||
defined(_WIN32_WINNT_WS03) && \
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include "dds/ddsrt/sync/freertos.h"
|
||||
#elif _WIN32
|
||||
#include "dds/ddsrt/sync/windows.h"
|
||||
#elif __SunOS_5_6
|
||||
#include "dds/ddsrt/sync/solaris2.6.h"
|
||||
#else
|
||||
#include "dds/ddsrt/sync/posix.h"
|
||||
#endif
|
||||
|
|
44
src/ddsrt/include/dds/ddsrt/sync/solaris2.6.h
Normal file
44
src/ddsrt/include/dds/ddsrt/sync/solaris2.6.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v. 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
* v. 1.0 which is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
*/
|
||||
#ifndef DDSRT_POSIX_SYNC_H
|
||||
#define DDSRT_POSIX_SYNC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#if HAVE_LKST
|
||||
#include "lkst.h"
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
pthread_cond_t cond;
|
||||
} ddsrt_cond_t;
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t mutex;
|
||||
} ddsrt_mutex_t;
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t rwlock;
|
||||
} ddsrt_rwlock_t;
|
||||
|
||||
typedef pthread_once_t ddsrt_once_t;
|
||||
#define DDSRT_ONCE_INIT PTHREAD_ONCE_INIT
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DDSRT_POSIX_SYNC_H */
|
Loading…
Add table
Add a link
Reference in a new issue