@@ -8,17 +8,24 @@ JL_DLLEXPORT char *dirname(char *);
88#include <libgen.h>
99#endif
1010
11+ #ifdef _OS_WINDOWS_
12+ #define DLLEXPORT __declspec(dllexport)
13+ #else
14+ #define DLLEXPORT
15+ #endif
16+
17+
1118// Julia headers (for initialization and gc commands)
1219#include "julia.h"
1320#include "julia_init.h"
1421#include "uv.h"
1522
16- void setup_args (int argc , char * * argv ) {
23+ static void setup_args (int argc , char * * argv ) {
1724 uv_setup_args (argc , argv );
1825 jl_parse_opts (& argc , & argv );
1926}
2027
21- const char * get_sysimage_path (const char * libname ) {
28+ static const char * get_sysimage_path (const char * libname ) {
2229 if (libname == NULL ) {
2330 jl_error ("julia: Specify `libname` when requesting the sysimage path" );
2431 exit (1 );
@@ -40,7 +47,7 @@ const char *get_sysimage_path(const char *libname) {
4047 return libpath ;
4148}
4249
43- void set_depot_load_path (const char * root_dir ) {
50+ static void set_depot_load_path (const char * root_dir ) {
4451#ifdef _WIN32
4552 char * path_sep = ";" ;
4653 char * julia_share_subdir = "\\share\\julia" ;
@@ -83,7 +90,7 @@ void set_depot_load_path(const char *root_dir) {
8390 free (new_depot_path );
8491}
8592
86- void init_julia (int argc , char * * argv ) {
93+ DLLEXPORT void init_julia (int argc , char * * argv ) {
8794 setup_args (argc , argv );
8895
8996 const char * sysimage_path = get_sysimage_path (JULIAC_PROGRAM_LIBNAME );
@@ -114,4 +121,4 @@ void init_julia(int argc, char **argv) {
114121 free (_sysimage_path );
115122}
116123
117- void shutdown_julia (int retcode ) { jl_atexit_hook (retcode ); }
124+ DLLEXPORT void shutdown_julia (int retcode ) { jl_atexit_hook (retcode ); }
0 commit comments