jdk/src/java.desktop/unix/native/libawt_headless/awt/HeadlessToolkit.c
changeset 33653 c1ee09fe3274
parent 26751 70bac69b37c9
equal deleted inserted replaced
32995:a62c89adce3d 33653:c1ee09fe3274
     1 /*
     1 /*
     2  * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    29 #ifdef HEADLESS
    29 #ifdef HEADLESS
    30 
    30 
    31 extern JavaVM *jvm;
    31 extern JavaVM *jvm;
    32 
    32 
    33 JNIEXPORT jint JNICALL
    33 JNIEXPORT jint JNICALL
    34 JNI_OnLoad(JavaVM *vm, void *reserved)
    34 DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
    35 {
    35 {
    36     jvm = vm;
    36     jvm = vm;
    37     return JNI_VERSION_1_2;
    37     return JNI_VERSION_1_2;
    38 }
    38 }
    39 
    39 
       
    40 #ifndef STATIC_BUILD
       
    41 // The same function exists in libawt.a::awt_LoadLibrary.c
    40 JNIEXPORT jboolean JNICALL AWTIsHeadless() {
    42 JNIEXPORT jboolean JNICALL AWTIsHeadless() {
    41     return JNI_TRUE;
    43     return JNI_TRUE;
    42 }
    44 }
       
    45 #endif
    43 
    46 
    44 #endif
    47 #endif