home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / sun-java / stubs / include / jri_md.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.1 KB  |  94 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. #ifndef JRI_MD_H
  19. #define JRI_MD_H
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. #if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
  26. #    include <windows.h>
  27. #    if defined(_MSC_VER)
  28. #        if defined(WIN32) || defined(_WIN32)
  29. #            define JRI_PUBLIC_API(ResultType)    _declspec(dllexport) ResultType
  30. #            define JRI_PUBLIC_VAR(VarType)        VarType
  31. #        else /* !_WIN32 */
  32. #            if defined(_WINDLL)
  33. #            define JRI_PUBLIC_API(ResultType)    ResultType __cdecl __export __loadds 
  34. #            define JRI_PUBLIC_VAR(VarType)        VarType
  35. #        else /* !WINDLL */
  36. #            define JRI_PUBLIC_API(ResultType)    ResultType __cdecl __export
  37. #            define JRI_PUBLIC_VAR(VarType)        VarType
  38. #                   endif /* !WINDLL */
  39. #        endif /* !_WIN32 */
  40. #    elif defined(__BORLANDC__)
  41. #        if defined(WIN32) || defined(_WIN32)
  42. #            define JRI_PUBLIC_API(ResultType)    __export ResultType
  43. #            define JRI_PUBLIC_VAR(VarType)        VarType
  44. #        else /* !_WIN32 */
  45. #            define JRI_PUBLIC_API(ResultType)    ResultType _cdecl _export _loadds 
  46. #            define JRI_PUBLIC_VAR(VarType)        VarType
  47. #        endif
  48. #    else
  49. #        error Unsupported PC development environment.    
  50. #    endif
  51. #    ifndef IS_LITTLE_ENDIAN
  52. #        define IS_LITTLE_ENDIAN
  53. #    endif
  54.  
  55. /* Mac */
  56. #elif macintosh || Macintosh || THINK_C
  57. #    if defined(__MWERKS__)                /* Metrowerks */
  58. #        if !__option(enumsalwaysint)
  59. #            error You need to define 'Enums Always Int' for your project.
  60. #        endif
  61. #        if defined(GENERATING68K) && !GENERATINGCFM 
  62. #            if !__option(fourbyteints) 
  63. #                error You need to define 'Struct Alignment: 68k' for your project.
  64. #            endif
  65. #        endif /* !GENERATINGCFM */
  66. #        define JRI_PUBLIC_API(ResultType)    __declspec(export) ResultType
  67. #        define JRI_PUBLIC_VAR(VarType)        JRI_PUBLIC_API(VarType)
  68. #    elif defined(__SC__)                /* Symantec */
  69. #        error What are the Symantec defines? (warren@netscape.com)
  70. #    elif macintosh && applec            /* MPW */
  71. #        error Please upgrade to the latest MPW compiler (SC).
  72. #    else
  73. #        error Unsupported Mac development environment.
  74. #    endif
  75.  
  76. /* Unix or else */
  77. #else
  78. #   define JRI_PUBLIC_API(ResultType)        ResultType
  79. #   define JRI_PUBLIC_VAR(VarType)          VarType
  80. #endif
  81.  
  82. typedef unsigned char    jbool;
  83. typedef char        jbyte;
  84. #ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */
  85. typedef int        jint;
  86. #else
  87. typedef long        jint;
  88. #endif
  89.  
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93. #endif /* JRI_MD_H */
  94.