equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 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 |
72 strcpy(jniEntryName, sym); |
72 strcpy(jniEntryName, sym); |
73 } |
73 } |
74 return; |
74 return; |
75 } |
75 } |
76 |
76 |
77 size_t |
77 JNIEXPORT size_t |
78 getLastErrorString(char *utf8_jvmErrorMsg, size_t cbErrorMsg) |
78 getLastErrorString(char *utf8_jvmErrorMsg, size_t cbErrorMsg) |
79 { |
79 { |
80 size_t n = 0; |
80 size_t n = 0; |
81 if (cbErrorMsg > 0) { |
81 if (cbErrorMsg > 0) { |
82 BOOLEAN noError = FALSE; |
82 BOOLEAN noError = FALSE; |
142 } |
142 } |
143 } |
143 } |
144 return n; |
144 return n; |
145 } |
145 } |
146 |
146 |
147 int |
147 JNIEXPORT int |
148 getErrorString(int err, char *buf, size_t len) |
148 getErrorString(int err, char *buf, size_t len) |
149 { |
149 { |
150 int ret = 0; |
150 int ret = 0; |
151 if (err == 0 || len < 1) return 0; |
151 if (err == 0 || len < 1) return 0; |
152 ret = strerror_s(buf, len, err); |
152 ret = strerror_s(buf, len, err); |