< prev index next >

src/java.base/unix/native/include/jvm_md.h

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #ifndef _JAVASOFT_JVM_MD_H_
  27 #define _JAVASOFT_JVM_MD_H_
  28 
  29 /*
  30  * This file is currently collecting system-specific dregs for the
  31  * JNI conversion, which should be sorted out later.
  32  */
  33 
  34 #include <dirent.h>             /* For DIR */
  35 #include <sys/param.h>          /* For MAXPATHLEN */
  36 #include <unistd.h>             /* For F_OK, R_OK, W_OK */
  37 #include <stddef.h>             /* For ptrdiff_t */
  38 #include <stdint.h>             /* For uintptr_t */
  39 
  40 #define JNI_ONLOAD_SYMBOLS   {"JNI_OnLoad"}
  41 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}




  42 
  43 #define JNI_LIB_PREFIX "lib"
  44 #ifdef __APPLE__
  45 #define JNI_LIB_SUFFIX ".dylib"
  46 #define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX
  47 #else
  48 #define JNI_LIB_SUFFIX ".so"
  49 #define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX "." VERSION
  50 #endif
  51 #define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
  52 
  53 #define JVM_MAXPATHLEN MAXPATHLEN




  54 
  55 #define JVM_R_OK    R_OK
  56 #define JVM_W_OK    W_OK
  57 #define JVM_X_OK    X_OK
  58 #define JVM_F_OK    F_OK
  59 
  60 /*
  61  * File I/O
  62  */
  63 
  64 #include <sys/types.h>
  65 #include <sys/stat.h>
  66 #include <fcntl.h>
  67 #include <errno.h>
  68 #include <signal.h>
  69 
  70 /* O Flags */
  71 
  72 #define JVM_O_RDONLY     O_RDONLY
  73 #define JVM_O_WRONLY     O_WRONLY
  74 #define JVM_O_RDWR       O_RDWR
  75 #define JVM_O_O_APPEND   O_APPEND
  76 #define JVM_O_EXCL       O_EXCL
  77 #define JVM_O_CREAT      O_CREAT
  78 
  79 /* Signals */
  80 


  81 #define JVM_SIGINT     SIGINT
  82 #define JVM_SIGTERM    SIGTERM
  83 








  84 
  85 #endif /* !_JAVASOFT_JVM_MD_H_ */


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #ifndef _JAVASOFT_JVM_MD_H_
  27 #define _JAVASOFT_JVM_MD_H_
  28 
  29 /*
  30  * This file is currently collecting system-specific dregs for the
  31  * JNI conversion, which should be sorted out later.
  32  */
  33 
  34 #include <dirent.h>             /* For DIR */
  35 #include <sys/param.h>          /* For MAXPATHLEN */
  36 #include <unistd.h>             /* For F_OK, R_OK, W_OK */
  37 #include <stddef.h>             /* For ptrdiff_t */
  38 #include <stdint.h>             /* For uintptr_t */
  39 
  40 #define JNI_ONLOAD_SYMBOLS   {"JNI_OnLoad"}
  41 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
  42 #define JVM_ONLOAD_SYMBOLS      {"JVM_OnLoad"}
  43 #define AGENT_ONLOAD_SYMBOLS    {"Agent_OnLoad"}
  44 #define AGENT_ONUNLOAD_SYMBOLS  {"Agent_OnUnload"}
  45 #define AGENT_ONATTACH_SYMBOLS  {"Agent_OnAttach"}
  46 
  47 #define JNI_LIB_PREFIX "lib"
  48 #ifdef __APPLE__
  49 #define JNI_LIB_SUFFIX ".dylib"
  50 #define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX
  51 #else
  52 #define JNI_LIB_SUFFIX ".so"
  53 #define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX "." VERSION
  54 #endif
  55 #define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
  56 
  57 // Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
  58 //       cause problems if JVM and the rest of JDK are built on different
  59 //       Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
  60 //       so buffers declared in VM are always >= 4096.
  61 #define JVM_MAXPATHLEN MAXPATHLEN + 1
  62 
  63 #define JVM_R_OK    R_OK
  64 #define JVM_W_OK    W_OK
  65 #define JVM_X_OK    X_OK
  66 #define JVM_F_OK    F_OK
  67 
  68 /*
  69  * File I/O
  70  */
  71 
  72 #include <sys/types.h>
  73 #include <sys/stat.h>
  74 #include <fcntl.h>
  75 #include <errno.h>
  76 #include <signal.h>
  77 









  78 /* Signals */
  79 
  80 #include <sys/socket.h>   // for socklen_t
  81 
  82 #define JVM_SIGINT     SIGINT
  83 #define JVM_SIGTERM    SIGTERM
  84 
  85 #define BREAK_SIGNAL     SIGQUIT           /* Thread dumping support.    */
  86 #define ASYNC_SIGNAL     SIGJVM2           /* Event-based suspend/resume support */
  87 #define SHUTDOWN1_SIGNAL SIGHUP            /* Shutdown Hooks support.    */
  88 #define SHUTDOWN2_SIGNAL SIGINT
  89 #define SHUTDOWN3_SIGNAL SIGTERM
  90 
  91 /* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
  92 #define JSIG_VERSION_1_4_1   0x30140100
  93 
  94 #endif /* !_JAVASOFT_JVM_MD_H_ */
< prev index next >