55 |
static char *copy_string(JNIEnv *env, jobject string); |
static char *copy_string(JNIEnv *env, jobject string); |
56 |
static char *copy_elem(JNIEnv *env, jobject stringArray, jint i); |
static char *copy_elem(JNIEnv *env, jobject stringArray, jint i); |
57 |
|
|
58 |
/* Some O/S's don't declare this */ |
/* Some O/S's don't declare 'environ' */ |
59 |
|
#if HAVE_CRT_EXTERNS_H |
60 |
|
/* Darwin does not have a variable named environ |
61 |
|
but has a function which you can get the environ |
62 |
|
variable with. */ |
63 |
|
#include <crt_externs.h> |
64 |
|
#define environ (*_NSGetEnviron()) |
65 |
|
#else |
66 |
extern char **environ; |
extern char **environ; |
67 |
|
#endif /* HAVE_CRT_EXTERNS_H */ |
68 |
|
|
69 |
/* |
/* |
70 |
* Internal helper function to copy a String in UTF-8 format. |
* Internal helper function to copy a String in UTF-8 format. |