hotspot/src/cpu/zero/vm/jni_zero.h
author coleenp
Tue, 01 Feb 2011 11:23:19 -0500
changeset 8106 19106a0203fb
parent 7397 5b173b4ca846
child 8921 14bfe81f2a9d
permissions -rw-r--r--
6588413: Use -fvisibility=hidden for gcc compiles Summary: Add option for gcc 4 and above, define JNIEXPORT and JNIIMPORT to visibility=default, add for jio_snprintf and others since -fvisibility=hidden overrides --version-script definitions. Reviewed-by: kamg, never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     3
 * Copyright 2009 Red Hat, Inc.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     5
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
     8
 * published by the Free Software Foundation.  Oracle designates this
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     9
 * particular file as subject to the "Classpath" exception as provided
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    10
 * by Oracle in the LICENSE file that accompanied this code.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    11
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    12
 * This code is distributed in the hope that it will be useful, but WITHOUT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    14
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    15
 * version 2 for more details (a copy is included in the LICENSE file that
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    16
 * accompanied this code).
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    17
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    18
 * You should have received a copy of the GNU General Public License version
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    19
 * 2 along with this work; if not, write to the Free Software Foundation,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    20
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    21
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    22
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    23
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    24
 * questions.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    25
 */
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    26
8106
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    27
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    28
#if defined(__GNUC__) && (__GNUC__ >= 4)
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    29
  #define JNIEXPORT     __attribute__((visibility("default")))
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    30
  #define JNIIMPORT     __attribute__((visibility("default")))
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    31
#else
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    32
  #define JNIEXPORT
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    33
  #define JNIIMPORT
19106a0203fb 6588413: Use -fvisibility=hidden for gcc compiles
coleenp
parents: 7397
diff changeset
    34
#endif
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    35
#define JNICALL
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    36
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    37
typedef int jint;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    38
typedef signed char jbyte;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    39
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    40
#ifdef _LP64
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    41
typedef long jlong;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    42
#else
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    43
typedef long long jlong;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    44
#endif