src/java.desktop/unix/native/libawt_headless/awt/HeadlessToolkit.c
author ihse
Sat, 03 Mar 2018 08:21:47 +0100
branchihse-warnings-cflags-branch
changeset 56230 489867818774
parent 47216 71c04702a3d5
permissions -rw-r--r--
No longer disable E_OLD_STYLE_FUNC_DEF.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11103
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     1
/*
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 26751
diff changeset
     2
 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
11103
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     4
 *
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    10
 *
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    15
 * accompanied this code).
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    16
 *
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    20
 *
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    23
 * questions.
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    24
 */
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    25
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    26
#include <jni.h>
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    27
#include <jni_util.h>
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    28
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    29
#ifdef HEADLESS
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    30
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    31
extern JavaVM *jvm;
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    32
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    33
JNIEXPORT jint JNICALL
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 26751
diff changeset
    34
DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
11103
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    35
{
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    36
    jvm = vm;
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    37
    return JNI_VERSION_1_2;
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    38
}
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    39
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 26751
diff changeset
    40
#ifndef STATIC_BUILD
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 26751
diff changeset
    41
// The same function exists in libawt.a::awt_LoadLibrary.c
56230
489867818774 No longer disable E_OLD_STYLE_FUNC_DEF.
ihse
parents: 47216
diff changeset
    42
JNIEXPORT jboolean JNICALL AWTIsHeadless(void) {
11103
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    43
    return JNI_TRUE;
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    44
}
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 26751
diff changeset
    45
#endif
11103
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    46
e156ce2c4a96 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris.
serb
parents:
diff changeset
    47
#endif