< prev index next >

src/java.base/unix/native/libjava/jni_util_md.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 57,75 **** strcat(jniEntryName, "_"); strcat(jniEntryName, cname); } } ! size_t getLastErrorString(char *buf, size_t len) { if (errno == 0 || len < 1) return 0; getErrorString(errno, buf, len); return strlen(buf); } ! int getErrorString(int err, char *buf, size_t len) { if (err == 0 || len < 1) return 0; return strerror_r(err, buf, len); } --- 57,75 ---- strcat(jniEntryName, "_"); strcat(jniEntryName, cname); } } ! JNIEXPORT size_t JNICALL getLastErrorString(char *buf, size_t len) { if (errno == 0 || len < 1) return 0; getErrorString(errno, buf, len); return strlen(buf); } ! JNIEXPORT int JNICALL getErrorString(int err, char *buf, size_t len) { if (err == 0 || len < 1) return 0; return strerror_r(err, buf, len); }
< prev index next >