diff options
author | wtc%netscape.com <devnull@localhost> | 2003-09-16 00:11:51 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-09-16 00:11:51 +0000 |
commit | c98e68fb77ebbd31b2727620efcd1b70270d06ee (patch) | |
tree | 4b90049a4b28486968732435d4efb094eb6e8c82 | |
parent | 293d1a90742c43cac16868b8f0505356790284af (diff) | |
download | nspr-hg-c98e68fb77ebbd31b2727620efcd1b70270d06ee.tar.gz |
Bugzilla bug 124958: Checked in OpenBSD changes from Mats Palmgren
<mats.palmgren@bredband.net>. Added support for 64-bit SPARC v9, ELF
objects, etc.
Modified Files: _openbsd.cfg prlink.c prnetdb.c prtime.c
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r-- | pr/include/md/_openbsd.cfg | 50 | ||||
-rw-r--r-- | pr/src/linking/prlink.c | 4 | ||||
-rw-r--r-- | pr/src/misc/prnetdb.c | 2 | ||||
-rw-r--r-- | pr/src/misc/prtime.c | 2 |
4 files changed, 53 insertions, 5 deletions
diff --git a/pr/include/md/_openbsd.cfg b/pr/include/md/_openbsd.cfg index 8721a429..c22f192c 100644 --- a/pr/include/md/_openbsd.cfg +++ b/pr/include/md/_openbsd.cfg @@ -91,9 +91,57 @@ #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 +#elif defined(__sparc_v9__) + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 +#define HAVE_LONG_LONG +#define HAVE_ALIGNED_DOUBLES +#define HAVE_ALIGNED_LONGLONGS +#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_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + #elif defined(__sparc__) -#undef IS_LITTLE_ENDIAN 1 +#undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define HAVE_LONG_LONG #define HAVE_ALIGNED_DOUBLES diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c index 7037b3c6..e980b649 100644 --- a/pr/src/linking/prlink.c +++ b/pr/src/linking/prlink.c @@ -162,8 +162,8 @@ struct _imcb *IAC$GL_IMAGE_LIST = NULL; * On these platforms, symbols have a leading '_'. */ #if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \ - || defined(OPENBSD) || defined(WIN16) \ - || (defined(NETBSD) && !defined(__ELF__)) + || defined(WIN16) \ + || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__)) #define NEED_LEADING_UNDERSCORE #endif diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c index 58da1094..9396f2fa 100644 --- a/pr/src/misc/prnetdb.c +++ b/pr/src/misc/prnetdb.c @@ -321,7 +321,7 @@ _pr_QueryNetIfs(void) } #elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \ - || defined(NETBSD) + || defined(NETBSD) || defined(OPENBSD) /* * Use the BSD getifaddrs function. diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c index aeb7992c..78904f09 100644 --- a/pr/src/misc/prtime.c +++ b/pr/src/misc/prtime.c @@ -1666,7 +1666,7 @@ PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm) */ #if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \ - || defined(NETBSD) + || defined(NETBSD) || defined(OPENBSD) a.tm_zone = NULL; a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset; #endif |