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:
Erik Boasson 2019-07-05 23:15:41 +02:00 committed by eboasson
parent 47920df65c
commit fda285e2f5
52 changed files with 1266 additions and 4197 deletions

View file

@ -0,0 +1,8 @@
#ifndef DDSRT_FIXUP_INTTYPES_H
#define DDSRT_FIXUP_INTTYPES_H
#include_next "inttypes.h"
#define PRIuPTR "lu"
#define PRIxPTR "lx"
#endif /* DDSRT_FIXUP_INTTYPES_H */

View file

@ -0,0 +1,22 @@
#ifndef DDSRT_FIXUP_MATH_H
#define DDSRT_FIXUP_MATH_H
#include_next "math.h"
/* INFINITY, HUGE_VALF, HUGE_VALL are all standard C99, but Solaris 2.6
antedates that by a good margin and GCC's fixed-up headers don't
define it, so we do it here */
#undef HUGE_VAL
#ifdef __GNUC__
# define INFINITY (__builtin_inff ())
# define HUGE_VAL (__builtin_huge_val ())
# define HUGE_VALF (__builtin_huge_valf ())
# define HUGE_VALL (__builtin_huge_vall ())
#else
# define INFINITY 1e10000
# define HUGE_VAL 1e10000
# define HUGE_VALF 1e10000f
# define HUGE_VALL 1e10000L
#endif
#endif /* DDSRT_FIXUP_MATH_H */

View file

@ -0,0 +1,10 @@
#ifndef DDSRT_FIXUP_NETINET_IN_H
#define DDSRT_FIXUP_NETINET_IN_H
#include_next "netinet/in.h"
#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
#endif
#endif /* DDSRT_FIXUP_NETINET_IN_H */

View file

@ -0,0 +1,11 @@
#ifndef DDSRT_FIXUP_STDINT_H
#define DDSRT_FIXUP_STDINT_H
#include <sys/int_types.h>
#include <limits.h>
#ifndef UINT32_C
#define UINT32_C(v) (v ## U)
#endif
#endif /* DDSRT_FIXUP_STDINT_H */

View file

@ -0,0 +1,14 @@
#ifndef DDSRT_FIXUP_SYS_SOCKET_H
#define DDSRT_FIXUP_SYS_SOCKET_H
#include "netinet/in.h"
#include_next "sys/socket.h"
typedef size_t socklen_t;
struct sockaddr_storage {
sa_family_t ss_family;
struct sockaddr_in stuff;
};
#endif /* DDSRT_FIXUP_SYS_SOCKET_H */