summaryrefslogtreecommitdiffstats
path: root/nsplugins/sdk
diff options
context:
space:
mode:
Diffstat (limited to 'nsplugins/sdk')
-rw-r--r--nsplugins/sdk/jni_md.h32
-rw-r--r--nsplugins/sdk/jri.h1
-rw-r--r--nsplugins/sdk/jri_md.h48
-rw-r--r--nsplugins/sdk/jritypes.h1
-rw-r--r--nsplugins/sdk/npapi.h16
-rw-r--r--nsplugins/sdk/npruntime.h1
-rw-r--r--nsplugins/sdk/npupp.h1
-rw-r--r--nsplugins/sdk/obsolete/protypes.h1
-rw-r--r--nsplugins/sdk/prcpucfg.h93
-rw-r--r--nsplugins/sdk/prtypes.h1
10 files changed, 100 insertions, 95 deletions
diff --git a/nsplugins/sdk/jni_md.h b/nsplugins/sdk/jni_md.h
index c0aa11159..6ab327cd3 100644
--- a/nsplugins/sdk/jni_md.h
+++ b/nsplugins/sdk/jni_md.h
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+/*
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -63,9 +63,9 @@
* WHAT'S UP WITH THIS FILE?
*
* This is where we define the mystical JNI_PUBLIC_API macro that works on all
- * platforms. If you're running with Visual C++, Symantec C, or Borland's
+ * platforms. If you're running with Visual C++ or Symantec C
* development environment on the PC, you're all set. Or if you're on the Mac
- * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't
+ * with Symantec or MPW with SC you're ok too. For UNIX it shouldn't
* matter.
* Changes by sailesh on 9/26
@@ -132,18 +132,6 @@
# define JNICALL __export
# endif /* !WINDLL */
# endif /* !_WIN32 */
-# elif defined(__BORLANDC__)
-# if defined(WIN32) || defined(_WIN32)
-# define JNI_PUBLIC_API(ResultType) __export ResultType
-# define JNI_PUBLIC_VAR(VarType) VarType
-# define JNI_NATIVE_STUB(ResultType) __export ResultType
-# define JNICALL
-# else /* !_WIN32 */
-# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds
-# define JNI_PUBLIC_VAR(VarType) VarType
-# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds
-# define JNICALL _loadds
-# endif
# else
# error Unsupported PC development environment.
# endif
@@ -156,19 +144,7 @@
/* Mac */
#elif defined(macintosh) || defined(Macintosh) || defined(THINK_C)
-# if defined(__MWERKS__) /* Metrowerks */
-# if !__option(enumsalwaysint)
-# error You need to define 'Enums Always Int' for your project.
-# endif
-# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM
-# if !__option(fourbyteints)
-# error You need to define 'Struct Alignment: 68k' for your project.
-# endif
-# endif /* !GENERATINGCFM */
-# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType
-# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType)
-# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType)
-# elif defined(__SC__) /* Symantec */
+# if defined(__SC__) /* Symantec */
# error What are the Symantec defines? (warren@netscape.com)
# elif macintosh && applec /* MPW */
# error Please upgrade to the latest MPW compiler (SC).
diff --git a/nsplugins/sdk/jri.h b/nsplugins/sdk/jri.h
index f29945b94..d80654f6b 100644
--- a/nsplugins/sdk/jri.h
+++ b/nsplugins/sdk/jri.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
diff --git a/nsplugins/sdk/jri_md.h b/nsplugins/sdk/jri_md.h
index 5ae741ed3..3faf842dc 100644
--- a/nsplugins/sdk/jri_md.h
+++ b/nsplugins/sdk/jri_md.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -53,9 +52,9 @@ extern "C" {
* WHAT'S UP WITH THIS FILE?
*
* This is where we define the mystical JRI_PUBLIC_API macro that works on all
- * platforms. If you're running with Visual C++, Symantec C, or Borland's
+ * platforms. If you're running with Visual C++ or Symantec C
* development environment on the PC, you're all set. Or if you're on the Mac
- * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't
+ * with Symantec or MPW with SC you're ok too. For UNIX it shouldn't
* matter.
*
* On UNIX though you probably care about a couple of other symbols though:
@@ -106,22 +105,6 @@ extern "C" {
# define JRI_CALLBACK __export
# endif /* !WINDLL */
# endif /* !_WIN32 */
-# elif defined(__BORLANDC__)
-# if defined(WIN32) || defined(_WIN32)
-# define JRI_PUBLIC_API(ResultType) __export ResultType
-# define JRI_PUBLIC_VAR(VarType) VarType
-# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType
-# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType
-# define JRI_NATIVE_STUB(ResultType) __export ResultType
-# define JRI_CALLBACK
-# else /* !_WIN32 */
-# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds
-# define JRI_PUBLIC_VAR(VarType) VarType
-# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType
-# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType
-# define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds
-# define JRI_CALLBACK _loadds
-# endif
# else
# error Unsupported PC development environment.
# endif
@@ -131,21 +114,7 @@ extern "C" {
/* Mac */
#elif defined (macintosh) || defined(Macintosh) || defined(THINK_C)
-# if defined(__MWERKS__) /* Metrowerks */
-# if !__option(enumsalwaysint)
-# error You need to define 'Enums Always Int' for your project.
-# endif
-# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM
-# if !__option(fourbyteints)
-# error You need to define 'Struct Alignment: 68k' for your project.
-# endif
-# endif /* !GENERATINGCFM */
-# define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType
-# define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType)
-# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType)
-# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType)
-# define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType)
-# elif defined(__SC__) /* Symantec */
+# if defined(__SC__) /* Symantec */
# error What are the Symantec defines? (warren@netscape.com)
# elif macintosh && applec /* MPW */
# error Please upgrade to the latest MPW compiler (SC).
@@ -209,16 +178,7 @@ typedef long jint;
#ifdef HAVE_LONG_LONG
-#ifdef OSF1
-
-/* long is default 64-bit on OSF1, -std1 does not allow long long */
-typedef long jlong;
-typedef unsigned long julong;
-#define jlong_MAXINT 0x7fffffffffffffffL
-#define jlong_MININT 0x8000000000000000L
-#define jlong_ZERO 0x0L
-
-#elif (defined(WIN32) || defined(_WIN32))
+#if (defined(WIN32) || defined(_WIN32))
typedef LONGLONG jlong;
typedef DWORDLONG julong;
diff --git a/nsplugins/sdk/jritypes.h b/nsplugins/sdk/jritypes.h
index ddeb6331c..ed7769be7 100644
--- a/nsplugins/sdk/jritypes.h
+++ b/nsplugins/sdk/jritypes.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
diff --git a/nsplugins/sdk/npapi.h b/nsplugins/sdk/npapi.h
index 16c71b97a..92ccc6e60 100644
--- a/nsplugins/sdk/npapi.h
+++ b/nsplugins/sdk/npapi.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -93,21 +92,6 @@
# endif /* XP_WIN */
#endif /* _WINDOWS */
-#ifdef __MWERKS__
-# define _declspec __declspec
-# ifdef macintosh
-# ifndef XP_MAC
-# define XP_MAC 1
-# endif /* XP_MAC */
-# endif /* macintosh */
-# ifdef __INTEL__
-# undef NULL
-# ifndef XP_WIN
-# define XP_WIN 1
-# endif /* XP_WIN */
-# endif /* __INTEL__ */
-#endif /* __MWERKS__ */
-
#if defined(XP_MAC) || defined(XP_MACOSX)
#include <Quickdraw.h>
#include <Events.h>
diff --git a/nsplugins/sdk/npruntime.h b/nsplugins/sdk/npruntime.h
index 45f3f0a9a..b5d656352 100644
--- a/nsplugins/sdk/npruntime.h
+++ b/nsplugins/sdk/npruntime.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright � 2004, Apple Computer, Inc. and The Mozilla Foundation.
* All rights reserved.
diff --git a/nsplugins/sdk/npupp.h b/nsplugins/sdk/npupp.h
index dff545d9f..769897dc6 100644
--- a/nsplugins/sdk/npupp.h
+++ b/nsplugins/sdk/npupp.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
diff --git a/nsplugins/sdk/obsolete/protypes.h b/nsplugins/sdk/obsolete/protypes.h
index e96cfcf67..5d9190aa2 100644
--- a/nsplugins/sdk/obsolete/protypes.h
+++ b/nsplugins/sdk/obsolete/protypes.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
diff --git a/nsplugins/sdk/prcpucfg.h b/nsplugins/sdk/prcpucfg.h
index a8dd53fa1..71fd9f658 100644
--- a/nsplugins/sdk/prcpucfg.h
+++ b/nsplugins/sdk/prcpucfg.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -650,6 +649,98 @@
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
+#elif defined(__riscv) && (__riscv_xlen == 32)
+
+#undef IS_BIG_ENDIAN
+#define IS_LITTLE_ENDIAN 1
+#undef 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 4
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 4
+#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 32
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 32
+
+#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 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 4
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD 4
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#elif defined(__riscv) && (__riscv_xlen == 64)
+
+#undef IS_BIG_ENDIAN
+#define IS_LITTLE_ENDIAN 1
+#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
+
#else
#error "Unknown CPU architecture"
diff --git a/nsplugins/sdk/prtypes.h b/nsplugins/sdk/prtypes.h
index b68361082..842013ee8 100644
--- a/nsplugins/sdk/prtypes.h
+++ b/nsplugins/sdk/prtypes.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file