Update openbsd support for openbsd >= 3.4

Thanks to Peter Str��mberg <wilfried@spamcop.net> for pulling these patches out of openbsd's ports tree.
Bug #236599 r=cls sr=wtc
This commit is contained in:
seawood%netscape.com 2004-03-10 07:49:53 +00:00
parent b8889d3155
commit 59575a8bbf
2 changed files with 64 additions and 13 deletions

View File

@ -45,7 +45,7 @@
#define PR_AF_INET6 24 /* same as AF_INET6 */
#if defined(__i386__) || defined(__arm32__)
#if defined(__i386__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
@ -91,6 +91,56 @@
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
#elif defined(__amd64__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define IS_64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#define HAVE_LONG_LONG
#define HAVE_ALIGNED_DOUBLES
#define HAVE_ALIGNED_LONGLONGS
#elif defined(__sparc_v9__)
#undef IS_LITTLE_ENDIAN

View File

@ -43,14 +43,14 @@
#define _PR_SI_ARCHITECTURE "x86"
#elif defined(__alpha__)
#define _PR_SI_ARCHITECTURE "alpha"
#elif defined(__amd64__)
#define _PR_SI_ARCHITECTURE "amd64"
#elif defined(__m68k__)
#define _PR_SI_ARCHITECTURE "m68k"
#elif defined(__powerpc__)
#define _PR_SI_ARCHITECTURE "powerpc"
#elif defined(__sparc__)
#define _PR_SI_ARCHITECTURE "sparc"
#elif defined(__arm32__)
#define _PR_SI_ARCHITECTURE "arm32"
#endif
#define PR_DLL_SUFFIX ".so.1.0"
@ -71,6 +71,12 @@
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
#define _PR_INET6
#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETHOSTBYNAME2
#define _PR_HAVE_GETADDRINFO
#define _PR_INET6_PROBE
#define USE_SETJMP
#ifndef _PR_PTHREADS
@ -80,19 +86,14 @@
#define CONTEXT(_th) ((_th)->md.context)
#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__)
#if defined(__i386__) || defined(__sparc__) || defined(__m68k__)
#define JB_SP_INDEX 2
#elif defined(__powerpc__)
#define JB_SP_INDEX 1
#elif defined(__alpha__)
#define JB_SP_INDEX 34
#elif defined(__arm32__)
/*
* On the arm32, the jmpbuf regs underwent a name change after OpenBSD 1.3.
*/
#ifdef JMPBUF_REG_R13
#define JB_SP_INDEX JMPBUF_REG_R13
#else
#define JB_SP_INDEX _JB_REG_R13
#endif
#elif defined(__amd64__)
#define JB_SP_INDEX 6
#else
#error "Need to define SP index in jmp_buf here"
#endif