1 /*
   2  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef OS_SOLARIS_LAUNCHER_JAVA_MD_H
  26 #define OS_SOLARIS_LAUNCHER_JAVA_MD_H
  27 
  28 /*
  29  * Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
  30  * search "GAMMA" for gamma specific changes.
  31  */
  32 
  33 #ifndef JAVA_MD_H
  34 #define JAVA_MD_H
  35 
  36 #include <limits.h>
  37 #include <unistd.h>
  38 #include <sys/param.h>
  39 #ifndef GAMMA
  40 #include "manifest_info.h"
  41 #endif
  42 
  43 #define PATH_SEPARATOR          ':'
  44 #define FILESEP                 "/"
  45 #define FILE_SEPARATOR          '/'
  46 #ifndef MAXNAMELEN
  47 #define MAXNAMELEN              PATH_MAX
  48 #endif
  49 
  50 #ifdef JAVA_ARGS
  51 /*
  52  * ApplicationHome is prepended to each of these entries; the resulting
  53  * strings are concatenated (separated by PATH_SEPARATOR) and used as the
  54  * value of -cp option to the launcher.
  55  */
  56 #ifndef APP_CLASSPATH
  57 #define APP_CLASSPATH        { "/lib/tools.jar", "/classes" }
  58 #endif
  59 #endif
  60 
  61 #ifdef HAVE_GETHRTIME
  62 /*
  63  * Support for doing cheap, accurate interval timing.
  64  */
  65 #include <sys/time.h>
  66 #define CounterGet()              (gethrtime()/1000)
  67 #define Counter2Micros(counts)    (counts)
  68 #else
  69 #define CounterGet()              (0)
  70 #define Counter2Micros(counts)    (1)
  71 #endif /* HAVE_GETHRTIME */
  72 
  73 /*
  74  * Function prototypes.
  75  */
  76 #ifndef GAMMA
  77 char *LocateJRE(manifest_info* info);
  78 void ExecJRE(char *jre, char **argv);
  79 #endif
  80 int UnsetEnv(char *name);
  81 
  82 #endif
  83 
  84 #endif // OS_SOLARIS_LAUNCHER_JAVA_MD_H