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