src/java.base/unix/native/libjli/java_md_common.c
changeset 49440 396ea30afbd5
parent 47216 71c04702a3d5
child 56721 01b558efd286
child 59323 ae2eb76c486d
equal deleted inserted replaced
49439:bf53d82a51e5 49440:396ea30afbd5
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2018, 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
   176 
   176 
   177     JLI_MemFree(tmp_path);
   177     JLI_MemFree(tmp_path);
   178     return result;
   178     return result;
   179 }
   179 }
   180 
   180 
   181 void JLI_ReportErrorMessage(const char* fmt, ...) {
   181 JNIEXPORT void JNICALL
       
   182 JLI_ReportErrorMessage(const char* fmt, ...) {
   182     va_list vl;
   183     va_list vl;
   183     va_start(vl, fmt);
   184     va_start(vl, fmt);
   184     vfprintf(stderr, fmt, vl);
   185     vfprintf(stderr, fmt, vl);
   185     fprintf(stderr, "\n");
   186     fprintf(stderr, "\n");
   186     va_end(vl);
   187     va_end(vl);
   187 }
   188 }
   188 
   189 
   189 void JLI_ReportErrorMessageSys(const char* fmt, ...) {
   190 JNIEXPORT void JNICALL
       
   191 JLI_ReportErrorMessageSys(const char* fmt, ...) {
   190     va_list vl;
   192     va_list vl;
   191     char *emsg;
   193     char *emsg;
   192 
   194 
   193     /*
   195     /*
   194      * TODO: its safer to use strerror_r but is not available on
   196      * TODO: its safer to use strerror_r but is not available on
   203     vfprintf(stderr, fmt, vl);
   205     vfprintf(stderr, fmt, vl);
   204     fprintf(stderr, "\n");
   206     fprintf(stderr, "\n");
   205     va_end(vl);
   207     va_end(vl);
   206 }
   208 }
   207 
   209 
   208 void  JLI_ReportExceptionDescription(JNIEnv * env) {
   210 JNIEXPORT void JNICALL
       
   211 JLI_ReportExceptionDescription(JNIEnv * env) {
   209   (*env)->ExceptionDescribe(env);
   212   (*env)->ExceptionDescribe(env);
   210 }
   213 }
   211 
   214 
   212 /*
   215 /*
   213  *      Since using the file system as a registry is a bit risky, perform
   216  *      Since using the file system as a registry is a bit risky, perform
   343        }
   346        }
   344    }
   347    }
   345    return findBootClass(env, classname);
   348    return findBootClass(env, classname);
   346 }
   349 }
   347 
   350 
   348 StdArg
   351 JNIEXPORT StdArg JNICALL
   349 *JLI_GetStdArgs()
   352 *JLI_GetStdArgs()
   350 {
   353 {
   351     return NULL;
   354     return NULL;
   352 }
   355 }
   353 
   356 
   354 int
   357 JNIEXPORT int JNICALL
   355 JLI_GetStdArgc() {
   358 JLI_GetStdArgc() {
   356     return 0;
   359     return 0;
   357 }
   360 }
   358 
   361 
   359 jobjectArray
   362 jobjectArray