[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bacula-devel] patch: use DLL_IMP_EXP for all exported symbols on win32


Hello,
bacula uses the DLL_IMP_EXP macro to tag all variables that must be visible outside bacula.dll Functions, however, are exported using a .def file, a more cumbersome method requiring to use mangled names. Since the def files uses mangled names, every compiler requires a separate file (64 bit requires a different file, too). This patch uses the DLL_IMP_EXP macro to export all symbols, removing the need for a .def file.
Advantages:
- supported by all win32 compilers, including gcc and msvc
- no need to have different configuration files for different compilers or bit sizes. - exported symbols are tagged in the .h with an simple and uniform syntax, easier to use (even for unix developers :)


Disadvantages:
- every exported symbol must be decorated by DLL_IMP_EXP, making the declaration uglier.

Note:
a subsequent patch will remove the def file of cats.dll

Riccardo
Index: src/qt-console/bat.pro.mingw32.in
===================================================================
--- src/qt-console/bat.pro.mingw32.in	(revision 8043)
+++ src/qt-console/bat.pro.mingw32.in	(working copy)
@@ -18,6 +18,7 @@
 TARGET       = bat
 DEPENDPATH  += .
 INCLUDEPATH += .. . ./console ./restore ./select
+QMAKE_CXXFLAGS += -DUSING_DLL
 
 cross-win32 {
 #  LIBS       +=  ../win32/dll/bacula.a
Index: src/cats/Makefile.in
===================================================================
--- src/cats/Makefile.in	(revision 8043)
+++ src/cats/Makefile.in	(working copy)
@@ -11,7 +11,7 @@
 # this dir relative to top dir
 thisdir = src/cats
 
-CPPFLAGS += -DBUILDING_CATS @DBI_DBD_DRIVERDIR@
+CPPFLAGS += -DBUILDING_CATS -DUSING_DLL @DBI_DBD_DRIVERDIR@
 
 DEBUG=@DEBUG@
 MKDIR=$(topdir)/autoconf/mkinstalldirs
Index: src/baconfig.h
===================================================================
--- src/baconfig.h	(revision 8043)
+++ src/baconfig.h	(working copy)
@@ -86,7 +86,7 @@
 #define WIN32_REPARSE_POINT 1
 #define WIN32_MOUNT_POINT   2
 
-void InitWinAPIWrapper();
+DLL_IMP_EXP void InitWinAPIWrapper();
 
 #define  OSDependentInit()    InitWinAPIWrapper()
 
@@ -94,14 +94,6 @@
 
 #define clear_thread_id(x) memset(&(x), 0, sizeof(x))
 
-#if defined(BUILDING_DLL)
-#  define DLL_IMP_EXP   _declspec(dllexport)
-#elif defined(USING_DLL)
-#  define DLL_IMP_EXP   _declspec(dllimport)
-#else
-#  define DLL_IMP_EXP
-#endif
-
 #if defined(USING_CATS)
 #  define CATS_IMP_EXP   _declspec(dllimport)
 #else
@@ -367,15 +359,15 @@
 #endif
 
 #if defined(DEBUG_MUTEX)
-extern void _p(char *file, int line, pthread_mutex_t *m);
-extern void _v(char *file, int line, pthread_mutex_t *m);
+extern DLL_IMP_EXP void _p(char *file, int line, pthread_mutex_t *m);
+extern DLL_IMP_EXP void _v(char *file, int line, pthread_mutex_t *m);
 
 #define P(x) _p(__FILE__, __LINE__, &(x))
 #define V(x) _v(__FILE__, __LINE__, &(x))
 
 #else
-extern void _p(pthread_mutex_t *m);
-extern void _v(pthread_mutex_t *m);
+extern DLL_IMP_EXP void _p(pthread_mutex_t *m);
+extern DLL_IMP_EXP void _v(pthread_mutex_t *m);
 
 #define P(x) _p(&(x))
 #define V(x) _v(&(x))
@@ -533,19 +525,19 @@
 
 class POOL_MEM;
 /* Edit message into Pool Memory buffer -- no __FILE__ and __LINE__ */
-int  Mmsg(POOLMEM **msgbuf, const char *fmt,...);
-int  Mmsg(POOLMEM *&msgbuf, const char *fmt,...);
-int  Mmsg(POOL_MEM &msgbuf, const char *fmt,...);
+DLL_IMP_EXP int  Mmsg(POOLMEM **msgbuf, const char *fmt,...);
+DLL_IMP_EXP int  Mmsg(POOLMEM *&msgbuf, const char *fmt,...);
+DLL_IMP_EXP int  Mmsg(POOL_MEM &msgbuf, const char *fmt,...);
 
 
 class JCR;
-void d_msg(const char *file, int line, int level, const char *fmt,...);
-void p_msg(const char *file, int line, int level, const char *fmt,...);
-void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
-void j_msg(const char *file, int line, JCR *jcr, int type, time_t mtime, const char *fmt,...);
-void q_msg(const char *file, int line, JCR *jcr, int type, time_t mtime, const char *fmt,...);
-int  m_msg(const char *file, int line, POOLMEM **msgbuf, const char *fmt,...);
-int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...);
+DLL_IMP_EXP void d_msg(const char *file, int line, int level, const char *fmt,...);
+DLL_IMP_EXP void p_msg(const char *file, int line, int level, const char *fmt,...);
+DLL_IMP_EXP void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
+DLL_IMP_EXP void j_msg(const char *file, int line, JCR *jcr, int type, time_t mtime, const char *fmt,...);
+DLL_IMP_EXP void q_msg(const char *file, int line, JCR *jcr, int type, time_t mtime, const char *fmt,...);
+DLL_IMP_EXP int  m_msg(const char *file, int line, POOLMEM **msgbuf, const char *fmt,...);
+DLL_IMP_EXP int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...);
 
 
 /* Use our strdup with smartalloc */
Index: src/win32/README.mingw32
===================================================================
--- src/win32/README.mingw32	(revision 8043)
+++ src/win32/README.mingw32	(working copy)
@@ -204,10 +204,10 @@
 of bacula.dll requires special treatment.  It must be specifically
 exported.
 
-New data variables are exported by adding the macro DLL_IMP_EXP to
-the variable declaration in the header file.  All exported variables
-must be declared in a header file and MUST NOT be declared in a
-source file referencing the variable. Example, src/lib/runscript.h:
+Functions and data variables are exported by adding the macro
+DLL_IMP_EXP to the variable declaration in the header file.  All
+exported variables must be declared in a header file and MUST NOT be
+declared in a source file referencing the variable. Example, src/lib/runscript.h:
 
 extern DLL_IMP_EXP bool (*console_command)(JCR *jcr, const char *cmd);
 
@@ -218,40 +218,6 @@
 ...
 
 
-Exporting functions is now more or less automated.  If you find that
-a function name has been added, changed, or an argument modified,    
-simply do the following:
-
-   cd .../bacula/src/win32/dll 
-   make                  (to build the .o files, note the link will fail)
-   ./make_def >bacula.def
-
-This should rebuild the bacula.def file, but it uses relative paths
-and assumes you have the directory structure noted above. If you 
-are using something different, you can set the NM variable at the
-top of the make_def file to use an absolute path to the correct
-directory.
-
-===== manual changing of bacula.def no longer necessary =====
-If you want to do it manually, please see below:
-Exporting a function requires a bit more work.  You must determine the
-C++ mangled name of the new function.
-
-   strings .../bacula/src/win32/dll/<file>.o | grep <symbol>
-
-Note, strings often will not show the desired symbol. In that case,
-use:
-   
-   nm .../bacula/src/win32/dll/<file>.o
-
-Replace <file> with the base part of the name of the source code file
-which contains the new function.  Replace <symbol> with the name of
-the new function.  Remove the leading underscore and place the result
-in the file
-
-   .../bacula/src/win32/dll/bacula.def
-=== end manual changing of bacula.def ==========
-
 If you add a new file, you will need to specify its name in
 
    .../bacula/src/win32/dll/Makefile
@@ -277,7 +243,7 @@
 New data variables are exported by placing their name in the file
 .../bacula/src/win32/cats/bacula_cats.def.
 
-As with the bacula.def file above, this is now more or less automated.
+This is now more or less automated.
 When the link dies, simply do the following:
 
    cd .../bacula/src/win32
Index: src/win32/README.vc8
===================================================================
--- src/win32/README.vc8	(revision 8043)
+++ src/win32/README.vc8	(working copy)
@@ -205,20 +205,11 @@
 of bacula.dll requires special treatment.  It must be specifically
 exported.
 
-New data variables are exported by adding the macro DLL_IMP_EXP to
-the variable declaration in the header file.  All exported variables
-must be declared in a header file and MUST NOT be declared in a
-source file referencing the variable.
+Functions and data variables are exported by adding the macro
+DLL_IMP_EXP to the variable declaration in the header file.  All
+exported variables must be declared in a header file and MUST NOT be
+declared in a source file referencing the variable.
 
-Exporting a function requires a bit more work.  You must determine the
-C++ mangled name of the new function.  Fortunately it is displayed in
-parentheses in the linker error message.  Place it in the
-.../bacula/src/win32/libbac/bacula.def file.
-
-In .../bacula/src/win32/libbac/msvc there is a shell "make_def_msvc" that creates 
-a def file (not really clean way). 
-In cygwin,  one has to type ./make_def_msvc > bacula.def 
-
 bacula_cats.dll
 ---------------
 
@@ -241,6 +232,3 @@
 The mangled name is printed, surrounded by parentheses, in the Linker
 error message.
 
-In .../bacula/src/win32/bacula_cats/ there is a shell "make_def_msvc" that creates 
-a def file (not really clean way). 
-In cygwin,  one has to type ./make_def_msvc > bacula_cats.def 
Index: src/win32/compat/compat.h
===================================================================
--- src/win32/compat/compat.h	(revision 8043)
+++ src/win32/compat/compat.h	(working copy)
@@ -74,7 +74,7 @@
 #endif
 
 #if !defined(_MSC_VER) || (_MSC_VER < 1400) // VC8+
-typedef long time_t;
+//typedef long time_t;
 #endif
 
 #if __STDC__ && !defined(HAVE_MINGW)
@@ -92,7 +92,7 @@
 #undef uint32_t
 #endif
 
-void sleep(int);
+DLL_IMP_EXP void sleep(int);
 
 typedef UINT32 key_t;
 
@@ -107,7 +107,6 @@
 typedef UINT32 mode_t;
 typedef INT32  ssize_t;
 #define HAVE_SSIZE_T 1
-
 #endif /* HAVE_MINGW */
 
 struct dirent {
@@ -132,8 +131,10 @@
     int foo;
 };
 
-int strcasecmp(const char*, const char *);
-int gettimeofday(struct timeval *, struct timezone *);
+#if !defined(HAVE_STRCASECMP)
+DLL_IMP_EXP int strcasecmp(const char*, const char *);
+#endif
+DLL_IMP_EXP int gettimeofday(struct timeval *, struct timezone *);
 
 #if !defined(EETXTBUSY)
 #define EETXTBUSY 26
@@ -222,12 +223,12 @@
 typedef  BOOL (*t_pVSSPathConvert)(const char *szFilePath, char *szShadowPath, int nBuflen);
 typedef  BOOL (*t_pVSSPathConvertW)(const wchar_t  *szFilePath, wchar_t  *szShadowPath, int nBuflen);
 
-void SetVSSPathConvert(t_pVSSPathConvert pPathConvert, t_pVSSPathConvertW pPathConvertW);
+DLL_IMP_EXP void SetVSSPathConvert(t_pVSSPathConvert pPathConvert, t_pVSSPathConvertW pPathConvertW);
 
-int lchown(const char *, uid_t uid, gid_t gid);
-int chown(const char *, uid_t uid, gid_t gid);
+DLL_IMP_EXP int lchown(const char *, uid_t uid, gid_t gid);
+DLL_IMP_EXP int chown(const char *, uid_t uid, gid_t gid);
 #if !defined(HAVE_MINGW)
-int chmod(const char *, mode_t mode);
+DLL_IMP_EXP int chmod(const char *, mode_t mode);
 #endif
 #define O_NONBLOCK   04000
 #define F_GETFL      3
@@ -245,19 +246,19 @@
 
 #define open   _open
 
-int fcntl(int fd, int cmd, long arg);
-int fstat(int fd, struct stat *sb);
+DLL_IMP_EXP int fcntl(int fd, int cmd, long arg);
+DLL_IMP_EXP int fstat(int fd, struct stat *sb);
 
-int inet_aton(const char *cp, struct in_addr *inp);
-int kill(int pid, int signo);
-int pipe(int []);
-int fork();
-int waitpid(int, int *, int);
+DLL_IMP_EXP int inet_aton(const char *cp, struct in_addr *inp);
+DLL_IMP_EXP int kill(int pid, int signo);
+DLL_IMP_EXP int pipe(int []);
+DLL_IMP_EXP int fork();
+DLL_IMP_EXP int waitpid(int, int *, int);
 
 #if !defined(HAVE_MINGW)
 #define strncasecmp strnicmp
 //int strncasecmp(const char*, const char *, int);
-int utime(const char *filename, struct utimbuf *buf);
+DLL_IMP_EXP int utime(const char *filename, struct utimbuf *buf);
 #define vsnprintf _vsnprintf
 #define snprintf _snprintf
 #endif //HAVE_MINGW
@@ -274,21 +275,21 @@
 #define HAVE_OLD_SOCKOPT
 
 struct timespec;
-int readdir(unsigned int fd, struct dirent *dirp, unsigned int count);
-int nanosleep(const struct timespec*, struct timespec *);
-long int random(void);
-void srandom(unsigned int seed);
-int lstat(const char *, struct stat *);
-int stat(const char *file, struct stat *sb);
-long pathconf(const char *, int);
-int readlink(const char *, char *, int);
+DLL_IMP_EXP int readdir(unsigned int fd, struct dirent *dirp, unsigned int count);
+DLL_IMP_EXP int nanosleep(const struct timespec*, struct timespec *);
+DLL_IMP_EXP long int random(void);
+DLL_IMP_EXP void srandom(unsigned int seed);
+DLL_IMP_EXP int lstat(const char *, struct stat *);
+DLL_IMP_EXP int stat(const char *file, struct stat *sb);
+DLL_IMP_EXP long pathconf(const char *, int);
+DLL_IMP_EXP int readlink(const char *, char *, int);
 #define _PC_PATH_MAX 1
 #define _PC_NAME_MAX 2
 
-int geteuid();
+DLL_IMP_EXP int geteuid();
 
-DIR *opendir(const char *name);
-int closedir(DIR *dir);
+DLL_IMP_EXP DIR *opendir(const char *name);
+DLL_IMP_EXP int closedir(DIR *dir);
 
 struct passwd {
     char *foo;
@@ -320,7 +321,7 @@
 #if !defined(HAVE_MINGW)
 #define R_OK 04
 #define W_OK 02
-int stat(const char *, struct stat *);
+DLL_IMP_EXP int stat(const char *, struct stat *);
 #if defined(__cplusplus)
 #define access _access
 extern "C" _CRTIMP int __cdecl _access(const char *, int);
@@ -340,17 +341,17 @@
 #define chdir win32_chdir
 #define chmod win32_chmod
 #define fputs win32_fputs
-char *win32_getcwd(char *buf, int maxlen);
-int win32_chdir(const char *buf);
-int win32_mkdir(const char *buf);
-int win32_fputs(const char *string, FILE *stream);
-int win32_unlink(const char *filename);
-int win32_chmod(const char *, mode_t);
+DLL_IMP_EXP char *win32_getcwd(char *buf, int maxlen);
+DLL_IMP_EXP int win32_chdir(const char *buf);
+DLL_IMP_EXP int win32_mkdir(const char *buf);
+DLL_IMP_EXP int win32_fputs(const char *string, FILE *stream);
+DLL_IMP_EXP int win32_unlink(const char *filename);
+DLL_IMP_EXP int win32_chmod(const char *, mode_t);
 
 
-char* win32_cgets (char* buffer, int len);
+DLL_IMP_EXP char* win32_cgets (char* buffer, int len);
 
-int WSA_Init(void);
+DLL_IMP_EXP int WSA_Init(void);
 void Win32ConvCleanupCache();
 
 #if defined(HAVE_MINGW)
@@ -378,7 +379,7 @@
 #endif
 
 
-int win32_ftruncate(int fd, int64_t length);
+DLL_IMP_EXP int win32_ftruncate(int fd, int64_t length);
 
 #undef ftruncate
 #define ftruncate win32_ftruncate
@@ -389,8 +390,8 @@
 #define MAP_SHARED 0x01            /* Share changes.  */
 #define MAP_FAILED ((void *) -1)
 
-void *mmap(void *start, size_t length, int prot, int flags,
+DLL_IMP_EXP void *mmap(void *start, size_t length, int prot, int flags,
            int fd, off_t offset);
-int munmap(void *start, size_t length);
+DLL_IMP_EXP int munmap(void *start, size_t length);
 
 #endif /* __COMPAT_H_ */
Index: src/win32/dll/bacula.def
===================================================================
--- src/win32/dll/bacula.def	(revision 8043)
+++ src/win32/dll/bacula.def	(working copy)
@@ -1,760 +0,0 @@
-LIBRARY bacula.dll
-EXPORTS
- 
-; compat.o
-_Z10open_bpipePciPKc
-_Z11close_bpipeP5BPIPE
-_Z11close_wpipeP5BPIPE
-_Z11strncasecmpPKcS0_i
-_Z11win32_cgetsPci
-_Z11win32_chdirPKc
-_Z11win32_chmodPKct
-_Z11win32_fputsPKcP6_iobuf
-_Z11win32_mkdirPKc
-_Z12UTF8_2_wcharPPcPKc
-_Z12gettimeofdayP7timevalP8timezone
-_Z12init_signalsPFviE
-_Z12wchar_2_UTF8PcPKwi
-_Z12win32_getcwdPci
-_Z12win32_unlinkPKc
-_Z15init_stack_dumpv
-_Z15win32_ftruncateix
-_Z16wchar_win32_pathPKcPw
-_Z17SetVSSPathConvertPFiPKcPciEPFiPKwPwiE
-_Z18CreateChildProcessPKcPvS1_S1_
-_Z18GetApplicationNamePKcPPcPS0_
-_Z18cvt_ftime_to_utimeRK9_FILETIME
-_Z18cvt_utime_to_ftimeRKlR9_FILETIME
-_Z18unix_name_to_win32PPcS_
-_Z21Win32ConvCleanupCachev
-_Z21make_wchar_win32_pathPcPi
-_Z23conv_unix_to_win32_pathPKcPcm
-_Z28make_win32_path_UTF8_2_wcharPPcPKcPi
-_Z4forkv
-_Z4killii
-_Z4pipePi
-_Z4statPKcP4stat
-_Z5chownPKcjj
-_Z5fcntlii
-_Z5fcntliil
-_Z5fstatiP4stat
-_Z5lstatPKcP4stat
-_Z5sleepi
-_Z6execvpPKcPPc
-_Z6lchownPKcjj
-_Z6randomv
-_Z7geteuidv
-_Z7opendirPKc
-_Z7openlogPKcii
-_Z7srandomj
-_Z7waitpidiPii
-_Z8WSA_Initv
-_Z8closedirPv
-_Z8closelogv
-_Z8getArgv0PKc
-_Z8getgrgidj
-_Z8getpwuidj
-_Z8pathconfPKci
-_Z8readlinkPKcPci
-_Z9ErrorExitPKc
-_Z9inet_atonPKcP7in_addr
-_Z9nanosleepPK8timespecPS_
-_Z9readdir_rPvP6direntPS1_
-_ZN6winverC1Ev
-_ZN6winverC2Ev
-syslog
-umask
-utime
- 
-; plugins.o
-_Z10new_pluginv
-_Z12load_pluginsPvS_PKcS1_
-_Z14unload_pluginsv
-_Z19dbg_plugin_add_hookPFvP6PluginP6_iobufE
-
-; print.o
-_Z10__snprintfPcjPKcz
-_Z10__vsprintfPcPKcS_
-_Z11__vsnprintfPcjPKcS_
-_Z4doprPcjPKcS_PFvS_PjjiE
-_Z9__sprintfPcPKcz
- 
-; winapi.o
-_Z17InitWinAPIWrapperv
- 
-; attribs.o
-_Z11decode_statPcP4statPi
-_Z11encode_statPcP6FF_PKTi
-_Z13decode_LinkFIPcP4stat
-_Z14set_attributesP3JCRP4ATTRP5BFILE
-_Z16encode_attribsExP3JCRPcP6FF_PKT
-_Z18select_data_streamP6FF_PKT
-_Z4plugIjEvRT_y
-_Z4plugIlEvRT_y
-_Z4plugImEvRT_y
-_Z4plugIsEvRT_y
-_Z4plugItEvRT_y
-_Z4plugIyEvRT_y
-_Z9win_errorP3JCRPcS1_
-_Z9win_errorP3JCRPcm
- 
-; bfile.o
-_Z11bget_handleP5BFILE
-_Z11int32_LE2BEPii
-_Z11int64_LE2BEPxx
-_Z14have_win32_apiv
-_Z15is_win32_streami
-_Z15stream_to_asciii
-_Z16set_win32_backupP5BFILE
-_Z18is_portable_backupP5BFILE
-_Z19set_portable_backupP5BFILE
-_Z14set_cmd_pluginP5BFILEP3JCR
-_Z26processWin32BackupAPIBlockP5BFILEPvl
-_Z27is_restore_stream_supportedi
-_Z5binitP5BFILE
-_Z5bopenP5BFILEPKcit
-_Z5breadP5BFILEPvj
-_Z6bcloseP5BFILE
-_Z6blseekP5BFILExi
-_Z6bwriteP5BFILEPvj
-_Z8is_bopenP5BFILE
- 
-; create_file.o
-_Z11create_fileP3JCRP4ATTRP5BFILEi
- 
-; drivetype.o
-_Z9drivetypePKcPci
- 
-; enable_priv.o
-_Z24enable_backup_privilegesP3JCRi
- 
-; find.o
-_Z10find_filesP3JCRP6FF_PKTPFiS0_S2_bES4_
-_Z13is_in_filesetP6FF_PKT
-_Z15init_find_filesv
-_Z15term_find_filesP6FF_PKT
-_Z16set_find_optionsP6FF_PKTil
-_Z22get_win32_drivelettersP6FF_PKTPc
-_Z25set_find_changed_functionP6FF_PKTPFbP3JCRS0_E
- 
-; find_one.o
-_Z13find_one_fileP3JCRP6FF_PKTPFiS0_S2_bEPcjb
-_Z13term_find_oneP6FF_PKT
-_Z16has_file_changedP3JCRP6FF_PKT
- 
-; fstype.o
-_Z6fstypePKcPci
- 
-; match.o
-_Z11match_filesP3JCRP6FF_PKTPFiS0_S2_bE
-_Z16file_is_excludedP6FF_PKTPKc
-_Z16file_is_includedP6FF_PKTPKc
-_Z22get_next_included_fileP6FF_PKTP15s_included_file
-_Z25add_fname_to_exclude_listP6FF_PKTPKc
-_Z25add_fname_to_include_listP6FF_PKTiPKc
-_Z26term_include_exclude_filesP6FF_PKT
- 
-; address_conf.o
-_Z14free_addressesP5dlist
-_Z15store_addressesP13s_lex_contextP8RES_ITEMii
-_Z17get_first_addressP5dlistPci
-_Z17sockaddr_get_portPK8sockaddr
-_Z17sockaddr_to_asciiPK8sockaddrPci
-_Z19build_addresses_strP5dlistPci
-_Z20store_addresses_portP13s_lex_contextP8RES_ITEMii
-_Z22init_default_addressesPP5dlisti
-_Z23store_addresses_addressP13s_lex_contextP8RES_ITEMii
-_Z24get_first_port_net_orderP5dlist
-_Z25get_first_port_host_orderP5dlist
-_Z27sockaddr_get_port_net_orderPK8sockaddr
-_ZN6IPADDR11get_addressEPci
-_ZN6IPADDR12get_sockaddrEv
-_ZN6IPADDR12set_addr_anyEv
-_ZN6IPADDR12set_port_netEt
-_ZN6IPADDR16get_sockaddr_lenEv
-_ZN6IPADDR17build_address_strEPci
-_ZN6IPADDR8set_typeENS_6i_typeE
-_ZN6IPADDR9copy_addrEPS_
-_ZN6IPADDR9set_addr4EP7in_addr
-_ZN6IPADDRC1ERKS_
-_ZN6IPADDRC1Ei
-_ZN6IPADDRC2ERKS_
-_ZN6IPADDRC2Ei
-_ZNK6IPADDR10get_familyEv
-_ZNK6IPADDR18get_port_net_orderEv
-_ZNK6IPADDR8get_typeEv
- 
-; alist.o
-_ZN5alist3getEi
-_ZN5alist4lastEv
-_ZN5alist4nextEv
-_ZN5alist4prevEv
-_ZN5alist5firstEv
-_ZN5alist6appendEPv
-_ZN5alist6removeEi
-_ZN5alist7destroyEv
-_ZN5alist7prependEPv
-_ZN5alist9grow_listEv
- 
-; attr.o
-_Z15print_ls_outputP3JCRP4ATTR
-_Z24build_attr_output_fnamesP3JCRP4ATTR
-_Z24unpack_attributes_recordP3JCRiPcP4ATTR
-_Z8new_attrP3JCR
-_Z9free_attrP4ATTR
- 
-; base64.o
-_Z11base64_initv
-_Z11from_base64PxPc
-_Z13bin_to_base64PciS_ii
-_Z9to_base64xPc
- 
-; berrno.o
-_ZN6berrno20format_win32_messageEv
-_ZN6berrno9bstrerrorEv
- 
-; bget_msg.o
-_Z8bget_msgP5BSOCK
- 
-; bnet.o
-_Z10bnet_closeP5BSOCK
-_Z10bnet_fsendP5BSOCKPKcz
-_Z10init_bsockP3JCRiPKcS2_iP8sockaddr
-_Z10term_bsockP5BSOCK
-_Z11read_nbytesP5BSOCKPci
-_Z12bnet_connectP3JCRixxPKcPcS3_ii
-_Z12is_bnet_stopP5BSOCK
-_Z12write_nbytesP5BSOCKPci
-_Z13bnet_get_peerP5BSOCKPci
-_Z13bnet_strerrorP5BSOCK
-_Z13is_bnet_errorP5BSOCK
-_Z14bnet_wait_dataP5BSOCKi
-_Z15bnet_tls_clientP11TLS_ContextP5BSOCKP5alist
-_Z15bnet_tls_serverP11TLS_ContextP5BSOCKP5alist
-_Z17bnet_host2ipaddrsPKciPS0_
-_Z17bnet_set_blockingP5BSOCK
-_Z17bnet_sig_to_asciiP5BSOCK
-_Z19bnet_wait_data_intrP5BSOCKi
-_Z20bnet_set_buffer_sizeP5BSOCKji
-_Z20bnet_set_nonblockingP5BSOCK
-_Z21bnet_restore_blockingP5BSOCKi
-_Z28bnet_suppress_error_messagesP5BSOCKb
-_Z8bnet_sigP5BSOCKi
-_Z9bnet_recvP5BSOCK
-_Z9bnet_sendP5BSOCK
-_Z9dup_bsockP5BSOCK
- 
-; bnet_server.o
-_Z18bnet_thread_serverP5dlistiP9workq_tagPFPvS3_E
-_Z23bnet_stop_thread_serverP10pthread_t_
- 
-; bpipe.o
-_Z11run_programPciRS_
-_Z23run_program_full_outputPciRS_
- 
-; breg.o
-_Z11new_bregexpPKc
-_Z12free_bregexpP7BREGEXP
-_Z12get_bregexpsPKc
-_Z13free_bregexpsP5alist
-_Z14apply_bregexpsPKcP5alistPPc
-_Z19bregexp_build_wherePciS_S_S_
-_Z21bregexp_escape_stringPcPKcc
-_Z28bregexp_get_build_where_sizePcS_S_
-_ZN7BREGEXP10edit_substEPKcP12b_regmatch_t
-_ZN7BREGEXP12return_fnameEPKci
-_ZN7BREGEXP14extract_regexpEPKc
-_ZN7BREGEXP16compute_dest_lenEPKcP12b_regmatch_t
-_ZN7BREGEXP5debugEv
-_ZN7BREGEXP7replaceEPKc
- 
-; bregex.o
-_Z24re_registers_to_regmatchP12re_registersP12b_regmatch_tj
-b_re_compile_fastmap
-b_re_compile_initialize
-b_re_compile_pattern
-b_re_match
-b_re_search
-b_re_set_syntax
-b_regcomp
-b_regerror
-b_regexec
-b_regfree
- 
-; bsnprintf.o
-_Z10bvsnprintfPciPKcS_
-_Z9bsnprintfPciPKcz
- 
-; bsock.o
-_ZN5BSOCK11set_lockingEv
-_Z9new_bsockv
-_ZN5BSOCK10free_bsockEv
-_ZN5BSOCK12set_blockingEv
-_ZN5BSOCK14wait_data_intrEii
-_ZN5BSOCK15set_buffer_sizeEji
-_ZN5BSOCK15set_nonblockingEv
-_ZN5BSOCK16restore_blockingEi
-_ZN5BSOCK21authenticate_directorEPKcS1_P11TLS_ContextPci
-_ZN5BSOCK4initEv
-_ZN5BSOCK4recvEv
-_ZN5BSOCK4sendEv
-_ZN5BSOCK5_openEP3JCRPKcPcS4_ixPi
-_ZN5BSOCK5closeEv
-_ZN5BSOCK5fsendEPKcz
-_ZN5BSOCK6signalEi
-_ZN5BSOCK7connectEP3JCRixxPKcPcS4_ii
-_ZN5BSOCK7despoolEPFvlEl
-_ZN5BSOCK7destroyEv
-_ZN5BSOCK8fin_initEP3JCRiPKcS3_iP8sockaddr
-_ZN5BSOCK8get_peerEPci
-_ZN5BSOCK9bstrerrorEv
-_ZN5BSOCK9wait_dataEii
- 
-; bsys.o
-_Z10b_strerroriPcj
-_Z11bmicrosleepll
-_Z15create_pid_filePcPKci
-_Z15delete_pid_filePcPKci
-_Z15escape_filenamePKc
-_Z15read_state_filePcPKci
-_Z16write_state_filePcPKci
-_Z20make_unique_filenamePPciS_
-_Z2_pPP16pthread_mutex_t_
-_Z2_vPP16pthread_mutex_t_
-_Z4dropPcS_
-_Z5bfreePv
-_Z6bfgetsPciP6_iobuf
-_Z7bcallocjj
-_Z7bstrcmpPKcS0_
-_Z7cstrlenPKc
-_Z8b_mallocPKcij
-_Z8breallocPvj
-_Z8bstrncatPcPKci
-_Z8bstrncatPcR8POOL_MEMi
-_Z8bstrncpyPcPKci
-_Z8bstrncpyPcR8POOL_MEMi
- 
-; btime.o
-_Z10bstrftimesPcix
-_Z11date_decodedPjPhS0_
-_Z11date_encodejhh
-_Z11time_decodedPhS_S_Pf
-_Z11time_encodehhhf
-_Z12bstrftime_ncPcix
-_Z12bstrftime_nyPcix
-_Z12str_to_utimePc
-_Z13btime_to_unixx
-_Z14btime_to_utimex
-_Z16date_time_decodeP9date_timePjPhS2_S2_S2_S2_Pf
-_Z16date_time_encodeP9date_timejhhhhhf
-_Z16get_current_timeP9date_time
-_Z17date_time_compareP9date_timeS0_
-_Z17get_current_btimev
-_Z6tm_womii
-_Z6tm_woyl
-_Z9bstrftimePcix
-_Z9bstrutimePcix
-_Z9tm_decodeP9date_timeP2tm
-_Z9tm_encodeP9date_timeP2tm
- 
-; btimers.o
-_Z16stop_bsock_timerP8btimer_t
-_Z16stop_child_timerP8btimer_t
-_Z17start_bsock_timerP5BSOCKj
-_Z17start_child_timerP3JCRij
-_Z17stop_thread_timerP8btimer_t
-_Z18start_thread_timerP3JCRP10pthread_t_j
-
-; cram-md5.o
-_Z16cram_md5_respondP5BSOCKPKcPiS3_
-_Z18cram_md5_challengeP5BSOCKPKcii
- 
-; crc32.o
-_Z6bcrc32Phi
- 
-; crypto.o
-_Z11init_cryptov
-_Z13CryptoData_itv
-_Z13SignerInfo_itv
-_Z14CryptoData_newv
-_Z14SignerInfo_newv
-_Z14cleanup_cryptov
-_Z14d2i_CryptoDataPP10CryptoDataPPKhl
-_Z14d2i_SignerInfoPP10SignerInfoPPKhl
-_Z14i2d_CryptoDataP10CryptoDataPPh
-_Z14i2d_SignerInfoP10SignerInfoPPh
-_Z15CryptoData_freeP10CryptoData
-_Z15SignerInfo_freeP10SignerInfo
-_Z15crypto_sign_newP3JCR
-_Z15crypto_strerror14crypto_error_t
-_Z16RecipientInfo_itv
-_Z16SignatureData_itv
-_Z16crypto_sign_freeP9Signature
-_Z17RecipientInfo_newv
-_Z17SignatureData_newv
-_Z17crypto_cipher_newP14Crypto_SessionbPj
-_Z17crypto_digest_newP3JCR15crypto_digest_t
-_Z17d2i_RecipientInfoPP13RecipientInfoPPKhl
-_Z17d2i_SignatureDataPP13SignatureDataPPKhl
-_Z17i2d_RecipientInfoP13RecipientInfoPPh
-_Z17i2d_SignatureDataP13SignatureDataPPh
-_Z18RecipientInfo_freeP13RecipientInfo
-_Z18SignatureData_freeP13SignatureData
-_Z18crypto_cipher_freeP14Cipher_Context
-_Z18crypto_digest_freeP6Digest
-_Z18crypto_digest_nameP6Digest
-_Z18crypto_keypair_dupP12X509_Keypair
-_Z18crypto_keypair_newv
-_Z18crypto_session_new15crypto_cipher_tP5alist
-_Z18crypto_sign_decodeP3JCRPKhj
-_Z18crypto_sign_encodeP9SignaturePhPj
-_Z18crypto_sign_verifyP9SignatureP12X509_KeypairP6Digest
-_Z19crypto_keypair_freeP12X509_Keypair
-_Z19crypto_session_freeP14Crypto_Session
-_Z20crypto_cipher_updateP14Cipher_ContextPKhjS2_Pj
-_Z20crypto_digest_updateP6DigestPKhj
-_Z21crypto_session_decodePKhjP5alistPP14Crypto_Session
-_Z21crypto_session_encodeP14Crypto_SessionPhPj
-_Z22crypto_cipher_finalizeP14Cipher_ContextPhPj
-_Z22crypto_digest_finalizeP6DigestPhPj
-_Z22crypto_keypair_has_keyPKc
-_Z22crypto_sign_add_signerP9SignatureP6DigestP12X509_Keypair
-_Z22crypto_sign_get_digestP9SignatureP12X509_KeypairR15crypto_digest_tPP6Digest
-_Z23crypto_keypair_load_keyP12X509_KeypairPKcPFiPciPKvES5_
-_Z24crypto_keypair_load_certP12X509_KeypairPKc
-_Z25crypto_digest_stream_typei
-_Z27crypto_default_pem_callbackPciPKv
- 
-; daemon.o
-_Z12daemon_startv
- 
-; dlist.o
-_Z15new_dlistStringPKc
-_Z15new_dlistStringPKci
-_ZN5dlist12insert_afterEPvS0_
-_ZN5dlist13binary_insertEPvPFiS0_S0_E
-_ZN5dlist13binary_searchEPvPFiS0_S0_E
-_ZN5dlist13insert_beforeEPvS0_
-_ZN5dlist22binary_insert_multipleEPvPFiS0_S0_E
-_ZN5dlist4nextEPv
-_ZN5dlist4prevEPv
-_ZN5dlist6appendEPv
-_ZN5dlist6removeEPv
-_ZN5dlist7destroyEv
-_ZN5dlist7prependEPv
- 
-; edit.o
-_Z10add_commasPcS_
-_Z10edit_int64xPc
-_Z10edit_utimexPci
-_Z11edit_uint64yPc
-_Z11is_a_numberPKc
-_Z12str_to_int64Pc
-_Z13is_an_integerPKc
-_Z13is_name_validPcPS_
-_Z13str_to_uint64Pc
-_Z14size_to_uint64PciPy
-_Z17duration_to_utimePcPx
-_Z22edit_int64_with_commasxPc
-_Z23edit_uint64_with_commasyPc
-_Z23edit_uint64_with_suffixyPc
- 
-; fnmatch.o
-fnmatch
-
-; guid_to_name.o
-_ZN9guid_list11uid_to_nameEjPci
-_ZN9guid_list11gid_to_nameEjPci
-_Z14free_guid_listP9guid_list
-_Z13new_guid_listv
-
-; hmac.o
-_Z8hmac_md5PhiS_iS_
- 
-; htable.o
-_ZN6htable11hash_mallocEi
-_ZN6htable10grow_tableEv
-_ZN6htable10hash_indexEPc
-_ZN6htable4initEPvS0_i
-_ZN6htable4nextEv
-_ZN6htable4sizeEv
-_ZN6htable5firstEv
-_ZN6htable5statsEv
-_ZN6htable6insertEPcPv
-_ZN6htable6lookupEPc
-_ZN6htable7destroyEv
-_ZN6htableC1EPvS0_i
-_ZN6htableC2EPvS0_i
-    
- 
-; jcr.o
-_Z10b_free_jcrPKciP3JCR
-_Z11unlock_jobsv
-_Z12jcr_walk_endP3JCR
-_Z12job_end_pushP3JCRPFvS0_PvES1_
-_Z13get_jcr_by_idj
-_Z13jcr_walk_nextP3JCR
-_Z14jcr_walk_startv
-_Z14set_jcr_in_tsdP3JCR
-_Z16get_jcr_from_tsdv
-_Z18get_jobid_from_tsdv
-_Z18get_jcr_by_sessionjj
-_Z18init_jcr_subsystemv
-_Z18set_jcr_job_statusP3JCRi
-_Z19init_last_jobs_listv
-_Z19lock_last_jobs_listv
-_Z19read_last_jobs_listiy
-_Z19term_last_jobs_listv
-_Z20get_jcr_by_full_namePc
-_Z20write_last_jobs_listiy
-_Z21unlock_last_jobs_listv
-_Z23get_jcr_by_partial_namePc
-_Z7new_jcriPFvP3JCRE
-_Z9lock_jobsv
-_ZN3JCR11set_JobTypeEi
-_ZN3JCR12set_JobLevelEi
-_ZN3JCR11set_JobTypeEi
-_ZN3JCR12set_JobLevelEi
-_ZN3JCR14get_ActionNameEb
-_ZN3JCR17get_OperationNameEv
-_ZN3JCR8JobReadsEv
-_Z16dbg_jcr_add_hookPFvP3JCRP6_iobufE
-timeout_handler
-
-
- 
-; lex.o
-_Z11scan_to_eolP13s_lex_context
-_Z12lex_get_charP13s_lex_context
-_Z13lex_get_tokenP13s_lex_contexti
-_Z13lex_open_fileP13s_lex_contextPKcPFvS2_iS0_S2_zE
-_Z14lex_close_fileP13s_lex_context
-_Z14lex_tok_to_stri
-_Z14lex_unget_charP13s_lex_context
-_Z20scan_to_next_not_eolP13s_lex_context
-_Z29lex_set_default_error_handlerP13s_lex_context
-_Z32lex_set_error_handler_error_typeP13s_lex_contexti
- 
-; md5.o
-_Z12MD5TransformPjS_
-_Z7MD5InitP10MD5Context
-_Z8MD5FinalPhP10MD5Context
-_Z9MD5UpdateP10MD5ContextPhj
- 
-; mem_pool.o
-_Z13sm_get_memoryPKcii
-_Z17close_memory_poolv
-_Z18sm_get_pool_memoryPKcii
-_Z19sm_free_pool_memoryPKciPc
-_Z21sm_sizeof_pool_memoryPKciPc
-_Z22sm_realloc_pool_memoryPKciPci
-_Z23print_memory_pool_statsv
-_Z25sm_check_pool_memory_sizePKciPci
-_Z27garbage_collect_memory_poolv
-_Z9pm_strcatPPcPKc
-_Z9pm_strcatR8POOL_MEMPKc
-_Z9pm_strcatRPcPKc
-_Z9pm_strcatRPcR8POOL_MEM
-_Z9pm_strcpyPPcPKc
-_Z9pm_strcpyR8POOL_MEMPKc
-_Z9pm_strcpyRPcPKc
-_Z9pm_strcpyRPcR8POOL_MEM
-_ZN8POOL_MEM10realloc_pmEi
-_ZN8POOL_MEM6strcatEPKc
-_ZN8POOL_MEM6strcpyEPKc
-_ZN8POOL_MEM8max_sizeEv
- 
-; message.o
-_Z10my_name_isiPPcPKc
-_Z11get_db_typev
-_Z11set_db_typePKc
-_Z12add_msg_destP4MSGSiiPcS1_
-_Z12rem_msg_destP4MSGSiiPc
-_Z13free_msgs_resP4MSGS
-_Z16dequeue_messagesP3JCR
-_Z16dispatch_messageP3JCRilPc
-_Z16init_console_msgPKc
-_Z25register_message_callbackPFviPcE
-_Z4JmsgP3JCRilPKcz
-_Z4MmsgPPcPKcz
-_Z4MmsgR8POOL_MEMPKcz
-_Z4MmsgRPcPKcz
-_Z4QmsgP3JCRilPKcz
-_Z5d_msgPKciiS0_z
-_Z5e_msgPKciiiS0_z
-_Z5j_msgPKciP3JCRilS0_z
-_Z5m_msgPKciPPcS0_z
-_Z5m_msgPKciRPcS0_z
-_Z5p_msgPKciiS0_z
-_Z5q_msgPKciP3JCRilS0_z
-_Z5t_msgPKciiS0_z
-_Z8init_msgP3JCRP4MSGS
-_Z8term_msgv
-_Z9close_msgP3JCR
-_Z9get_tracev
-_Z9set_tracei
- 
-; pythonlib.o
-_Z21generate_daemon_eventP3JCRPKc
- 
-; queue.o
-_Z5qnextP7b_queueS0_
-_Z7qdchainP7b_queue
-_Z7qinsertP7b_queueS0_
-_Z7qremoveP7b_queue
- 
-; rblist.o
-_ZN6rblist11left_rotateEPv
-_ZN6rblist12right_rotateEPv
-_ZN6rblist3anyEPv
-_ZN6rblist4nextEPv
-_ZN6rblist5firstEv
-_ZN6rblist6insertEPvPFiS0_S0_E
-_ZN6rblist6removeEPv
-_ZN6rblist6searchEPvPFiS0_S0_E
-_ZN6rblist7destroyEv
- 
-; runscript.o
-_Z11run_scriptsP3JCRP5alistPKc
-_Z13new_runscriptv
-_Z14copy_runscriptP9RUNSCRIPT
-_Z14free_runscriptP9RUNSCRIPT
-_Z15free_runscriptsP5alist
-_ZN9RUNSCRIPT10set_targetEPKc
-_ZN9RUNSCRIPT11set_commandEPKci
-_ZN9RUNSCRIPT13reset_defaultEb
-_ZN9RUNSCRIPT21set_job_code_callbackEPFPcP3JCRPKcE
-_ZN9RUNSCRIPT3runEP3JCRPKc
-_ZN9RUNSCRIPT5debugEv
-_ZN9RUNSCRIPT8is_localEv
-
- 
-; rwlock.o
-_Z11rwl_destroyP12s_rwlock_tag
-_Z12rwl_readlockP12s_rwlock_tag
-_Z13rwl_writelockP12s_rwlock_tag
-_Z14rwl_readunlockP12s_rwlock_tag
-_Z15rwl_readtrylockP12s_rwlock_tag
-_Z15rwl_writeunlockP12s_rwlock_tag
-_Z16rwl_writetrylockP12s_rwlock_tag
-_Z8rwl_initP12s_rwlock_tag
- 
-; scan.o
-_Z10parse_argsPcPS_PiS0_S0_i
-_Z11skip_spacesPPc
-_Z14skip_nonspacesPPc
-_Z15parse_args_onlyPcPS_PiS0_S0_i
-_Z19strip_leading_spacePc
-_Z19strip_trailing_junkPc
-_Z22strip_trailing_newlinePc
-_Z22strip_trailing_slashesPc
-_Z23split_path_and_filenamePKcPPcPiS2_S3_
-_Z7bsscanfPKcS0_z
-_Z7fstrschPKcS0_
-_Z8next_argPPc
- 
-; serial.o
-_Z12serial_btimePPhx
-_Z12serial_int16PPhs
-_Z12serial_int32PPhi
-_Z12serial_int64PPhx
-_Z13serial_stringPPhPKc
-_Z13serial_uint16PPht
-_Z13serial_uint32PPhj
-_Z13serial_uint64PPhy
-_Z14serial_float64PPhd
-_Z14unserial_btimePPh
-_Z14unserial_int16PPh
-_Z14unserial_int32PPh
-_Z15unserial_stringPPhPc
-_Z15unserial_uint16PPh
-_Z15unserial_uint32PPh
-_Z15unserial_uint64PPh
-_Z16unserial_float64PPh
- 
-; smartall.o
-_Z10sm_reallocPKciPvj
-_Z12actuallyfreePv
-_Z12sm_check_rtnPKcib
-_Z12sm_new_ownerPKciPc
-_Z14actuallycallocjj
-_Z14actuallymallocj
-_Z15actuallyreallocPvj
-_Z7sm_dumpbb
-_Z7sm_freePKciPv
-_Z8sm_checkPKcib
-_Z9sm_callocPKcijj
-_Z9sm_mallocPKcij
-_Z9sm_staticb
- 
-; tls.o
-_ZN5BSOCK8free_tlsEv
-_Z14get_tls_enableP11TLS_Context
-_Z15get_tls_requireP11TLS_Context
-_Z15new_tls_contextPKcS0_S0_S0_PFiPciPKvES3_S0_b
-_Z15tls_bsock_readnP5BSOCKPci
-_Z16free_tls_contextP11TLS_Context
-_Z16tls_bsock_acceptP5BSOCK
-_Z16tls_bsock_writenP5BSOCKPci
-_Z17tls_bsock_connectP5BSOCK
-_Z18new_tls_connectionP11TLS_Contexti
-_Z18tls_bsock_shutdownP5BSOCK
-_Z19free_tls_connectionP14TLS_Connection
-_Z25tls_postconnect_verify_cnP3JCRP14TLS_ConnectionP5alist
-_Z27tls_postconnect_verify_hostP3JCRP14TLS_ConnectionPKc
- 
-; tree.o
-_Z11tree_relcwdPcP11s_tree_rootP11s_tree_node
-_Z12tree_getpathP11s_tree_nodePci
-_Z14make_tree_pathPcP11s_tree_root
-_Z16insert_tree_nodePcS_iP11s_tree_rootP11s_tree_node
-_Z8new_treei
-_Z8tree_cwdPcP11s_tree_rootP11s_tree_node
-_Z9free_treeP11s_tree_root
- 
-; util.o
-_Z11bash_spacesPc
-_Z11bash_spacesR8POOL_MEM
-_Z11encode_modetPc
-_Z11encode_timelPc
-_Z11is_buf_zeroPci
-_Z13unbash_spacesPc
-_Z13unbash_spacesR8POOL_MEM
-_Z14edit_job_codesP3JCRPcS1_PKcPFS1_S0_S3_E
-_Z15job_type_to_stri
-_Z16job_level_to_stri
-_Z16make_session_keyPcS_i
-_Z17job_status_to_stri
-_Z18do_shell_expansionPci
-_Z18jobstatus_to_asciiiPci
-_Z19last_path_separatorPKc
-_Z21set_working_directoryPc
-_Z5lcasePc
-_Z20volume_status_to_strPKc 
-_Z22jobstatus_to_ascii_guiiPci
-
-; var.o
-_Z10var_configP6var_st12var_config_tz
-_Z10var_createPP6var_st
-_Z10var_expandP6var_stPKciPPcPii
-_Z10var_formatP6var_stPPciPKcz
-_Z11var_destroyP6var_st
-_Z11var_formatvP6var_stPPciPKcS1_
-_Z12var_strerrorP6var_st8var_rc_t
-_Z12var_unescapeP6var_stPKciPcii
- 
-; watchdog.o
-_Z12new_watchdogv
-_Z13stop_watchdogv
-_Z14start_watchdogv
-_Z17register_watchdogP12s_watchdog_t
-_Z19unregister_watchdogP12s_watchdog_t
-watchdog_thread
-
-console_command DATA
-plugin_list DATA
-plugin_bopen DATA
-plugin_bclose DATA
-plugin_bwrite DATA
-plugin_bread DATA
-plugin_blseek DATA
Index: src/win32/dll/make_def
===================================================================
--- src/win32/dll/make_def	(revision 8043)
+++ src/win32/dll/make_def	(working copy)
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-#  Make the stupid bacula.def file so that we don't have to do it
-#    manually
-#
-#  Kern Sibbald, June 2007
-#
-
-NM=../../../../cross-tools/mingw32/mingw32/bin/nm
- 
-echo "LIBRARY bacula.dll"
-echo "EXPORTS"
-echo " "
-
-for i in *.o ; do \
-   echo "; $i"; \
-   ${NM} $i | grep "^[0-9a-f]* T _" | cut -c13- ; \
-   echo " "; \
-done
-
-DATA="\
-   console_command \
-   plugin_list"
-
-for i in ${DATA}; do \
-   echo "$i DATA"; \
-done
Index: src/win32/dll/Makefile
===================================================================
--- src/win32/dll/Makefile	(revision 8043)
+++ src/win32/dll/Makefile	(working copy)
@@ -141,7 +141,7 @@
 
 $(BINDIR)/bacula.dll: DLL_DEFINE=BUILDING_DLL
 
-$(BINDIR)/bacula.dll: $(DLL_OBJS) bacula.def
+$(BINDIR)/bacula.dll: $(DLL_OBJS)
 	@echo "Linking $@"
 	$(call checkdir,$@)
 	$(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bacula.a $^ $(LIBS_DLL) -o $@
@@ -154,6 +154,6 @@
 	$(ECHO_CMD)$(CXX) -D$(DLL_DEFINE) $(CFLAGS) -c $< -o $@
 
 $(OBJDIR)/%.o: %.cpp
-	@echo "Compiling $<"
+	@echo "Compiling $< "
 	$(call checkdir,$@)
 	$(ECHO_CMD)$(CXX) -D$(DLL_DEFINE) $(CFLAGS) -c $< -o $@
Index: src/win32/libbac/msvc/bacula.def
===================================================================
--- src/win32/libbac/msvc/bacula.def	(revision 8043)
+++ src/win32/libbac/msvc/bacula.def	(working copy)
@@ -1,512 +0,0 @@
-LIBRARY bacula.dll
-EXPORTS
-
-; address_conf.obj 
-?get_port_net_order@IPADDR@@QBEGXZ
-?get_address@IPADDR@@QAEPBDPADH@Z
-?get_first_address@@YAPBDPAVdlist@@PADH@Z
-?get_first_port_host_order@@YAHPAVdlist@@@Z
-?init_default_addresses@@YAXPAPAVdlist@@H@Z
-?store_addresses@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
-?store_addresses_address@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
-?store_addresses_port@@YAXPAUs_lex_context@@PAURES_ITEM@@HH@Z
-?free_addresses@@YAXPAVdlist@@@Z
-?sockaddr_get_port_net_order@@YAHPBUsockaddr@@@Z
-?sockaddr_to_ascii@@YAPADPBUsockaddr@@PADH@Z
- 
-; alist.obj 
-?first@alist@@QAEPAXXZ
-?next@alist@@QAEPAXXZ
-?prepend@alist@@QAEXPAX@Z
-?append@alist@@QAEXPAX@Z
-?remove@alist@@QAEPAXH@Z
-?get@alist@@QAEPAXH@Z
-?destroy@alist@@QAEXXZ
- 
-; attr.obj 
-?new_attr@@YAPAUATTR@@XZ
-?free_attr@@YAXPAUATTR@@@Z
-?unpack_attributes_record@@YAHPAVJCR@@JPADPAUATTR@@@Z
-?build_attr_output_fnames@@YAXPAVJCR@@PAUATTR@@@Z
-?print_ls_output@@YAXPAVJCR@@PAUATTR@@@Z
- 
-; attribs.obj 
-?select_data_stream@@YAHPAUFF_PKT@@@Z
-?encode_stat@@YAXPADPAUFF_PKT@@H@Z
-?decode_stat@@YAHPADPAUstat@@PAJ@Z
-?decode_LinkFI@@YAJPADPAUstat@@@Z
-?set_attributes@@YA_NPAVJCR@@PAUATTR@@PAUBFILE@@@Z
-?encode_attribsEx@@YAHPAVJCR@@PADPAUFF_PKT@@@Z
- 
-; base64.obj 
-?bin_to_base64@@YAHPADH0HH@Z
- 
-; berrno.obj 
-?strerror@berrno@@QAEPBDXZ
-?format_win32_message@berrno@@AAEXXZ
- 
-; bfile.obj 
-?is_win32_stream@@YA_NH@Z
-?stream_to_ascii@@YAPBDH@Z
-?processWin32BackupAPIBlock@@YA_NPAUBFILE@@PAXH@Z
-?binit@@YAXPAUBFILE@@@Z
-?set_portable_backup@@YA_NPAUBFILE@@@Z
-?set_prog@@YA_NPAUBFILE@@PADPAVJCR@@@Z
-?is_portable_backup@@YA_NPAUBFILE@@@Z
-?have_win32_api@@YA_NXZ
-?is_restore_stream_supported@@YA_NH@Z
-?bopen@@YAHPAUBFILE@@PBDHI@Z
-?bclose@@YAHPAUBFILE@@@Z
-?bread@@YAHPAUBFILE@@PAXI@Z
-?bwrite@@YAHPAUBFILE@@PAXI@Z
-?is_bopen@@YA_NPAUBFILE@@@Z
-?blseek@@YA_JPAUBFILE@@_JH@Z
- 
-; bget_msg.obj 
-?bget_msg@@YAHPAVBSOCK@@@Z
- 
-; bnet.obj 
-?bnet_recv@@YAJPAVBSOCK@@@Z
-?is_bnet_stop@@YA_NPAVBSOCK@@@Z
-?is_bnet_error@@YAHPAVBSOCK@@@Z
-?bnet_suppress_error_messages@@YAXPAVBSOCK@@_N@Z
-?bnet_despool_to_bsock@@YAHPAVBSOCK@@P6AXH@ZH@Z
-?bnet_send@@YA_NPAVBSOCK@@@Z
-?bnet_tls_server@@YA_NPAUTLS_Context@@PAVBSOCK@@PAValist@@@Z
-?bnet_tls_client@@YA_NPAUTLS_Context@@PAVBSOCK@@@Z
-?bnet_wait_data@@YAHPAVBSOCK@@H@Z
-?bnet_wait_data_intr@@YAHPAVBSOCK@@H@Z
-?bnet_connect@@YAPAVBSOCK@@PAVJCR@@HHPBDPAD2HH@Z
-?bnet_strerror@@YAPBDPAVBSOCK@@@Z
-?bnet_fsend@@YA_NPAVBSOCK@@PBDZZ
-?bnet_get_peer@@YAHPAVBSOCK@@PADH@Z
-?bnet_set_buffer_size@@YA_NPAVBSOCK@@IH@Z
-?bnet_sig@@YA_NPAVBSOCK@@H@Z
-?bnet_sig_to_ascii@@YAPBDPAVBSOCK@@@Z
-?bnet_close@@YAXPAVBSOCK@@@Z
-?term_bsock@@YAXPAVBSOCK@@@Z
-
-; bnet_server.obj
-?bnet_stop_thread_server@@YAXPAUpthread_t_@@@Z
-?bnet_thread_server@@YAXPAVdlist@@HPAUworkq_tag@@P6APAXPAX@Z@Z
-
-; bpipe.obj
-?run_program@@YAHPADH0@Z
-?run_program_full_output@@YAHPADH0@Z
-
-; bregex.obj
-b_regcomp
-b_regexec
-b_regerror
-b_regfree
-
-; bsnprintf.obj
-?bsnprintf@@YAHPADJPBDZZ
-?bvsnprintf@@YAHPADJPBD0@Z
-
-; bsock.obj
-?close@BSOCK@@QAEXXZ
-?dup_bsock@@YAPAVBSOCK@@PAV1@@Z
-?fsend@BSOCK@@QAA_NPBDZZ
-?init_bsock@@YAPAVBSOCK@@PAVJCR@@HPBD1HPAUsockaddr@@@Z
-?recv@BSOCK@@QAEJXZ
-?send@BSOCK@@QAE_NXZ
-?signal@BSOCK@@QAE_NH@Z
-
-; bsys.obj
-?bmicrosleep@@YAHJJ@Z
-?bstrncpy@@YAPADPADPBDH@Z
-?bstrncpy@@YAPADPADAAVPOOL_MEM@@H@Z
-?bstrncat@@YAPADPADPBDH@Z
-?bstrcmp@@YA_NPBD0@Z
-?cstrlen@@YAHPBD@Z
-?bfree@@YAXPAX@Z
-?b_malloc@@YAPAXPBDHI@Z
-?brealloc@@YAPAXPAXI@Z
-?_p@@YAXPAPAUpthread_mutex_t_@@@Z
-?_v@@YAXPAPAUpthread_mutex_t_@@@Z
-?create_pid_file@@YAXPADPBDH@Z
-?delete_pid_file@@YAHPADPBDH@Z
-?read_state_file@@YAXPADPBDH@Z
-?write_state_file@@YAXPADPBDH@Z
-?drop@@YAXPAD0@Z
-?bfgets@@YAPADPADHPAU_iobuf@@@Z
-?escape_filename@@YAPADPBD@Z
- 
-; btime.obj 
-?bstrftime@@YAPADPADH_J@Z
-?bstrftimes@@YAPADPADH_J@Z
-?bstrftime_nc@@YAPADPADH_J@Z
-?bstrutime@@YAPADPADH_J@Z
-?str_to_utime@@YA_JPAD@Z
-?get_current_btime@@YA_JXZ
-?btime_to_unix@@YAJ_J@Z
-?btime_to_utime@@YA_J_J@Z
-?tm_woy@@YAHJ@Z
-?get_current_time@@YAXPAUdate_time@@@Z
-?tm_decode@@YAXPAUdate_time@@PAUtm@@@Z
- 
-; btimers.obj 
-?start_thread_timer@@YAPAUs_btimer_t@@PAUpthread_t_@@I@Z
-?start_bsock_timer@@YAPAUs_btimer_t@@PAVBSOCK@@I@Z
-?stop_bsock_timer@@YAXPAUs_btimer_t@@@Z
-?stop_thread_timer@@YAXPAUs_btimer_t@@@Z
- 
-; compat.obj 
-?SetVSSPathConvert@@YAXP6AHPBDPADH@ZP6AHPB_WPA_WH@Z@Z
-?wchar_2_UTF8@@YAHPADPB_WH@Z
-?random@@YAJXZ
-?srandom@@YAXI@Z
-?fstat@@YAHHPAUstat@@@Z
-?stat@@YAHPBDPAU0@@Z
-?fcntl@@YAHHHJ@Z
-?lstat@@YAHPBDPAUstat@@@Z
-?sleep@@YAXH@Z
-?strcasecmp@@YAHPBD0@Z
-?gettimeofday@@YAHPAUtimeval@@PAUtimezone@@@Z
-?opendir@@YAPAXPBD@Z
-?closedir@@YAHPAX@Z
-?readdir_r@@YAHPAXPAUdirent@@PAPAU1@@Z
-?init_signals@@YAXP6AXH@Z@Z
-?init_stack_dump@@YAXXZ
-?pathconf@@YAJPBDH@Z
-?WSA_Init@@YAHXZ
-?win32_fputs@@YAHPBDPAU_iobuf@@@Z
-?win32_cgets@@YAPADPADH@Z
-?win32_unlink@@YAHPBD@Z
-?open_bpipe@@YAPAVBPIPE@@PADHPBD@Z
-?kill@@YAHHH@Z
-?close_bpipe@@YAHPAVBPIPE@@@Z
-?utime@@YAHPBDPAUutimbuf@@@Z
- 
-; cram-md5.obj 
-?cram_md5_challenge@@YA_NPAVBSOCK@@PADHH@Z
-?cram_md5_respond@@YA_NPAVBSOCK@@PADPAH2@Z
- 
-; crc32.obj 
-?bcrc32@@YAIPAEH@Z
- 
-;create_file.obj 
-?create_file@@YAHPAVJCR@@PAUATTR@@PAUBFILE@@H@Z
- 
-; crypto.obj 
-?crypto_digest_new@@YAPAUDigest@@W4crypto_digest_t@@@Z
-?crypto_digest_update@@YA_NPAUDigest@@PBEI@Z
-?crypto_digest_finalize@@YA_NPAUDigest@@PAEPAI@Z
-?crypto_digest_free@@YAXPAUDigest@@@Z
-?init_crypto@@YAHXZ
-?cleanup_crypto@@YAHXZ
-?crypto_sign_new@@YAPAUSignature@@XZ
-?crypto_sign_get_digest@@YA?AW4crypto_error_t@@PAUSignature@@PAUX509_Keypair@@PAPAUDigest@@@Z
-?crypto_sign_verify@@YA?AW4crypto_error_t@@PAUSignature@@PAUX509_Keypair@@PAUDigest@@@Z
-?crypto_sign_add_signer@@YAHPAUSignature@@PAUDigest@@PAUX509_Keypair@@@Z
-?crypto_sign_encode@@YAHPAUSignature@@PAEPAI@Z
-?crypto_sign_decode@@YAPAUSignature@@PBEI@Z
-?crypto_sign_free@@YAXPAUSignature@@@Z
-?crypto_keypair_new@@YAPAUX509_Keypair@@XZ
-?crypto_keypair_dup@@YAPAUX509_Keypair@@PAU1@@Z
-?crypto_keypair_load_cert@@YAHPAUX509_Keypair@@PBD@Z
-?crypto_keypair_has_key@@YA_NPBD@Z
-?crypto_keypair_load_key@@YAHPAUX509_Keypair@@PBDP6AHPADHPBX@Z3@Z
-?crypto_keypair_free@@YAXPAUX509_Keypair@@@Z
-?crypto_session_new@@YAPAUCrypto_Session@@W4crypto_cipher_t@@PAValist@@@Z
-?crypto_session_free@@YAXPAUCrypto_Session@@@Z
-?crypto_session_encode@@YA_NPAUCrypto_Session@@PAEPAI@Z
-?crypto_session_decode@@YA?AW4crypto_error_t@@PBEIPAValist@@PAPAUCrypto_Session@@@Z
-?crypto_cipher_new@@YAPAUCipher_Context@@PAUCrypto_Session@@_NPAI@Z
-?crypto_cipher_update@@YA_NPAUCipher_Context@@PBEI1PAI@Z
-?crypto_cipher_finalize@@YA_NPAUCipher_Context@@PAEPAI@Z
-?crypto_cipher_free@@YAXPAUCipher_Context@@@Z
-?crypto_default_pem_callback@@YAHPADHPBX@Z
-?crypto_digest_name@@YAPBDPAUDigest@@@Z
-?crypto_digest_stream_type@@YA?AW4crypto_digest_t@@H@Z
-?crypto_strerror@@YAPBDW4crypto_error_t@@@Z
- 
-; daemon.obj 
-?daemon_start@@YAXXZ
- 
-; dlist.obj 
-?append@dlist@@QAEXPAX@Z
-?prepend@dlist@@QAEXPAX@Z
-?insert_before@dlist@@QAEXPAX0@Z
-?binary_insert@dlist@@QAEPAXPAXP6AH00@Z@Z
-?first@dlist@@QBEPAXXZ
-?last@dlist@@QBEPAXXZ
-?binary_insert_multiple@dlist@@QAEXPAXP6AH00@Z@Z
-?binary_search@dlist@@QAEPAXPAXP6AH00@Z@Z
-?remove@dlist@@QAEXPAX@Z
-?next@dlist@@QAEPAXPAX@Z
-?destroy@dlist@@QAEXXZ
-?new_dlistString@@YAPAVdlistString@@PBD@Z
-
-; drivetype.obj
-?drivetype@@YA_NPBDPADH@Z
-
-; edit.obj
-?str_to_uint64@@YA_KPAD@Z
-?str_to_int64@@YA_JPAD@Z
-?edit_uint64_with_commas@@YAPAD_KPAD@Z
-?edit_uint64_with_suffix@@YAPAD_KPAD@Z
-?edit_uint64@@YAPAD_KPAD@Z
-?edit_int64@@YAPAD_JPAD@Z
-?duration_to_utime@@YA_NPADPA_J@Z
-?edit_utime@@YAPAD_JPADH@Z
-?size_to_uint64@@YA_NPADHPA_K@Z
-?is_a_number@@YA_NPBD@Z
-?is_an_integer@@YA_NPBD@Z
-?is_name_valid@@YA_NPADPAPAD@Z
-?add_commas@@YAPADPAD0@Z
- 
-; enable_priv.obj 
-?enable_backup_privileges@@YAHPAVJCR@@H@Z
- 
-; enh_fnmatch.obj 
- 
-; find.obj 
-?init_find_files@@YAPAUFF_PKT@@XZ
-?set_find_options@@YAXPAUFF_PKT@@HJ@Z
-?get_win32_driveletters@@YAHPAUFF_PKT@@PAD@Z
-?find_files@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2@Z
-?term_find_files@@YAHPAUFF_PKT@@@Z
- 
-; find_one.obj 
-?find_one_file@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2PADI3@Z
- 
-; fnmatch.obj 
-fnmatch
- 
-; fstype.obj 
-?fstype@@YA_NPBDPADH@Z
- 
-; hmac.obj 
-?hmac_md5@@YAXPAEH0H0@Z
- 
-; htable.obj 
- 
-; idcache.obj 
-?getuser@@YAPADIPADH@Z
-?getgroup@@YAPADIPADH@Z
- 
-; jcr.obj 
-?lock_jobs@@YAXXZ
-?unlock_jobs@@YAXXZ
-?term_last_jobs_list@@YAXXZ
-?lock_last_jobs_list@@YAXXZ
-?unlock_last_jobs_list@@YAXXZ
-?job_end_push@@YAXPAVJCR@@P6AX0PAX@Z1@Z
-?new_jcr@@YAPAVJCR@@HP6AXPAV1@@Z@Z
-?inc_use_count@JCR@@QAEXXZ
-?lock@JCR@@QAEXXZ
-?unlock@JCR@@QAEXXZ
-?init_mutex@JCR@@QAEXXZ
-?b_free_jcr@@YAXPBDHPAVJCR@@@Z
-?dec_use_count@JCR@@QAEXXZ
-?use_count@JCR@@QAEHXZ
-?destroy_mutex@JCR@@QAEXXZ
-?get_jcr_by_id@@YAPAVJCR@@I@Z
-?get_jcr_by_session@@YAPAVJCR@@II@Z
-?get_jcr_by_partial_name@@YAPAVJCR@@PAD@Z
-?get_jcr_by_full_name@@YAPAVJCR@@PAD@Z
-?set_jcr_job_status@@YAXPAVJCR@@H@Z
-?jcr_walk_start@@YAPAVJCR@@XZ
-?jcr_walk_next@@YAPAVJCR@@PAV1@@Z
-?jcr_walk_end@@YAXPAVJCR@@@Z
-?init_jcr_subsystem@@YA_NXZ
- 
-; lex.obj 
-?scan_to_eol@@YAXPAUs_lex_context@@@Z
-?lex_set_default_error_handler@@YAXPAUs_lex_context@@@Z
-?lex_set_error_handler_error_type@@YAHPAUs_lex_context@@H@Z
-?lex_close_file@@YAPAUs_lex_context@@PAU1@@Z
-?lex_open_file@@YAPAUs_lex_context@@PAU1@PBDP6AX1H01ZZ@Z
-?lex_tok_to_str@@YAPBDH@Z
-?lex_get_token@@YAHPAUs_lex_context@@H@Z
- 
-; makepath.obj 
- 
-; match.obj 
-?match_files@@YAHPAVJCR@@PAUFF_PKT@@P6AH1PAX_N@Z2@Z
-?term_include_exclude_files@@YAXPAUFF_PKT@@@Z
-?add_fname_to_include_list@@YAXPAUFF_PKT@@HPBD@Z
-?add_fname_to_exclude_list@@YAXPAUFF_PKT@@PBD@Z
-?file_is_included@@YAHPAUFF_PKT@@PBD@Z
-?file_is_excluded@@YAHPAUFF_PKT@@PBD@Z
- 
-; md5.obj 
-?MD5Init@@YAXPAUMD5Context@@@Z
-?MD5Update@@YAXPAUMD5Context@@PAEI@Z
-?MD5Final@@YAXQAEPAUMD5Context@@@Z
- 
-; mem_pool.obj 
-?sm_get_pool_memory@@YAPADPBDHH@Z
-?sm_get_memory@@YAPADPBDHJ@Z
-?sm_sizeof_pool_memory@@YAJPBDHPAD@Z
-?sm_realloc_pool_memory@@YAPADPBDHPADJ@Z
-?sm_check_pool_memory_size@@YAPADPBDHPADJ@Z
-?sm_free_pool_memory@@YAXPBDHPAD@Z
-?close_memory_pool@@YAXXZ
-?print_memory_pool_stats@@YAXXZ
-?pm_strcat@@YAHPAPADPBD@Z
-?pm_strcat@@YAHAAPADPBD@Z
-?c_str@POOL_MEM@@QBEPADXZ
-?pm_strcat@@YAHAAVPOOL_MEM@@PBD@Z
-?check_size@POOL_MEM@@QAEPADJ@Z
-?pm_strcpy@@YAHPAPADPBD@Z
-?pm_strcpy@@YAHAAPADPBD@Z
-?pm_strcpy@@YAHAAPADAAVPOOL_MEM@@@Z
-?pm_strcpy@@YAHAAVPOOL_MEM@@PBD@Z
-?max_size@POOL_MEM@@QAEJXZ
- 
-; message.obj 
-?my_name_is@@YAXHQAPADPBD@Z
-?get_db_type@@YAPBDXZ
-?set_db_type@@YAXPBD@Z
-?init_msg@@YAXPAVJCR@@PAVMSGS@@@Z
-?init_console_msg@@YAXPBD@Z
-?add_msg_dest@@YAXPAVMSGS@@HHPAD1@Z
-?rem_msg_dest@@YAXPAVMSGS@@HHPAD@Z
-?close_msg@@YAXPAVJCR@@@Z
-?set_errno@berrno@@QAEXH@Z
-?free_msgs_res@@YAXPAVMSGS@@@Z
-?term_msg@@YAXXZ
-?dispatch_message@@YAXPAVJCR@@HJPAD@Z
-?c_str@POOL_MEM@@QBEPADXZ
-?d_msg@@YAXPBDHH0ZZ
-?get_basename@@YAPBDPBD@Z
-?set_trace@@YAXH@Z
-?get_trace@@YA_NXZ
-?p_msg@@YAXPBDHH0ZZ
-?e_msg@@YAXPBDHHH0ZZ
-?Jmsg@@YAXPAVJCR@@HJPBDZZ
-?j_msg@@YAXPBDHPAVJCR@@HJ0ZZ
-?m_msg@@YAHPBDHPAPAD0ZZ
-?m_msg@@YAHPBDHAAPAD0ZZ
-?Mmsg@@YAHPAPADPBDZZ
-?Mmsg@@YAHAAPADPBDZZ
-?Mmsg@@YAHAAVPOOL_MEM@@PBDZZ
-?Qmsg@@YAXPAVJCR@@HJPBDZZ
-?dequeue_messages@@YAXPAVJCR@@@Z
-?q_msg@@YAXPBDHPAVJCR@@HJ0ZZ
- 
-; print.obj 
- 
-; pythonlib.obj 
-?generate_daemon_event@@YAHPAVJCR@@PBD@Z
-?init_python_interpreter@@YAXPBD00@Z
-?term_python_interpreter@@YAXXZ
- 
-; queue.obj 
-?qinsert@@YAXPAUb_queue@@0@Z
-?qnext@@YAPAUb_queue@@PAU1@0@Z
-?qdchain@@YAPAUb_queue@@PAU1@@Z
-
-; runscript.obj 
-?new_runscript@@YAPAVRUNSCRIPT@@XZ
-?reset_default@RUNSCRIPT@@QAEX_N@Z
-?copy_runscript@@YAPAVRUNSCRIPT@@PAV1@@Z
-?free_runscript@@YAXPAVRUNSCRIPT@@@Z
-?run_scripts@@YAHPAVJCR@@PAValist@@PBD@Z
-?set_command@RUNSCRIPT@@QAEXPBD@Z
-?set_target@RUNSCRIPT@@QAEXPBD@Z
-?run@RUNSCRIPT@@QAEHPAVJCR@@PBD@Z
-?free_runscripts@@YAXPAValist@@@Z
-?debug@RUNSCRIPT@@QAEXXZ
- 
-; rwlock.obj 
-?rwl_init@@YAHPAUs_rwlock_tag@@@Z
-?rwl_destroy@@YAHPAUs_rwlock_tag@@@Z
-?rwl_writelock@@YAHPAUs_rwlock_tag@@@Z
-?rwl_writeunlock@@YAHPAUs_rwlock_tag@@@Z
- 
-; save-cwd.obj 
- 
-; scan.obj 
-?strip_leading_space@@YAXPAD@Z
-?strip_trailing_junk@@YAXPAD@Z
-?strip_trailing_newline@@YAXPAD@Z
-?skip_spaces@@YA_NPAPAD@Z
-?skip_nonspaces@@YA_NPAPAD@Z
-?fstrsch@@YAHPBD0@Z
-?next_arg@@YAPADPAPAD@Z
-?parse_args@@YAHPADPAPADPAH11H@Z
-?parse_args_only@@YAHPADPAPADPAH11H@Z
-?bsscanf@@YAHPBD0ZZ
- 
-; serial.obj 
-?serial_int32@@YAXQAPAEJ@Z
-?serial_uint32@@YAXQAPAEI@Z
-?serial_uint64@@YAXQAPAE_K@Z
-?serial_btime@@YAXQAPAE_J@Z
-?serial_float64@@YAXQAPAEN@Z
-?serial_string@@YAXQAPAEQBD@Z
-?unserial_int32@@YAJQAPAE@Z
-?unserial_uint32@@YAIQAPAE@Z
-?unserial_uint64@@YA_KQAPAE@Z
-?unserial_btime@@YA_JQAPAE@Z
-?unserial_float64@@YANQAPAE@Z
-?unserial_string@@YAXQAPAEQAD@Z
- 
-; sha1.obj 
- 
-; signal.obj 
- 
-; smartall.obj 
-?sm_free@@YAXPBDHPAX@Z
-?sm_malloc@@YAPAXPBDHI@Z
-?sm_calloc@@YAPAXPBDHII@Z
-?sm_realloc@@YAPAXPBDHPAXI@Z
-?sm_dump@@YAX_N@Z
-?sm_check@@YAXPBDH_N@Z
-?sm_static@@YAXH@Z
-
-; tls.obj
-?new_tls_context@@YAPAUTLS_Context@@PBD000P6AHPADHPBX@Z20_N@Z
-?free_tls_context@@YAXPAUTLS_Context@@@Z
-
-; tree.obj
-?new_tree@@YAPAUs_tree_root@@H@Z
-?free_tree@@YAXPAUs_tree_root@@@Z
-?insert_tree_node@@YAPAUs_tree_node@@PAD0HPAUs_tree_root@@PAU1@@Z
-?strrchr@@YAPADPADH@Z
-?tree_getpath@@YAHPAUs_tree_node@@PADH@Z
-?tree_cwd@@YAPAUs_tree_node@@PADPAUs_tree_root@@PAU1@@Z
-; rblist
-?insert@rblist@@QAEPAXPAXP6AH00@Z@Z
-?next@rblist@@QAEPAXPAX@Z
-
-; util.obj 
-?is_buf_zero@@YA_NPADH@Z
-?lcase@@YAXPAD@Z
-?bash_spaces@@YAXPAD@Z
-?bash_spaces@@YAXAAVPOOL_MEM@@@Z
-?unbash_spaces@@YAXPAD@Z
-?unbash_spaces@@YAXAAVPOOL_MEM@@@Z
-?encode_time@@YAPADJPAD@Z
-?jobstatus_to_ascii@@YAXHPADH@Z
-?job_status_to_str@@YAPBDH@Z
-?job_type_to_str@@YAPBDH@Z
-?job_level_to_str@@YAPBDH@Z
-?encode_mode@@YAPADIPAD@Z
-?do_shell_expansion@@YAHPADH@Z
-?make_session_key@@YAXPAD0H@Z
-?edit_job_codes@@YAPADPAVJCR@@PAD1PBD@Z
-?set_working_directory@@YAXPAD@Z
- 
-; var.obj 
-?var_create@@YA?AW4var_rc_t@@PAPAUvar_st@@@Z
-?var_destroy@@YA?AW4var_rc_t@@PAUvar_st@@@Z
-?var_config@@YA?AW4var_rc_t@@PAUvar_st@@W4var_config_t@@ZZ
-?var_unescape@@YA?AW4var_rc_t@@PAUvar_st@@PBDHPADHH@Z
-?var_expand@@YA?AW4var_rc_t@@PAUvar_st@@PBDHPAPADPAHH@Z
-?var_strerror@@YAPBDPAUvar_st@@W4var_rc_t@@@Z
- 
-; watchdog.obj 
-?start_watchdog@@YAHXZ
-?stop_watchdog@@YAHXZ
-?new_watchdog@@YAPAUs_watchdog_t@@XZ
-?register_watchdog@@YA_NPAUs_watchdog_t@@@Z
- 
-; winapi.obj 
-?InitWinAPIWrapper@@YAXXZ
- 
-; workq.obj 
Index: src/win32/libbac/libbac.vcproj
===================================================================
--- src/win32/libbac/libbac.vcproj	(revision 8043)
+++ src/win32/libbac/libbac.vcproj	(working copy)
@@ -66,7 +66,7 @@
 				OutputFile="$(OutDir)\bacula.dll"
 				LinkIncremental="0"
 				AdditionalLibraryDirectories="..\..\..\..\depkgs-msvc\lib"
-				ModuleDefinitionFile="msvc\bacula.def"
+				ModuleDefinitionFile=""
 				GenerateDebugInformation="true"
 				ImportLibrary="$(TargetDir)libbac.lib"
 			/>
@@ -152,7 +152,7 @@
 				LinkIncremental="0"
 				SuppressStartupBanner="true"
 				AdditionalLibraryDirectories="..\..\..\..\depkgs-msvc\lib"
-				ModuleDefinitionFile="msvc\bacula.def"
+				ModuleDefinitionFile=""
 				GenerateDebugInformation="true"
 				ImportLibrary="$(TargetDir)libbac.lib"
 			/>
@@ -271,10 +271,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\msvc\bacula.def"
-				>
-			</File>
-			<File
 				RelativePath="..\..\lib\base64.c"
 				>
 				<FileConfiguration
@@ -415,6 +411,26 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\lib\breg.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\lib\bregex.c"
 				>
 				<FileConfiguration
@@ -727,26 +743,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\enh_fnmatch.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						CompileAs="2"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						CompileAs="2"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
 				RelativePath="..\..\findlib\find.c"
 				>
 				<FileConfiguration
@@ -827,7 +823,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\hmac.c"
+				RelativePath="..\..\lib\guid_to_name.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -847,7 +843,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\htable.c"
+				RelativePath="..\..\lib\hmac.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -867,7 +863,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\idcache.c"
+				RelativePath="..\..\lib\htable.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -927,7 +923,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\findlib\makepath.c"
+				RelativePath="..\..\findlib\match.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -947,7 +943,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\findlib\match.c"
+				RelativePath="..\..\lib\md5.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -967,7 +963,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\md5.c"
+				RelativePath="..\..\lib\mem_pool.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -987,7 +983,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\mem_pool.c"
+				RelativePath="..\..\lib\message.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -1007,7 +1003,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\message.c"
+				RelativePath="..\..\findlib\mkpath.c"
 				>
 				<FileConfiguration
 					Name="Debug|Win32"
@@ -1167,26 +1163,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\findlib\save-cwd.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						CompileAs="2"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						CompileAs="2"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
 				RelativePath="..\..\lib\scan.c"
 				>
 				<FileConfiguration
Index: src/win32/winapi.h
===================================================================
--- src/win32/winapi.h	(revision 8043)
+++ src/win32/winapi.h	(working copy)
@@ -67,9 +67,9 @@
 // "\\?\" to the path. For more information, see Naming a File.
 #define MAX_PATH_W 32767
 
-int wchar_2_UTF8(char *pszUTF, const WCHAR *pszUCS, int cchChar = MAX_PATH_UTF8);
-int UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF);
-int make_win32_path_UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF, BOOL* pBIsRawPath = NULL);
+DLL_IMP_EXP int wchar_2_UTF8(char *pszUTF, const WCHAR *pszUCS, int cchChar = MAX_PATH_UTF8);
+DLL_IMP_EXP int UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF);
+DLL_IMP_EXP int make_win32_path_UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF, BOOL* pBIsRawPath = NULL);
 
 // init with win9x, but maybe set to NT in InitWinAPI
 extern DWORD DLL_IMP_EXP g_platform_id;
@@ -203,7 +203,7 @@
 
 extern t_AttachConsole DLL_IMP_EXP p_AttachConsole;
 
-void InitWinAPIWrapper();
+DLL_IMP_EXP void InitWinAPIWrapper();
 
 /* In SHFolder.dll on older systems, and now Shell32.dll */
 typedef BOOL (WINAPI * t_SHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR);
Index: src/jcr.h
===================================================================
--- src/jcr.h	(revision 8043)
+++ src/jcr.h	(working copy)
@@ -140,7 +140,7 @@
 struct FF_PKT;
 struct B_DB;
 struct ATTR_DBR;
-struct Plugin;
+class Plugin;
 struct save_pkt;
 struct bpContext;
 
@@ -182,11 +182,11 @@
    int32_t get_JobType() { return m_JobType; };
    int32_t get_JobLevel() { return m_JobLevel; };
 
-   const char *get_OperationName();    /* in lib/jcr.c */
-   const char *get_ActionName(bool past); /* in lib/jcr.c */
-   void set_JobLevel(int32_t JobLevel); /* in lib/jcr.c */
-   void set_JobType(int32_t JobType);  /* in lib/jcr.c */
-   bool JobReads();                    /* in lib/jcr.c */
+   DLL_IMP_EXP const char *get_OperationName();    /* in lib/jcr.c */
+   DLL_IMP_EXP const char *get_ActionName(bool past); /* in lib/jcr.c */
+   DLL_IMP_EXP void set_JobLevel(int32_t JobLevel); /* in lib/jcr.c */
+   DLL_IMP_EXP void set_JobType(int32_t JobType);  /* in lib/jcr.c */
+   DLL_IMP_EXP bool JobReads();                    /* in lib/jcr.c */
 
    /* Global part of JCR common to all daemons */
    dlink link;                        /* JCR chain link */
@@ -449,25 +449,25 @@
 
 
 /* The following routines are found in lib/jcr.c */
-extern bool init_jcr_subsystem(void);
-extern JCR *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr);
-extern JCR *get_jcr_by_id(uint32_t JobId);
-extern JCR *get_jcr_by_session(uint32_t SessionId, uint32_t SessionTime);
-extern JCR *get_jcr_by_partial_name(char *Job);
-extern JCR *get_jcr_by_full_name(char *Job);
-extern JCR *get_next_jcr(JCR *jcr);
-extern void set_jcr_job_status(JCR *jcr, int JobStatus);
+extern DLL_IMP_EXP bool init_jcr_subsystem(void);
+extern DLL_IMP_EXP JCR *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr);
+extern DLL_IMP_EXP JCR *get_jcr_by_id(uint32_t JobId);
+extern DLL_IMP_EXP JCR *get_jcr_by_session(uint32_t SessionId, uint32_t SessionTime);
+extern DLL_IMP_EXP JCR *get_jcr_by_partial_name(char *Job);
+extern DLL_IMP_EXP JCR *get_jcr_by_full_name(char *Job);
+extern DLL_IMP_EXP JCR *get_next_jcr(JCR *jcr);
+extern DLL_IMP_EXP void set_jcr_job_status(JCR *jcr, int JobStatus);
 extern int DLL_IMP_EXP num_jobs_run;
 
 #ifdef DEBUG
-extern void b_free_jcr(const char *file, int line, JCR *jcr);
+extern DLL_IMP_EXP void b_free_jcr(const char *file, int line, JCR *jcr);
 #define free_jcr(jcr) b_free_jcr(__FILE__, __LINE__, (jcr))
 #else
-extern void free_jcr(JCR *jcr);
+extern DLL_IMP_EXP void free_jcr(JCR *jcr);
 #endif
 
 /* Used to display specific job information after a fatal signal */
 typedef void (dbg_jcr_hook_t)(JCR *jcr, FILE *fp);
-extern void dbg_jcr_add_hook(dbg_jcr_hook_t *fct);
+extern DLL_IMP_EXP void dbg_jcr_add_hook(dbg_jcr_hook_t *fct);
 
 #endif /* __JCR_H_ */
Index: src/lib/runscript.h
===================================================================
--- src/lib/runscript.h	(revision 8043)
+++ src/lib/runscript.h	(working copy)
@@ -30,8 +30,8 @@
  * Eric Bollengier May 2006
  * Version $Id$
  */
- 
 
+
 #ifndef __RUNSCRIPT_H_
 #define __RUNSCRIPT_H_ 1
 
@@ -41,17 +41,17 @@
  *
  * #define USE_RUNSCRIPT
  * #include "lib/runscript.h"
- * 
+ *
  * RUNSCRIPT *script = new_runscript();
  * script->set_command("/bin/sleep 20");
  * script->on_failure = true;
  * script->when = SCRIPT_After;
- * 
+ *
  * script->run("LabelBefore");  // the label must contain "Before" or "After" special keyword
  * free_runscript(script);
  */
 
-/* 
+/*
  * RUNSCRIPT->when can take following bit values:
  */
 enum {
@@ -64,7 +64,7 @@
 
 enum {
    SHELL_CMD   = '|',
-   CONSOLE_CMD = '@' 
+   CONSOLE_CMD = '@'
 };
 
 /*
@@ -85,31 +85,32 @@
    job_code_callback_t job_code_callback;
                                 /* Optional callback function passed to edit_job_code */
    alist *commands;             /* Use during parsing */
-   bool run(JCR *job, const char *name=""); /* name must contain "Before" or "After" keyword */
+
+   DLL_IMP_EXP bool run(JCR *job, const char *name=""); /* name must contain "Before" or "After" keyword */
    bool can_run_at_level(int JobLevel) { return true;};        /* TODO */
-   void set_command(const char *cmd, int cmd_type = SHELL_CMD);
-   void set_target(const char *client_name);
-   void reset_default(bool free_string = false);
-   bool is_local();             /* true if running on local host */
-   void debug();
+   DLL_IMP_EXP void set_command(const char *cmd, int cmd_type = SHELL_CMD);
+   DLL_IMP_EXP void set_target(const char *client_name);
+   DLL_IMP_EXP void reset_default(bool free_string = false);
+   DLL_IMP_EXP bool is_local();             /* true if running on local host */
+   DLL_IMP_EXP void debug();
 
-   void set_job_code_callback(job_code_callback_t job_code_callback);
+   DLL_IMP_EXP void set_job_code_callback(job_code_callback_t job_code_callback);
 };
 
 /* create new RUNSCRIPT (set all value to 0) */
-RUNSCRIPT *new_runscript();           
+DLL_IMP_EXP RUNSCRIPT *new_runscript();
 
 /* create new RUNSCRIPT from an other */
-RUNSCRIPT *copy_runscript(RUNSCRIPT *src);
+DLL_IMP_EXP RUNSCRIPT *copy_runscript(RUNSCRIPT *src);
 
 /* launch each script from runscripts*/
-int run_scripts(JCR *jcr, alist *runscripts, const char *name); 
+DLL_IMP_EXP int run_scripts(JCR *jcr, alist *runscripts, const char *name);
 
 /* free RUNSCRIPT (and all POOLMEM) */
-void free_runscript(RUNSCRIPT *script);
+DLL_IMP_EXP void free_runscript(RUNSCRIPT *script);
 
 /* foreach_alist free RUNSCRIPT */
-void free_runscripts(alist *runscripts); /* you have to free alist */
+DLL_IMP_EXP void free_runscripts(alist *runscripts); /* you have to free alist */
 
 extern DLL_IMP_EXP bool (*console_command)(JCR *jcr, const char *cmd);
 
Index: src/lib/address_conf.h
===================================================================
--- src/lib/address_conf.h	(revision 8043)
+++ src/lib/address_conf.h	(working copy)
@@ -56,46 +56,46 @@
    struct sockaddr_in6 *saddr6;
 #endif
  public:
-   void set_type(i_type o);
-   i_type get_type() const;
-   unsigned short get_port_net_order() const;
+   DLL_IMP_EXP void set_type(i_type o);
+   DLL_IMP_EXP i_type get_type() const;
+   DLL_IMP_EXP unsigned short get_port_net_order() const;
    unsigned short get_port_host_order() const
    {
       return ntohs(get_port_net_order());
    }
-   void set_port_net(unsigned short port);
-   int get_family() const;
-   struct sockaddr *get_sockaddr();
-   int get_sockaddr_len();
-   void copy_addr(IPADDR * src);
-   void set_addr_any();
-   void set_addr4(struct in_addr *ip4);
+   DLL_IMP_EXP void set_port_net(unsigned short port);
+   DLL_IMP_EXP int get_family() const;
+   DLL_IMP_EXP struct sockaddr *get_sockaddr();
+   DLL_IMP_EXP int get_sockaddr_len();
+   DLL_IMP_EXP void copy_addr(IPADDR * src);
+   DLL_IMP_EXP void set_addr_any();
+   DLL_IMP_EXP void set_addr4(struct in_addr *ip4);
 #ifdef HAVE_IPV6
-   void set_addr6(struct in6_addr *ip6);
+   DLL_IMP_EXP void set_addr6(struct in6_addr *ip6);
 #endif
-   const char *get_address(char *outputbuf, int outlen);
+   DLL_IMP_EXP const char *get_address(char *outputbuf, int outlen);
 
-   const char *build_address_str(char *buf, int blen);
+   DLL_IMP_EXP const char *build_address_str(char *buf, int blen);
 
    /* private */
    dlink link;
 };
 
-extern void store_addresses(LEX * lc, RES_ITEM * item, int index, int pass);
-extern void free_addresses(dlist * addrs);
-extern void store_addresses_address(LEX * lc, RES_ITEM * item, int index, int pass);
-extern void store_addresses_port(LEX * lc, RES_ITEM * item, int index, int pass);
-extern void init_default_addresses(dlist ** addr, int port);
+extern DLL_IMP_EXP void store_addresses(LEX * lc, RES_ITEM * item, int index, int pass);
+extern DLL_IMP_EXP void free_addresses(dlist * addrs);
+extern DLL_IMP_EXP void store_addresses_address(LEX * lc, RES_ITEM * item, int index, int pass);
+extern DLL_IMP_EXP void store_addresses_port(LEX * lc, RES_ITEM * item, int index, int pass);
+extern DLL_IMP_EXP void init_default_addresses(dlist ** addr, int port);
 
-extern const char *get_first_address(dlist * addrs, char *outputbuf, int outlen);
-extern int get_first_port_net_order(dlist * addrs);
-extern int get_first_port_host_order(dlist * addrs);
+extern DLL_IMP_EXP const char *get_first_address(dlist * addrs, char *outputbuf, int outlen);
+extern DLL_IMP_EXP int get_first_port_net_order(dlist * addrs);
+extern DLL_IMP_EXP int get_first_port_host_order(dlist * addrs);
 
-extern const char *build_addresses_str(dlist *addrs, char *buf, int blen);
+extern DLL_IMP_EXP const char *build_addresses_str(dlist *addrs, char *buf, int blen);
 
-extern int sockaddr_get_port_net_order(const struct sockaddr *sa);
-extern int sockaddr_get_port(const struct sockaddr *sa);
-extern char *sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
+extern DLL_IMP_EXP int sockaddr_get_port_net_order(const struct sockaddr *sa);
+extern DLL_IMP_EXP int sockaddr_get_port(const struct sockaddr *sa);
+extern DLL_IMP_EXP char *sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
 #ifdef WIN32
 #undef HAVE_OLD_SOCKOPT
 #endif
Index: src/lib/btime.h
===================================================================
--- src/lib/btime.h	(revision 8043)
+++ src/lib/btime.h	(working copy)
@@ -39,19 +39,19 @@
 #define __btime_INCLUDED
 
 /* New btime definition -- use this */
-btime_t get_current_btime(void);
-time_t btime_to_unix(btime_t bt);   /* bacula time to epoch time */
-utime_t btime_to_utime(btime_t bt); /* bacula time to utime_t */
+DLL_IMP_EXP btime_t get_current_btime(void);
+DLL_IMP_EXP time_t btime_to_unix(btime_t bt);   /* bacula time to epoch time */
+DLL_IMP_EXP utime_t btime_to_utime(btime_t bt); /* bacula time to utime_t */
 
-int tm_wom(int mday, int wday);
-int tm_woy(time_t stime);
+DLL_IMP_EXP int tm_wom(int mday, int wday);
+DLL_IMP_EXP int tm_woy(time_t stime);
 
-char *bstrutime(char *dt, int maxlen, utime_t tim);
-char *bstrftime(char *dt, int maxlen, utime_t tim);
-char *bstrftimes(char *dt, int maxlen, utime_t tim);
-char *bstrftime_ny(char *dt, int maxlen, utime_t tim);
-char *bstrftime_nc(char *dt, int maxlen, utime_t tim);
-utime_t str_to_utime(char *str);
+DLL_IMP_EXP char *bstrutime(char *dt, int maxlen, utime_t tim);
+DLL_IMP_EXP char *bstrftime(char *dt, int maxlen, utime_t tim);
+DLL_IMP_EXP char *bstrftimes(char *dt, int maxlen, utime_t tim);
+DLL_IMP_EXP char *bstrftime_ny(char *dt, int maxlen, utime_t tim);
+DLL_IMP_EXP char *bstrftime_nc(char *dt, int maxlen, utime_t tim);
+DLL_IMP_EXP utime_t str_to_utime(char *str);
 
 
 /* =========================================================== */
@@ -99,9 +99,9 @@
 
 extern int date_time_compare(struct date_time *dt1, struct date_time *dt2);
 
-extern void tm_encode(struct date_time *dt, struct tm *tm);
-extern void tm_decode(struct date_time *dt, struct tm *tm);
-extern void get_current_time(struct date_time *dt);
+extern DLL_IMP_EXP void tm_encode(struct date_time *dt, struct tm *tm);
+extern DLL_IMP_EXP void tm_decode(struct date_time *dt, struct tm *tm);
+extern DLL_IMP_EXP void get_current_time(struct date_time *dt);
 
 
 #endif /* __btime_INCLUDED */
Index: src/lib/mem_pool.h
===================================================================
--- src/lib/mem_pool.h	(revision 8043)
+++ src/lib/mem_pool.h	(working copy)
@@ -40,40 +40,40 @@
 #ifdef SMARTALLOC
 
 #define get_pool_memory(pool) sm_get_pool_memory(__FILE__, __LINE__, pool)
-extern POOLMEM *sm_get_pool_memory(const char *file, int line, int pool);
+extern DLL_IMP_EXP POOLMEM *sm_get_pool_memory(const char *file, int line, int pool);
 
 #define get_memory(size) sm_get_memory(__FILE__, __LINE__, size)
-extern POOLMEM *sm_get_memory(const char *fname, int line, int32_t size);
+extern DLL_IMP_EXP POOLMEM *sm_get_memory(const char *fname, int line, int32_t size);
 
 #define sizeof_pool_memory(buf) sm_sizeof_pool_memory(__FILE__, __LINE__, buf)
-extern int32_t sm_sizeof_pool_memory(const char *fname, int line, POOLMEM *buf);
+extern DLL_IMP_EXP int32_t sm_sizeof_pool_memory(const char *fname, int line, POOLMEM *buf);
 
 #define realloc_pool_memory(buf,size) sm_realloc_pool_memory(__FILE__, __LINE__, buf, size)
-extern POOLMEM  *sm_realloc_pool_memory(const char *fname, int line, POOLMEM *buf, int32_t size);
+extern DLL_IMP_EXP POOLMEM  *sm_realloc_pool_memory(const char *fname, int line, POOLMEM *buf, int32_t size);
 
 #define check_pool_memory_size(buf,size) sm_check_pool_memory_size(__FILE__, __LINE__, buf, size)
-extern POOLMEM  *sm_check_pool_memory_size(const char *fname, int line, POOLMEM *buf, int32_t size);
+extern DLL_IMP_EXP POOLMEM  *sm_check_pool_memory_size(const char *fname, int line, POOLMEM *buf, int32_t size);
 
 #define free_pool_memory(x) sm_free_pool_memory(__FILE__, __LINE__, x)
 #define free_memory(x) sm_free_pool_memory(__FILE__, __LINE__, x)
-extern void sm_free_pool_memory(const char *fname, int line, POOLMEM *buf);
+extern DLL_IMP_EXP void sm_free_pool_memory(const char *fname, int line, POOLMEM *buf);
 
 
 #else
 
-extern POOLMEM *get_pool_memory(int pool);
-extern POOLMEM *get_memory(int32_t size);
-extern int32_t sizeof_pool_memory(POOLMEM *buf);
-extern POOLMEM  *realloc_pool_memory(POOLMEM *buf, int32_t size);
-extern POOLMEM  *check_pool_memory_size(POOLMEM *buf, int32_t size);
+extern DLL_IMP_EXP POOLMEM *get_pool_memory(int pool);
+extern DLL_IMP_EXP POOLMEM *get_memory(int32_t size);
+extern DLL_IMP_EXP int32_t sizeof_pool_memory(POOLMEM *buf);
+extern DLL_IMP_EXP POOLMEM  *realloc_pool_memory(POOLMEM *buf, int32_t size);
+extern DLL_IMP_EXP POOLMEM  *check_pool_memory_size(POOLMEM *buf, int32_t size);
 #define free_memory(x) free_pool_memory(x)
-extern void   free_pool_memory(POOLMEM *buf);
+extern DLL_IMP_EXP void   free_pool_memory(POOLMEM *buf);
 
 #endif
 
-extern void garbage_collect_memory_pool();
-extern void  close_memory_pool();
-extern void  print_memory_pool_stats();
+extern DLL_IMP_EXP void garbage_collect_memory_pool();
+extern DLL_IMP_EXP void  close_memory_pool();
+extern DLL_IMP_EXP void  print_memory_pool_stats();
 
 
 
@@ -103,14 +103,14 @@
    int strcat(const char *str);
 };
 
-int pm_strcat(POOLMEM **pm, const char *str);
-int pm_strcat(POOLMEM *&pm, const char *str);
-int pm_strcat(POOL_MEM &pm, const char *str);
-int pm_strcat(POOLMEM *&pm, POOL_MEM &str);
-int pm_strcpy(POOLMEM **pm, const char *str);
-int pm_strcpy(POOLMEM *&pm, const char *str);
-int pm_strcpy(POOL_MEM &pm, const char *str);
-int pm_strcpy(POOLMEM *&pm, POOL_MEM &str);
+DLL_IMP_EXP int pm_strcat(POOLMEM **pm, const char *str);
+DLL_IMP_EXP int pm_strcat(POOLMEM *&pm, const char *str);
+DLL_IMP_EXP int pm_strcat(POOL_MEM &pm, const char *str);
+DLL_IMP_EXP int pm_strcat(POOLMEM *&pm, POOL_MEM &str);
+DLL_IMP_EXP int pm_strcpy(POOLMEM **pm, const char *str);
+DLL_IMP_EXP int pm_strcpy(POOLMEM *&pm, const char *str);
+DLL_IMP_EXP int pm_strcpy(POOL_MEM &pm, const char *str);
+DLL_IMP_EXP int pm_strcpy(POOLMEM *&pm, POOL_MEM &str);
 
 
 #endif
Index: src/lib/bregex.h
===================================================================
--- src/lib/bregex.h	(revision 8043)
+++ src/lib/bregex.h	(working copy)
@@ -20,9 +20,9 @@
  * Created: Thu Sep 26 17:15:36 1991 ylo
  * Last modified: Mon Nov  4 15:49:46 1991 ylo
  *
- *  Modified to work with C++ for use in Bacula,           
+ *  Modified to work with C++ for use in Bacula,
  *     Kern Sibbald April, 2006
- */ 
+ */
 /*
    Bacula® - The Network Backup Solution
 
@@ -55,7 +55,7 @@
 #define REGEXPR_H
 
 /* If we pull in this header, make sure we only get our own library
- *  bregex.c 
+ *  bregex.c
  */
 #define regex_t               b_regex_t
 #define regmatch_t            b_regmatch_t
@@ -108,7 +108,7 @@
    char *errmsg;
    int cflags;			   /* compilation flags */
    POOLMEM *lcase;		   /* used by REG_ICASE */
-};        
+};
 
 
 typedef struct re_registers
@@ -149,13 +149,13 @@
 
 extern unsigned char re_syntax_table[256];
 
-void re_compile_initialize(void);
+DLL_IMP_EXP void re_compile_initialize(void);
 
-int re_set_syntax(int syntax);
+DLL_IMP_EXP int re_set_syntax(int syntax);
 /* This sets the syntax to use and returns the previous syntax.  The
  * syntax is specified by a bit mask of the above defined bits. */
 
-const char *re_compile_pattern(regex_t *compiled, unsigned char *regex);
+DLL_IMP_EXP const char *re_compile_pattern(regex_t *compiled, unsigned char *regex);
 /* This compiles the regexp (given in regex and length in regex_size).
  * This returns NULL if the regexp compiled successfully, and an error
  * message if an error was encountered.  The buffer field must be
@@ -164,15 +164,15 @@
  * buffer is NULL).  Also, the translate field must be set to point to a
  * valid translation table, or NULL if it is not used. */
 
-int re_match(regex_t *compiled, unsigned char *string, int size, int pos,
-             regexp_registers_t old_regs);
+DLL_IMP_EXP int re_match(regex_t *compiled, unsigned char *string, int size, int pos,
+                         regexp_registers_t old_regs);
 /* This tries to match the regexp against the string.  This returns the
  * length of the matched portion, or -1 if the pattern could not be
  * matched and -2 if an error (such as failure stack overflow) is
  * encountered. */
 
-int re_search(regex_t *compiled, unsigned char *string, int size, int startpos,
-              int range, regexp_registers_t regs);
+DLL_IMP_EXP int re_search(regex_t *compiled, unsigned char *string, int size, int startpos,
+			  int range, regexp_registers_t regs);
 /* This searches for a substring matching the regexp.  This returns the
  * first index at which a match is found.  range specifies at how many
  * positions to try matching; positive values indicate searching
@@ -181,18 +181,18 @@
  * -1 if no match is found, and -2 if an error (such as failure stack
  * overflow) is encountered. */
 
-void re_compile_fastmap(regex_t *compiled);
+DLL_IMP_EXP void re_compile_fastmap(regex_t *compiled);
 /* This computes the fastmap for the regexp.  For this to have any effect,
  * the calling program must have initialized the fastmap field to point
  * to an array of 256 characters. */
 
 
-int regcomp(regex_t *preg, const char *regex, int cflags);
-int regexec(regex_t *preg, const char *string, size_t nmatch,
-            regmatch_t pmatch[], int eflags);
-size_t regerror(int errcode, regex_t *preg, char *errbuf, 
-                size_t errbuf_size);
-void regfree(regex_t *preg);
+DLL_IMP_EXP int regcomp(regex_t *preg, const char *regex, int cflags);
+DLL_IMP_EXP int regexec(regex_t *preg, const char *string, size_t nmatch,
+			regmatch_t pmatch[], int eflags);
+DLL_IMP_EXP size_t regerror(int errcode, regex_t *preg, char *errbuf,
+			    size_t errbuf_size);
+DLL_IMP_EXP void regfree(regex_t *preg);
 
 #endif /* REGEXPR_H */
 
Index: src/lib/message.c
===================================================================
--- src/lib/message.c	(revision 8043)
+++ src/lib/message.c	(working copy)
@@ -49,7 +49,7 @@
  */
 const char *working_directory = NULL;       /* working directory path stored here */
 int verbose = 0;                      /* increase User messages */
-int debug_level = 0;                  /* debug level */
+DLL_IMP_EXP int debug_level = 0;                  /* debug level */
 bool dbg_timestamp = false;           /* print timestamp in debug output */
 time_t daemon_start_time = 0;         /* Daemon start time */
 const char *version = VERSION " (" BDATE ")";
Index: src/lib/dlist.h
===================================================================
--- src/lib/dlist.h	(revision 8043)
+++ src/lib/dlist.h	(working copy)
@@ -78,24 +78,24 @@
    ~dlist() { destroy(); }
    void init(void *item, dlink *link);
    void init();
-   void prepend(void *item);
-   void append(void *item);
+   DLL_IMP_EXP void prepend(void *item);
+   DLL_IMP_EXP void append(void *item);
    void set_prev(void *item, void *prev);
    void set_next(void *item, void *next);
    void *get_prev(void *item);
    void *get_next(void *item);
    dlink *get_link(void *item);
-   void insert_before(void *item, void *where);
-   void insert_after(void *item, void *where);
-   void *binary_insert(void *item, int compare(void *item1, void *item2));
-   void *binary_search(void *item, int compare(void *item1, void *item2));
-   void binary_insert_multiple(void *item, int compare(void *item1, void *item2));
-   void remove(void *item);
+   DLL_IMP_EXP void insert_before(void *item, void *where);
+   DLL_IMP_EXP void insert_after(void *item, void *where);
+   DLL_IMP_EXP void *binary_insert(void *item, int compare(void *item1, void *item2));
+   DLL_IMP_EXP void *binary_search(void *item, int compare(void *item1, void *item2));
+   DLL_IMP_EXP void binary_insert_multiple(void *item, int compare(void *item1, void *item2));
+   DLL_IMP_EXP void remove(void *item);
    bool empty() const;
    int  size() const;
-   void *next(void *item);      
-   void *prev(void *item);
-   void destroy();
+   DLL_IMP_EXP void *next(void *item);
+   DLL_IMP_EXP void *prev(void *item);
+   DLL_IMP_EXP void destroy();
    void *first() const;
    void *last() const;
 };
@@ -212,5 +212,5 @@
     */
 };
 
-extern dlistString *new_dlistString(const char *str, int len);
-extern dlistString *new_dlistString(const char *str);
+extern DLL_IMP_EXP dlistString *new_dlistString(const char *str, int len);
+extern DLL_IMP_EXP dlistString *new_dlistString(const char *str);
Index: src/lib/message.h
===================================================================
--- src/lib/message.h	(revision 8043)
+++ src/lib/message.h	(working copy)
@@ -140,11 +140,11 @@
 };
 
  
-void d_msg(const char *file, int line, int level, const char *fmt,...);
-void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
-void Jmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
-void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
-bool get_trace(void);
+DLL_IMP_EXP void d_msg(const char *file, int line, int level, const char *fmt,...);
+DLL_IMP_EXP void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
+DLL_IMP_EXP void Jmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
+DLL_IMP_EXP void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
+DLL_IMP_EXP bool get_trace(void);
 
 struct B_DB;
 typedef void (*sql_query)(JCR *jcr, const char *cmd);
Index: src/lib/md5.h
===================================================================
--- src/lib/md5.h	(revision 8043)
+++ src/lib/md5.h	(working copy)
@@ -46,9 +46,9 @@
 
 typedef struct MD5Context MD5Context;
 
-extern void MD5Init(struct MD5Context *ctx);
-extern void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len);
-extern void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
-extern void MD5Transform(uint32_t buf[4], uint32_t in[16]);
+extern DLL_IMP_EXP void MD5Init(struct MD5Context *ctx);
+extern DLL_IMP_EXP void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len);
+extern DLL_IMP_EXP void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
+extern DLL_IMP_EXP void MD5Transform(uint32_t buf[4], uint32_t in[16]);
 
 #endif /* !__BMD5_H */
Index: src/lib/berrno.h
===================================================================
--- src/lib/berrno.h	(revision 8043)
+++ src/lib/berrno.h	(working copy)
@@ -56,7 +56,7 @@
  * If bit 29 in m_berrno is not set, then it is a Unix errno.
  *
  */
-class berrno : public SMARTALLOC {
+class DLL_IMP_EXP berrno : public SMARTALLOC {
    POOLMEM *m_buf;
    int m_berrno;
    void format_win32_message();
Index: src/lib/guid_to_name.h
===================================================================
--- src/lib/guid_to_name.h	(revision 8043)
+++ src/lib/guid_to_name.h	(working copy)
@@ -39,10 +39,10 @@
    dlist *uid_list;
    dlist *gid_list;
 
-   char *uid_to_name(uid_t uid, char *name, int maxlen);
-   char *gid_to_name(gid_t gid, char *name, int maxlen);
+   DLL_IMP_EXP char *uid_to_name(uid_t uid, char *name, int maxlen);
+   DLL_IMP_EXP char *gid_to_name(gid_t gid, char *name, int maxlen);
 };
 
-guid_list *new_guid_list();
-void free_guid_list(guid_list *list);
+DLL_IMP_EXP guid_list *new_guid_list();
+DLL_IMP_EXP void free_guid_list(guid_list *list);
 
Index: src/lib/htable.h
===================================================================
--- src/lib/htable.h	(revision 8043)
+++ src/lib/htable.h	(working copy)
@@ -95,18 +95,18 @@
    void grow_table();                 /* grow the table */
 
 public:
-   htable(void *item, void *link, int tsize = 31);
+   DLL_IMP_EXP htable(void *item, void *link, int tsize = 31);
    ~htable() { destroy(); }
-   void init(void *item, void *link, int tsize = 31);
-   bool  insert(char *key, void *item);
-   void *lookup(char *key);
-   void *first();                     /* get first item in table */
-   void *next();                      /* get next item in table */
-   void destroy();
-   void stats();                      /* print stats about the table */
-   uint32_t size();                   /* return size of table */
-   char *hash_malloc(int size);       /* malloc bytes for a hash entry */
+   DLL_IMP_EXP void init(void *item, void *link, int tsize = 31);
+   DLL_IMP_EXP bool  insert(char *key, void *item);
+   DLL_IMP_EXP void *lookup(char *key);
+   DLL_IMP_EXP void *first();                     /* get first item in table */
+   DLL_IMP_EXP void *next();                      /* get next item in table */
+   DLL_IMP_EXP void destroy();
+   DLL_IMP_EXP void stats();                      /* print stats about the table */
+   DLL_IMP_EXP uint32_t size();                   /* return size of table */
+   DLL_IMP_EXP char *hash_malloc(int size);       /* malloc bytes for a hash entry */
 #ifdef BIG_MALLOC
-   void hash_big_free();              /* free all hash allocated big buffers */
+   DLL_IMP_EXP void hash_big_free();              /* free all hash allocated big buffers */
 #endif
 };
Index: src/lib/tree.h
===================================================================
--- src/lib/tree.h	(revision 8043)
+++ src/lib/tree.h	(working copy)
@@ -115,14 +115,14 @@
 #define TN_FILE    5                  /* file entry */
 
 /* External interface */
-TREE_ROOT *new_tree(int count);
-TREE_NODE *insert_tree_node(char *path, char *fname, int type,
-                            TREE_ROOT *root, TREE_NODE *parent);
-TREE_NODE *make_tree_path(char *path, TREE_ROOT *root);
-TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node);
-TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node);
-void free_tree(TREE_ROOT *root);
-int tree_getpath(TREE_NODE *node, char *buf, int buf_size);
+DLL_IMP_EXP TREE_ROOT *new_tree(int count);
+DLL_IMP_EXP TREE_NODE *insert_tree_node(char *path, char *fname, int type,
+					TREE_ROOT *root, TREE_NODE *parent);
+DLL_IMP_EXP TREE_NODE *make_tree_path(char *path, TREE_ROOT *root);
+DLL_IMP_EXP TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node);
+DLL_IMP_EXP TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node);
+DLL_IMP_EXP void free_tree(TREE_ROOT *root);
+DLL_IMP_EXP int tree_getpath(TREE_NODE *node, char *buf, int buf_size);
 
 /*
  * Use the following for traversing the whole tree. It will be
Index: src/lib/bsock.h
===================================================================
--- src/lib/bsock.h	(revision 8043)
+++ src/lib/bsock.h	(working copy)
@@ -46,11 +46,10 @@
 
 struct btimer_t;                      /* forward reference */
 class BSOCK;
-btimer_t *start_bsock_timer(BSOCK *bs, uint32_t wait);
-void stop_bsock_timer(btimer_t *wid);
+DLL_IMP_EXP btimer_t *start_bsock_timer(BSOCK *bs, uint32_t wait);
+DLL_IMP_EXP void stop_bsock_timer(btimer_t *wid);
 
-
-class BSOCK {
+class DLL_IMP_EXP BSOCK {
 private:
    BSOCK *m_next;                     /* next BSOCK if duped */
    JCR *m_jcr;                        /* jcr or NULL for error msgs */
Index: src/lib/parse_conf.c
===================================================================
--- src/lib/parse_conf.c	(revision 8043)
+++ src/lib/parse_conf.c	(working copy)
@@ -774,11 +774,11 @@
 void CONFIG::init(
    const char *cf,
    LEX_ERROR_HANDLER *scan_error,
-   int err_type,
+   int32_t err_type,
    void *vres_all,
-   int res_all_size,
-   int r_first,
-   int r_last,
+   int32_t res_all_size,
+   int32_t r_first,
+   int32_t r_last,
    RES_TABLE *resources,
    RES **res_head)
 {
Index: src/lib/protos.h
===================================================================
--- src/lib/protos.h	(revision 8043)
+++ src/lib/protos.h	(working copy)
@@ -37,265 +37,263 @@
 class JCR;
 
 /* attr.c */
-ATTR     *new_attr(JCR *jcr);
-void      free_attr(ATTR *attr);
-int       unpack_attributes_record(JCR *jcr, int32_t stream, char *rec, ATTR *attr);
-void      build_attr_output_fnames(JCR *jcr, ATTR *attr);
-void      print_ls_output(JCR *jcr, ATTR *attr);
+DLL_IMP_EXP ATTR     *new_attr(JCR *jcr);
+DLL_IMP_EXP void      free_attr(ATTR *attr);
+DLL_IMP_EXP int       unpack_attributes_record(JCR *jcr, int32_t stream, char *rec, ATTR *attr);
+DLL_IMP_EXP void      build_attr_output_fnames(JCR *jcr, ATTR *attr);
+DLL_IMP_EXP void      print_ls_output(JCR *jcr, ATTR *attr);
 
 /* base64.c */
-void      base64_init            (void);
-int       to_base64              (intmax_t value, char *where);
-int       from_base64            (intmax_t *value, char *where);
-int       bin_to_base64          (char *buf, int buflen, char *bin, int binlen, 
-                                  int compatible);
+DLL_IMP_EXP void      base64_init            (void);
+DLL_IMP_EXP int       to_base64              (intmax_t value, char *where);
+DLL_IMP_EXP int       from_base64            (intmax_t *value, char *where);
+DLL_IMP_EXP int       bin_to_base64          (char *buf, int buflen, char *bin,
+	                                      int binlen, int compatible);
 
 /* bsys.c */
-char     *bstrncpy               (char *dest, const char *src, int maxlen);
-char     *bstrncpy               (char *dest, POOL_MEM &src, int maxlen);
-char     *bstrncat               (char *dest, const char *src, int maxlen);
-char     *bstrncat               (char *dest, POOL_MEM &src, int maxlen);
-bool      bstrcmp                (const char *s1, const char *s2);
-int       cstrlen                (const char *str);
-void     *b_malloc               (const char *file, int line, size_t size);
+DLL_IMP_EXP char     *bstrncpy               (char *dest, const char *src, int maxlen);
+DLL_IMP_EXP char     *bstrncpy               (char *dest, POOL_MEM &src, int maxlen);
+DLL_IMP_EXP char     *bstrncat               (char *dest, const char *src, int maxlen);
+DLL_IMP_EXP char     *bstrncat               (char *dest, POOL_MEM &src, int maxlen);
+DLL_IMP_EXP bool      bstrcmp                (const char *s1, const char *s2);
+DLL_IMP_EXP int       cstrlen                (const char *str);
+DLL_IMP_EXP void     *b_malloc               (const char *file, int line, size_t size);
 #ifndef bmalloc
-void     *bmalloc                (size_t size);
+DLL_IMP_EXP void     *bmalloc                (size_t size);
 #endif
-void      bfree                  (void *buf);
-void     *brealloc               (void *buf, size_t size);
-void     *bcalloc                (size_t size1, size_t size2);
-int       bsnprintf              (char *str, int32_t size, const char *format, ...);
-int       bvsnprintf             (char *str, int32_t size, const char *format, va_list ap);
-int       pool_sprintf           (char *pool_buf, const char *fmt, ...);
-void      create_pid_file        (char *dir, const char *progname, int port);
-int       delete_pid_file        (char *dir, const char *progname, int port);
-void      drop                   (char *uid, char *gid);
-int       bmicrosleep            (time_t sec, long usec);
-char     *bfgets                 (char *s, int size, FILE *fd);
-void      make_unique_filename   (POOLMEM **name, int Id, char *what);
+DLL_IMP_EXP void      bfree                  (void *buf);
+DLL_IMP_EXP void     *brealloc               (void *buf, size_t size);
+DLL_IMP_EXP void     *bcalloc                (size_t size1, size_t size2);
+DLL_IMP_EXP int       bsnprintf              (char *str, int32_t size, const char *format, ...);
+DLL_IMP_EXP int       bvsnprintf             (char *str, int32_t size, const char *format, va_list ap);
+DLL_IMP_EXP int       pool_sprintf           (char *pool_buf, const char *fmt, ...);
+DLL_IMP_EXP void      create_pid_file        (char *dir, const char *progname, int port);
+DLL_IMP_EXP int       delete_pid_file        (char *dir, const char *progname, int port);
+DLL_IMP_EXP void      drop                   (char *uid, char *gid);
+DLL_IMP_EXP int       bmicrosleep            (time_t sec, long usec);
+DLL_IMP_EXP char     *bfgets                 (char *s, int size, FILE *fd);
+DLL_IMP_EXP void      make_unique_filename   (POOLMEM **name, int Id, char *what);
 #ifndef HAVE_STRTOLL
-long long int strtoll            (const char *ptr, char **endptr, int base);
+DLL_IMP_EXP long long int strtoll            (const char *ptr, char **endptr, int base);
 #endif
-void      read_state_file(char *dir, const char *progname, int port);
-int       b_strerror(int errnum, char *buf, size_t bufsiz);
-char     *escape_filename(const char *file_path);
+DLL_IMP_EXP void      read_state_file(char *dir, const char *progname, int port);
+DLL_IMP_EXP int       b_strerror(int errnum, char *buf, size_t bufsiz);
+DLL_IMP_EXP char     *escape_filename(const char *file_path);
 
 /* bnet.c */
-int32_t    bnet_recv             (BSOCK *bsock);
-bool       bnet_send             (BSOCK *bsock);
-bool       bnet_fsend            (BSOCK *bs, const char *fmt, ...);
-bool       bnet_set_buffer_size  (BSOCK *bs, uint32_t size, int rw);
-bool       bnet_sig              (BSOCK *bs, int sig);
-bool       bnet_tls_server       (TLS_CONTEXT *ctx, BSOCK *bsock,
+DLL_IMP_EXP int32_t    bnet_recv             (BSOCK *bsock);
+DLL_IMP_EXP bool       bnet_send             (BSOCK *bsock);
+DLL_IMP_EXP bool       bnet_fsend            (BSOCK *bs, const char *fmt, ...);
+DLL_IMP_EXP bool       bnet_set_buffer_size  (BSOCK *bs, uint32_t size, int rw);
+DLL_IMP_EXP bool       bnet_sig              (BSOCK *bs, int sig);
+DLL_IMP_EXP bool       bnet_tls_server       (TLS_CONTEXT *ctx, BSOCK *bsock,
                                   alist *verify_list);
-bool       bnet_tls_client       (TLS_CONTEXT *ctx, BSOCK *bsock,
+DLL_IMP_EXP bool       bnet_tls_client       (TLS_CONTEXT *ctx, BSOCK *bsock,
                                   alist *verify_list);
-BSOCK *    bnet_connect          (JCR *jcr, int retry_interval,
+DLL_IMP_EXP BSOCK *    bnet_connect          (JCR *jcr, int retry_interval,
                utime_t max_retry_time, utime_t heart_beat, 
                const char *name, char *host, char *service,
                int port, int verbose);
-void       bnet_close            (BSOCK *bsock);
-BSOCK *    init_bsock            (JCR *jcr, int sockfd, const char *who, const char *ip,
+DLL_IMP_EXP void       bnet_close            (BSOCK *bsock);
+DLL_IMP_EXP BSOCK *    init_bsock            (JCR *jcr, int sockfd, const char *who, const char *ip,
                                   int port, struct sockaddr *client_addr);
 #ifdef HAVE_WIN32
 #ifndef socklen_t
 #define socklen_t int
 #endif
 #endif
-int        bnet_get_peer           (BSOCK *bs, char *buf, socklen_t buflen);
-BSOCK *    dup_bsock             (BSOCK *bsock);
-void       term_bsock            (BSOCK *bsock);
-const char *bnet_strerror         (BSOCK *bsock);
-const char *bnet_sig_to_ascii     (BSOCK *bsock);
-int        bnet_wait_data        (BSOCK *bsock, int sec);
-int        bnet_wait_data_intr   (BSOCK *bsock, int sec);
-bool       is_bnet_stop          (BSOCK *bsock);
-int        is_bnet_error         (BSOCK *bsock);
-void       bnet_suppress_error_messages(BSOCK *bsock, bool flag);
-dlist *bnet_host2ipaddrs(const char *host, int family, const char **errstr);
-int        bnet_set_blocking     (BSOCK *sock);
-int        bnet_set_nonblocking  (BSOCK *sock);
-void       bnet_restore_blocking (BSOCK *sock, int flags);
+DLL_IMP_EXP int        bnet_get_peer           (BSOCK *bs, char *buf, socklen_t buflen);
+DLL_IMP_EXP BSOCK *    dup_bsock             (BSOCK *bsock);
+DLL_IMP_EXP void       term_bsock            (BSOCK *bsock);
+DLL_IMP_EXP const char *bnet_strerror         (BSOCK *bsock);
+DLL_IMP_EXP const char *bnet_sig_to_ascii     (BSOCK *bsock);
+DLL_IMP_EXP int        bnet_wait_data        (BSOCK *bsock, int sec);
+DLL_IMP_EXP int        bnet_wait_data_intr   (BSOCK *bsock, int sec);
+DLL_IMP_EXP bool       is_bnet_stop          (BSOCK *bsock);
+DLL_IMP_EXP int        is_bnet_error         (BSOCK *bsock);
+DLL_IMP_EXP void       bnet_suppress_error_messages(BSOCK *bsock, bool flag);
+DLL_IMP_EXP dlist *    bnet_host2ipaddrs(const char *host, int family, const char **errstr);
+DLL_IMP_EXP int        bnet_set_blocking     (BSOCK *sock);
+DLL_IMP_EXP int        bnet_set_nonblocking  (BSOCK *sock);
+DLL_IMP_EXP void       bnet_restore_blocking (BSOCK *sock, int flags);
 
 /* bget_msg.c */
-int      bget_msg(BSOCK *sock);
+DLL_IMP_EXP int      bget_msg(BSOCK *sock);
 
 /* bpipe.c */
-BPIPE *          open_bpipe(char *prog, int wait, const char *mode);
-int              close_wpipe(BPIPE *bpipe);
-int              close_bpipe(BPIPE *bpipe);
+DLL_IMP_EXP BPIPE *          open_bpipe(char *prog, int wait, const char *mode);
+DLL_IMP_EXP int              close_wpipe(BPIPE *bpipe);
+DLL_IMP_EXP int              close_bpipe(BPIPE *bpipe);
 
 /* cram-md5.c */
-bool cram_md5_respond(BSOCK *bs, const char *password, int *tls_remote_need, int *compatible);
-bool cram_md5_challenge(BSOCK *bs, const char *password, int tls_local_need, int compatible);
-void hmac_md5(uint8_t* text, int text_len, uint8_t* key, int key_len, uint8_t *hmac);
+DLL_IMP_EXP bool cram_md5_respond(BSOCK *bs, const char *password, int *tls_remote_need, int *compatible);
+DLL_IMP_EXP bool cram_md5_challenge(BSOCK *bs, const char *password, int tls_local_need, int compatible);
+DLL_IMP_EXP void hmac_md5(uint8_t* text, int text_len, uint8_t* key, int key_len, uint8_t *hmac);
 
 /* crc32.c */
+DLL_IMP_EXP uint32_t bcrc32(uint8_t *buf, int len);
 
-uint32_t bcrc32(uint8_t *buf, int len);
-
 /* crypto.c */
-int                init_crypto                 (void);
-int                cleanup_crypto              (void);
-DIGEST *           crypto_digest_new           (JCR *jcr, crypto_digest_t type);
-bool               crypto_digest_update        (DIGEST *digest, const uint8_t *data, uint32_t length);
-bool               crypto_digest_finalize      (DIGEST *digest, uint8_t *dest, uint32_t *length);
-void               crypto_digest_free          (DIGEST *digest);
-SIGNATURE *        crypto_sign_new             (JCR *jcr);
-crypto_error_t     crypto_sign_get_digest      (SIGNATURE *sig, X509_KEYPAIR *keypair, 
-                                                crypto_digest_t &algorithm, DIGEST **digest);
-crypto_error_t     crypto_sign_verify          (SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST *digest);
-int                crypto_sign_add_signer      (SIGNATURE *sig, DIGEST *digest, X509_KEYPAIR *keypair);
-int                crypto_sign_encode          (SIGNATURE *sig, uint8_t *dest, uint32_t *length);
-SIGNATURE *        crypto_sign_decode          (JCR *jcr, const uint8_t *sigData, uint32_t length);
-void               crypto_sign_free            (SIGNATURE *sig);
-CRYPTO_SESSION *   crypto_session_new          (crypto_cipher_t cipher, alist *pubkeys);
-void               crypto_session_free         (CRYPTO_SESSION *cs);
-bool               crypto_session_encode       (CRYPTO_SESSION *cs, uint8_t *dest, uint32_t *length);
-crypto_error_t     crypto_session_decode       (const uint8_t *data, uint32_t length, alist *keypairs, CRYPTO_SESSION **session); 
-CRYPTO_SESSION *   crypto_session_decode       (const uint8_t *data, uint32_t length);
-CIPHER_CONTEXT *   crypto_cipher_new           (CRYPTO_SESSION *cs, bool encrypt, uint32_t *blocksize);
-bool               crypto_cipher_update        (CIPHER_CONTEXT *cipher_ctx, const uint8_t *data, uint32_t length, const uint8_t *dest, uint32_t *written);
-bool               crypto_cipher_finalize      (CIPHER_CONTEXT *cipher_ctx, uint8_t *dest, uint32_t *written);
-void               crypto_cipher_free          (CIPHER_CONTEXT *cipher_ctx);
-X509_KEYPAIR *     crypto_keypair_new          (void);
-X509_KEYPAIR *     crypto_keypair_dup          (X509_KEYPAIR *keypair);
-int                crypto_keypair_load_cert    (X509_KEYPAIR *keypair, const char *file);
-bool               crypto_keypair_has_key      (const char *file);
-int                crypto_keypair_load_key     (X509_KEYPAIR *keypair, const char *file, CRYPTO_PEM_PASSWD_CB *pem_callback, const void *pem_userdata);
-void               crypto_keypair_free         (X509_KEYPAIR *keypair);
-int                crypto_default_pem_callback (char *buf, int size, const void *userdata);
-const char *       crypto_digest_name          (DIGEST *digest);
-crypto_digest_t    crypto_digest_stream_type   (int stream);
-const char *       crypto_strerror             (crypto_error_t error);
+DLL_IMP_EXP int                init_crypto                 (void);
+DLL_IMP_EXP int                cleanup_crypto              (void);
+DLL_IMP_EXP DIGEST *           crypto_digest_new           (JCR *jcr, crypto_digest_t type);
+DLL_IMP_EXP bool               crypto_digest_update        (DIGEST *digest, const uint8_t *data, uint32_t length);
+DLL_IMP_EXP bool               crypto_digest_finalize      (DIGEST *digest, uint8_t *dest, uint32_t *length);
+DLL_IMP_EXP void               crypto_digest_free          (DIGEST *digest);
+DLL_IMP_EXP SIGNATURE *        crypto_sign_new             (JCR *jcr);
+DLL_IMP_EXP crypto_error_t     crypto_sign_get_digest      (SIGNATURE *sig, X509_KEYPAIR *keypair, crypto_digest_t &algorithm, DIGEST **digest);
+DLL_IMP_EXP crypto_error_t     crypto_sign_verify          (SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST *digest);
+DLL_IMP_EXP int                crypto_sign_add_signer      (SIGNATURE *sig, DIGEST *digest, X509_KEYPAIR *keypair);
+DLL_IMP_EXP int                crypto_sign_encode          (SIGNATURE *sig, uint8_t *dest, uint32_t *length);
+DLL_IMP_EXP SIGNATURE *        crypto_sign_decode          (JCR *jcr, const uint8_t *sigData, uint32_t length);
+DLL_IMP_EXP void               crypto_sign_free            (SIGNATURE *sig);
+DLL_IMP_EXP CRYPTO_SESSION *   crypto_session_new          (crypto_cipher_t cipher, alist *pubkeys);
+DLL_IMP_EXP void               crypto_session_free         (CRYPTO_SESSION *cs);
+DLL_IMP_EXP bool               crypto_session_encode       (CRYPTO_SESSION *cs, uint8_t *dest, uint32_t *length);
+DLL_IMP_EXP crypto_error_t     crypto_session_decode       (const uint8_t *data, uint32_t length, alist *keypairs, CRYPTO_SESSION **session);
+DLL_IMP_EXP CRYPTO_SESSION *   crypto_session_decode       (const uint8_t *data, uint32_t length);
+DLL_IMP_EXP CIPHER_CONTEXT *   crypto_cipher_new           (CRYPTO_SESSION *cs, bool encrypt, uint32_t *blocksize);
+DLL_IMP_EXP bool               crypto_cipher_update        (CIPHER_CONTEXT *cipher_ctx, const uint8_t *data, uint32_t length, const uint8_t *dest, uint32_t *written);
+DLL_IMP_EXP bool               crypto_cipher_finalize      (CIPHER_CONTEXT *cipher_ctx, uint8_t *dest, uint32_t *written);
+DLL_IMP_EXP void               crypto_cipher_free          (CIPHER_CONTEXT *cipher_ctx);
+DLL_IMP_EXP X509_KEYPAIR *     crypto_keypair_new          (void);
+DLL_IMP_EXP X509_KEYPAIR *     crypto_keypair_dup          (X509_KEYPAIR *keypair);
+DLL_IMP_EXP int                crypto_keypair_load_cert    (X509_KEYPAIR *keypair, const char *file);
+DLL_IMP_EXP bool               crypto_keypair_has_key      (const char *file);
+DLL_IMP_EXP int                crypto_keypair_load_key     (X509_KEYPAIR *keypair, const char *file, CRYPTO_PEM_PASSWD_CB *pem_callback, const void *pem_userdata);
+DLL_IMP_EXP void               crypto_keypair_free         (X509_KEYPAIR *keypair);
+DLL_IMP_EXP int                crypto_default_pem_callback (char *buf, int size, const void *userdata);
+DLL_IMP_EXP const char *       crypto_digest_name          (DIGEST *digest);
+DLL_IMP_EXP crypto_digest_t    crypto_digest_stream_type   (int stream);
+DLL_IMP_EXP const char *       crypto_strerror             (crypto_error_t error);
 
 /* daemon.c */
-void     daemon_start            ();
+DLL_IMP_EXP void     daemon_start            ();
 
 /* edit.c */
-uint64_t         str_to_uint64(char *str);
-int64_t          str_to_int64(char *str);
+DLL_IMP_EXP uint64_t         str_to_uint64(char *str);
+DLL_IMP_EXP int64_t          str_to_int64(char *str);
 #define str_to_int32(str) ((int32_t)str_to_int64(str))
-char *           edit_uint64_with_commas   (uint64_t val, char *buf);
-char *           edit_uint64_with_suffix   (uint64_t val, char *buf);
-char *           add_commas              (char *val, char *buf);
-char *           edit_uint64             (uint64_t val, char *buf);
-char *           edit_int64              (int64_t val, char *buf);
-char *           edit_int64_with_commas  (int64_t val, char *buf);
-bool             duration_to_utime       (char *str, utime_t *value);
-bool             size_to_uint64(char *str, int str_len, uint64_t *rtn_value);
-char             *edit_utime             (utime_t val, char *buf, int buf_len);
-bool             is_a_number             (const char *num);
-bool             is_an_integer           (const char *n);
-bool             is_name_valid           (char *name, POOLMEM **msg);
+DLL_IMP_EXP char *           edit_uint64_with_commas   (uint64_t val, char *buf);
+DLL_IMP_EXP char *           edit_uint64_with_suffix   (uint64_t val, char *buf);
+DLL_IMP_EXP char *           add_commas              (char *val, char *buf);
+DLL_IMP_EXP char *           edit_uint64             (uint64_t val, char *buf);
+DLL_IMP_EXP char *           edit_int64              (int64_t val, char *buf);
+DLL_IMP_EXP char *           edit_int64_with_commas  (int64_t val, char *buf);
+DLL_IMP_EXP bool             duration_to_utime       (char *str, utime_t *value);
+DLL_IMP_EXP bool             size_to_uint64(char *str, int str_len, uint64_t *rtn_value);
+DLL_IMP_EXP char             *edit_utime             (utime_t val, char *buf, int buf_len);
+DLL_IMP_EXP bool             is_a_number             (const char *num);
+DLL_IMP_EXP bool             is_an_integer           (const char *n);
+DLL_IMP_EXP bool             is_name_valid           (char *name, POOLMEM **msg);
 
 /* jcr.c (most definitions are in src/jcr.h) */
-void init_last_jobs_list();
-void term_last_jobs_list();
-void lock_last_jobs_list();
-void unlock_last_jobs_list();
-bool read_last_jobs_list(int fd, uint64_t addr);
-uint64_t write_last_jobs_list(int fd, uint64_t addr);
-void write_state_file(char *dir, const char *progname, int port);
-void job_end_push(JCR *jcr, void job_end_cb(JCR *jcr,void *), void *ctx);
-void lock_jobs();
-void unlock_jobs();
-JCR *jcr_walk_start();
-JCR *jcr_walk_next(JCR *prev_jcr);
-void jcr_walk_end(JCR *jcr);
-uint32_t get_jobid_from_tsd();             
-JCR *get_jcr_from_tsd();
-void set_jcr_in_tsd(JCR *jcr);
+DLL_IMP_EXP void init_last_jobs_list();
+DLL_IMP_EXP void term_last_jobs_list();
+DLL_IMP_EXP void lock_last_jobs_list();
+DLL_IMP_EXP void unlock_last_jobs_list();
+DLL_IMP_EXP bool read_last_jobs_list(int fd, uint64_t addr);
+DLL_IMP_EXP uint64_t write_last_jobs_list(int fd, uint64_t addr);
+DLL_IMP_EXP void write_state_file(char *dir, const char *progname, int port);
+DLL_IMP_EXP void job_end_push(JCR *jcr, void job_end_cb(JCR *jcr,void *), void *ctx);
+DLL_IMP_EXP void lock_jobs();
+DLL_IMP_EXP void unlock_jobs();
+DLL_IMP_EXP JCR *jcr_walk_start();
+DLL_IMP_EXP JCR *jcr_walk_next(JCR *prev_jcr);
+DLL_IMP_EXP void jcr_walk_end(JCR *jcr);
+DLL_IMP_EXP uint32_t get_jobid_from_tsd();
+DLL_IMP_EXP JCR *get_jcr_from_tsd();
+DLL_IMP_EXP void set_jcr_in_tsd(JCR *jcr);
 
 
 /* lex.c */
-LEX *     lex_close_file         (LEX *lf);
-LEX *     lex_open_file          (LEX *lf, const char *fname, LEX_ERROR_HANDLER *scan_error);
-int       lex_get_char           (LEX *lf);
-void      lex_unget_char         (LEX *lf);
-const char *  lex_tok_to_str     (int token);
-int       lex_get_token          (LEX *lf, int expect);
-void      lex_set_default_error_handler (LEX *lf);
-int       lex_set_error_handler_error_type (LEX *lf, int err_type);
+DLL_IMP_EXP LEX *     lex_close_file         (LEX *lf);
+DLL_IMP_EXP LEX *     lex_open_file          (LEX *lf, const char *fname, LEX_ERROR_HANDLER *scan_error);
+DLL_IMP_EXP int       lex_get_char           (LEX *lf);
+DLL_IMP_EXP void      lex_unget_char         (LEX *lf);
+DLL_IMP_EXP const char *  lex_tok_to_str     (int token);
+DLL_IMP_EXP int       lex_get_token          (LEX *lf, int expect);
+DLL_IMP_EXP void      lex_set_default_error_handler (LEX *lf);
+DLL_IMP_EXP int       lex_set_error_handler_error_type (LEX *lf, int err_type);
 
 /* message.c */
-void       my_name_is            (int argc, char *argv[], const char *name);
-void       init_msg              (JCR *jcr, MSGS *msg);
-void       term_msg              (void);
-void       close_msg             (JCR *jcr);
-void       add_msg_dest          (MSGS *msg, int dest, int type, char *where, char *dest_code);
-void       rem_msg_dest          (MSGS *msg, int dest, int type, char *where);
-void       Jmsg                  (JCR *jcr, int type, time_t mtime, const char *fmt, ...);
-void       dispatch_message      (JCR *jcr, int type, time_t mtime, char *buf);
-void       init_console_msg      (const char *wd);
-void       free_msgs_res         (MSGS *msgs);
-void       dequeue_messages      (JCR *jcr);
-void       set_trace             (int trace_flag);
-void       set_db_type           (const char *name);
-void       register_message_callback(void msg_callback(int type, char *msg));
+DLL_IMP_EXP void       my_name_is            (int argc, char *argv[], const char *name);
+DLL_IMP_EXP void       init_msg              (JCR *jcr, MSGS *msg);
+DLL_IMP_EXP void       term_msg              (void);
+DLL_IMP_EXP void       close_msg             (JCR *jcr);
+DLL_IMP_EXP void       add_msg_dest          (MSGS *msg, int dest, int type, char *where, char *dest_code);
+DLL_IMP_EXP void       rem_msg_dest          (MSGS *msg, int dest, int type, char *where);
+DLL_IMP_EXP void       Jmsg                  (JCR *jcr, int type, time_t mtime, const char *fmt, ...);
+DLL_IMP_EXP void       dispatch_message      (JCR *jcr, int type, time_t mtime, char *buf);
+DLL_IMP_EXP void       init_console_msg      (const char *wd);
+DLL_IMP_EXP void       free_msgs_res         (MSGS *msgs);
+DLL_IMP_EXP void       dequeue_messages      (JCR *jcr);
+DLL_IMP_EXP void       set_trace             (int trace_flag);
+DLL_IMP_EXP void       set_db_type           (const char *name);
+DLL_IMP_EXP void       register_message_callback(void msg_callback(int type, char *msg));
 
 /* bnet_server.c */
-void       bnet_thread_server(dlist *addr, int max_clients, workq_t *client_wq,
+DLL_IMP_EXP void       bnet_thread_server(dlist *addr, int max_clients, workq_t *client_wq,
                    void *handle_client_request(void *bsock));
-void       bnet_stop_thread_server(pthread_t tid);
-void             bnet_server             (int port, void handle_client_request(BSOCK *bsock));
-int              net_connect             (int port);
-BSOCK *          bnet_bind               (int port);
-BSOCK *          bnet_accept             (BSOCK *bsock, char *who);
+DLL_IMP_EXP void       bnet_stop_thread_server(pthread_t tid);
+DLL_IMP_EXP void             bnet_server             (int port, void handle_client_request(BSOCK *bsock));
+DLL_IMP_EXP int              net_connect             (int port);
+DLL_IMP_EXP BSOCK *          bnet_bind               (int port);
+DLL_IMP_EXP BSOCK *          bnet_accept             (BSOCK *bsock, char *who);
 
 /* pythonlib.c */
 typedef int (EVENT_HANDLER)(JCR *jcr, const char *event);
 //EVENT_HANDLER *generate_daemon_event;
-int generate_daemon_event(JCR *jcr, const char *event);
+DLL_IMP_EXP int generate_daemon_event(JCR *jcr, const char *event);
 
 /* signal.c */
-void             init_signals             (void terminate(int sig));
-void             init_stack_dump          (void);
+DLL_IMP_EXP void             init_signals             (void terminate(int sig));
+DLL_IMP_EXP void             init_stack_dump          (void);
 
 /* scan.c */
-void             strip_leading_space     (char *str);
-void             strip_trailing_junk     (char *str);
-void             strip_trailing_newline  (char *str);
+DLL_IMP_EXP void             strip_leading_space     (char *str);
+DLL_IMP_EXP void             strip_trailing_junk     (char *str);
+DLL_IMP_EXP void             strip_trailing_newline  (char *str);
 
-void             strip_trailing_slashes  (char *dir);
-bool             skip_spaces             (char **msg);
-bool             skip_nonspaces          (char **msg);
-int              fstrsch                 (const char *a, const char *b);
-char            *next_arg(char **s);
-int              parse_args(POOLMEM *cmd, POOLMEM **args, int *argc,
+DLL_IMP_EXP void             strip_trailing_slashes  (char *dir);
+DLL_IMP_EXP bool             skip_spaces             (char **msg);
+DLL_IMP_EXP bool             skip_nonspaces          (char **msg);
+DLL_IMP_EXP int              fstrsch                 (const char *a, const char *b);
+DLL_IMP_EXP char            *next_arg(char **s);
+DLL_IMP_EXP int              parse_args(POOLMEM *cmd, POOLMEM **args, int *argc,
                         char **argk, char **argv, int max_args);
-int              parse_args_only(POOLMEM *cmd, POOLMEM **args, int *argc,
+DLL_IMP_EXP int              parse_args_only(POOLMEM *cmd, POOLMEM **args, int *argc,
                         char **argk, char **argv, int max_args);
-void            split_path_and_filename(const char *fname, POOLMEM **path,
+DLL_IMP_EXP void            split_path_and_filename(const char *fname, POOLMEM **path,
                         int *pnl, POOLMEM **file, int *fnl);
-int             bsscanf(const char *buf, const char *fmt, ...);
+DLL_IMP_EXP int             bsscanf(const char *buf, const char *fmt, ...);
 
 
 /* tls.c */
-TLS_CONTEXT      *new_tls_context        (const char *ca_certfile,
-                                          const char *ca_certdir,
-                                          const char *certfile,
-                                          const char *keyfile,
-                                          CRYPTO_PEM_PASSWD_CB *pem_callback,
-                                          const void *pem_userdata,
-                                          const char *dhfile,
-                                          bool verify_peer);
-void             free_tls_context        (TLS_CONTEXT *ctx);
+DLL_IMP_EXP TLS_CONTEXT      *new_tls_context(const char *ca_certfile,
+                                              const char *ca_certdir,
+                                              const char *certfile,
+                                              const char *keyfile,
+                                              CRYPTO_PEM_PASSWD_CB *pem_callback,
+                                              const void *pem_userdata,
+                                              const char *dhfile,
+                                              bool verify_peer);
+DLL_IMP_EXP void             free_tls_context        (TLS_CONTEXT *ctx);
 #ifdef HAVE_TLS
-bool             tls_postconnect_verify_host(JCR *jcr, TLS_CONNECTION *tls,
+DLL_IMP_EXP bool             tls_postconnect_verify_host(JCR *jcr, TLS_CONNECTION *tls,
                                                const char *host);
-bool             tls_postconnect_verify_cn(JCR *jcr, TLS_CONNECTION *tls,
+DLL_IMP_EXP bool             tls_postconnect_verify_cn(JCR *jcr, TLS_CONNECTION *tls,
                                                alist *verify_list);
-TLS_CONNECTION   *new_tls_connection     (TLS_CONTEXT *ctx, int fd);
-bool             tls_bsock_accept        (BSOCK *bsock);
-int              tls_bsock_writen        (BSOCK *bsock, char *ptr, int32_t nbytes);
-int              tls_bsock_readn         (BSOCK *bsock, char *ptr, int32_t nbytes);
+DLL_IMP_EXP TLS_CONNECTION   *new_tls_connection     (TLS_CONTEXT *ctx, int fd);
+DLL_IMP_EXP bool             tls_bsock_accept        (BSOCK *bsock);
+DLL_IMP_EXP int              tls_bsock_writen        (BSOCK *bsock, char *ptr, int32_t nbytes);
+DLL_IMP_EXP int              tls_bsock_readn         (BSOCK *bsock, char *ptr, int32_t nbytes);
 #endif /* HAVE_TLS */
-bool             tls_bsock_connect       (BSOCK *bsock);
-void             tls_bsock_shutdown      (BSOCK *bsock);
-void             free_tls_connection     (TLS_CONNECTION *tls);
-bool             get_tls_require         (TLS_CONTEXT *ctx);
-bool             get_tls_enable          (TLS_CONTEXT *ctx);
+DLL_IMP_EXP bool             tls_bsock_connect       (BSOCK *bsock);
+DLL_IMP_EXP void             tls_bsock_shutdown      (BSOCK *bsock);
+DLL_IMP_EXP void             free_tls_connection     (TLS_CONNECTION *tls);
+DLL_IMP_EXP bool             get_tls_require         (TLS_CONTEXT *ctx);
+DLL_IMP_EXP bool             get_tls_enable          (TLS_CONTEXT *ctx);
 
 
 /* util.c */
@@ -304,44 +302,44 @@
 typedef char *(*job_code_callback_t)(JCR *, const char *);
 }
 
-bool             is_buf_zero             (char *buf, int len);
-void             lcase                   (char *str);
-void             bash_spaces             (char *str);
-void             bash_spaces             (POOL_MEM &pm);
-void             unbash_spaces           (char *str);
-void             unbash_spaces           (POOL_MEM &pm);
-char *           encode_time             (time_t time, char *buf);
-char *           encode_mode             (mode_t mode, char *buf);
-int              do_shell_expansion      (char *name, int name_len);
-void             jobstatus_to_ascii      (int JobStatus, char *msg, int maxlen);
-void             jobstatus_to_ascii_gui  (int JobStatus, char *msg, int maxlen);
-int              run_program             (char *prog, int wait, POOLMEM *&results);
-int              run_program_full_output (char *prog, int wait, POOLMEM *&results);
-const char *     job_type_to_str         (int type);
-const char *     job_status_to_str       (int stat);
-const char *     job_level_to_str        (int level);
-const char *     volume_status_to_str    (const char *status);
-void             make_session_key        (char *key, char *seed, int mode);
-void             encode_session_key      (char *encode, char *session, char *key, int maxlen);
-void             decode_session_key      (char *decode, char *session, char *key, int maxlen);
-POOLMEM *        edit_job_codes          (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL);
-void             set_working_directory   (char *wd);
-const char *     last_path_separator     (const char *str);
+DLL_IMP_EXP bool             is_buf_zero             (char *buf, int len);
+DLL_IMP_EXP void             lcase                   (char *str);
+DLL_IMP_EXP void             bash_spaces             (char *str);
+DLL_IMP_EXP void             bash_spaces             (POOL_MEM &pm);
+DLL_IMP_EXP void             unbash_spaces           (char *str);
+DLL_IMP_EXP void             unbash_spaces           (POOL_MEM &pm);
+DLL_IMP_EXP char *           encode_time             (time_t time, char *buf);
+DLL_IMP_EXP char *           encode_mode             (mode_t mode, char *buf);
+DLL_IMP_EXP int              do_shell_expansion      (char *name, int name_len);
+DLL_IMP_EXP void             jobstatus_to_ascii      (int JobStatus, char *msg, int maxlen);
+DLL_IMP_EXP void             jobstatus_to_ascii_gui  (int JobStatus, char *msg, int maxlen);
+DLL_IMP_EXP int              run_program             (char *prog, int wait, POOLMEM *&results);
+DLL_IMP_EXP int              run_program_full_output (char *prog, int wait, POOLMEM *&results);
+DLL_IMP_EXP const char *     job_type_to_str         (int type);
+DLL_IMP_EXP const char *     job_status_to_str       (int stat);
+DLL_IMP_EXP const char *     job_level_to_str        (int level);
+DLL_IMP_EXP const char *     volume_status_to_str    (const char *status);
+DLL_IMP_EXP void             make_session_key        (char *key, char *seed, int mode);
+DLL_IMP_EXP void             encode_session_key      (char *encode, char *session, char *key, int maxlen);
+DLL_IMP_EXP void             decode_session_key      (char *decode, char *session, char *key, int maxlen);
+DLL_IMP_EXP POOLMEM *        edit_job_codes          (JCR *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL);
+DLL_IMP_EXP void             set_working_directory   (char *wd);
+DLL_IMP_EXP const char *     last_path_separator     (const char *str);
 
 
 /* watchdog.c */
-int start_watchdog(void);
-int stop_watchdog(void);
-watchdog_t *new_watchdog(void);
-bool register_watchdog(watchdog_t *wd);
-bool unregister_watchdog(watchdog_t *wd);
+DLL_IMP_EXP int start_watchdog(void);
+DLL_IMP_EXP int stop_watchdog(void);
+DLL_IMP_EXP watchdog_t *new_watchdog(void);
+DLL_IMP_EXP bool register_watchdog(watchdog_t *wd);
+DLL_IMP_EXP bool unregister_watchdog(watchdog_t *wd);
 
 /* timers.c */
-btimer_t *start_child_timer(JCR *jcr, pid_t pid, uint32_t wait);
-void stop_child_timer(btimer_t *wid);
-btimer_t *start_thread_timer(JCR *jcr, pthread_t tid, uint32_t wait);
-void stop_thread_timer(btimer_t *wid);
-btimer_t *start_bsock_timer(BSOCK *bs, uint32_t wait);
-void stop_bsock_timer(btimer_t *wid);
+DLL_IMP_EXP btimer_t *start_child_timer(JCR *jcr, pid_t pid, uint32_t wait);
+DLL_IMP_EXP void stop_child_timer(btimer_t *wid);
+DLL_IMP_EXP btimer_t *start_thread_timer(JCR *jcr, pthread_t tid, uint32_t wait);
+DLL_IMP_EXP void stop_thread_timer(btimer_t *wid);
+DLL_IMP_EXP btimer_t *start_bsock_timer(BSOCK *bs, uint32_t wait);
+DLL_IMP_EXP void stop_bsock_timer(btimer_t *wid);
 
 #endif /* __LIBPROTOS_H */
Index: src/lib/rblist.h
===================================================================
--- src/lib/rblist.h	(revision 8043)
+++ src/lib/rblist.h	(working copy)
@@ -82,15 +82,15 @@
    void *left(const void *item) const;
    void *right(const void *item) const;
    bool red(const void *item) const;
-   void *insert(void *item, int compare(void *item1, void *item2));
-   void *search(void *item, int compare(void *item1, void *item2));
-   void *first(void);
-   void *next(void *item);
-   void *any(void *item);
-   void remove(void *item);
+   DLL_IMP_EXP void *insert(void *item, int compare(void *item1, void *item2));
+   DLL_IMP_EXP void *search(void *item, int compare(void *item1, void *item2));
+   DLL_IMP_EXP void *first(void);
+   DLL_IMP_EXP void *next(void *item);
+   DLL_IMP_EXP void *any(void *item);
+   DLL_IMP_EXP void remove(void *item);
    bool empty(void) const;
    int size(void) const;
-   void destroy(void);
+   DLL_IMP_EXP void destroy(void);
 };
 
 
Index: src/lib/rwlock.h
===================================================================
--- src/lib/rwlock.h	(revision 8043)
+++ src/lib/rwlock.h	(working copy)
@@ -68,13 +68,13 @@
 /*
  * read/write lock prototypes
  */
-extern int rwl_init(brwlock_t *wrlock);
-extern int rwl_destroy(brwlock_t *rwlock);
-extern int rwl_readlock(brwlock_t *rwlock);
-extern int rwl_readtrylock(brwlock_t *rwlock);
-extern int rwl_readunlock(brwlock_t *rwlock);
-extern int rwl_writelock(brwlock_t *rwlock);
-extern int rwl_writetrylock(brwlock_t *rwlock);
-extern int rwl_writeunlock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_init(brwlock_t *wrlock);
+extern DLL_IMP_EXP int rwl_destroy(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_readlock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_readtrylock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_readunlock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_writelock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_writetrylock(brwlock_t *rwlock);
+extern DLL_IMP_EXP int rwl_writeunlock(brwlock_t *rwlock);
 
 #endif /* __RWLOCK_H */
Index: src/lib/alist.h
===================================================================
--- src/lib/alist.h	(revision 8043)
+++ src/lib/alist.h	(working copy)
@@ -73,18 +73,18 @@
    alist(int num = 1, bool own=true);
    ~alist();
    void init(int num = 1, bool own=true);
-   void append(void *item);
-   void prepend(void *item);
-   void *remove(int index);
-   void *get(int index);
+   DLL_IMP_EXP void append(void *item);
+   DLL_IMP_EXP void prepend(void *item);
+   DLL_IMP_EXP void *remove(int index);
+   DLL_IMP_EXP void *get(int index);
    bool empty() const;
-   void *prev();
-   void *next();
-   void *first();
-   void *last();
+   DLL_IMP_EXP void *prev();
+   DLL_IMP_EXP void *next();
+   DLL_IMP_EXP void *first();
+   DLL_IMP_EXP void *last();
    void * operator [](int index) const;
    int size() const;
-   void destroy();
+   DLL_IMP_EXP void destroy();
    void grow(int num);
 
    /* Use it as a stack, pushing and poping from the end */
Index: src/lib/breg.h
===================================================================
--- src/lib/breg.h	(revision 8043)
+++ src/lib/breg.h	(working copy)
@@ -46,7 +46,7 @@
 /* Usage:
  *
  * #include "lib/breg.h"
- * 
+ *
  * BREGEXP *breg = new_bregexp("!/prod!/test!");
  * char *filename = breg->replace("/prod/data.dat");
  *   or
@@ -81,39 +81,39 @@
 };
 
 /* create new BREGEXP and compile regex_t */
-BREGEXP *new_bregexp(const char *motif); 
+BREGEXP *new_bregexp(const char *motif);
 
 /* launch each bregexp on filename */
-int run_bregexp(alist *bregexps, const char *fname); 
+DLL_IMP_EXP int run_bregexp(alist *bregexps, const char *fname);
 
 /* free BREGEXP (and all POOLMEM) */
-void free_bregexp(BREGEXP *script);
+DLL_IMP_EXP void free_bregexp(BREGEXP *script);
 
 /* fill an alist with BREGEXP from where */
-alist *get_bregexps(const char *where);
+DLL_IMP_EXP alist *get_bregexps(const char *where);
 
 /* apply every regexps from the alist */
-bool apply_bregexps(const char *fname, alist *bregexps, char **result);
+DLL_IMP_EXP bool apply_bregexps(const char *fname, alist *bregexps, char **result);
 
 /* foreach_alist free RUNSCRIPT */
-void free_bregexps(alist *bregexps); /* you have to free alist */
+DLL_IMP_EXP void free_bregexps(alist *bregexps); /* you have to free alist */
 
 /* get regexp size */
-int bregexp_get_build_where_size(char *strip_prefix, 
-                                 char *add_prefix, 
-                                 char *add_suffix);
+DLL_IMP_EXP int bregexp_get_build_where_size(char *strip_prefix,
+					     char *add_prefix,
+					     char *add_suffix);
 
-/* get a bregexp string from user arguments 
+/* get a bregexp string from user arguments
  * you must allocate it with bregexp_get_build_where_size();
  */
-char *bregexp_build_where(char *dest, int str_size,
-                          char *strip_prefix, 
-                          char *add_prefix, 
-                          char *add_suffix);
+DLL_IMP_EXP char *bregexp_build_where(char *dest, int str_size,
+				      char *strip_prefix,
+				      char *add_prefix,
+				      char *add_suffix);
 
-/* escape a string to regexp format (sep and \) 
+/* escape a string to regexp format (sep and \)
  * dest must be long enough (dest = 2*src + 1)
  */
-char *bregexp_escape_string(char *dest, const char *src, const char sep);
+DLL_IMP_EXP char *bregexp_escape_string(char *dest, const char *src, const char sep);
 
 #endif /* __BREG_H_ */
Index: src/lib/serial.h
===================================================================
--- src/lib/serial.h	(revision 8043)
+++ src/lib/serial.h	(working copy)
@@ -34,25 +34,25 @@
 
 /*  Serialisation support functions from serial.c.  */
 
-extern void serial_int16(uint8_t * * const ptr, const int16_t v);
-extern void serial_uint16(uint8_t * * const ptr, const uint16_t v);
-extern void serial_int32(uint8_t * * const ptr, const int32_t v);
-extern void serial_uint32(uint8_t * * const ptr, const uint32_t v);
-extern void serial_int64(uint8_t * * ptr, int64_t v);
-extern void serial_uint64(uint8_t * * const ptr, const uint64_t v);
-extern void serial_btime(uint8_t * * const ptr, const btime_t v);
-extern void serial_float64(uint8_t * * const ptr, const float64_t v);
-extern void serial_string(uint8_t * * const ptr, const char * const str);
+extern DLL_IMP_EXP void serial_int16(uint8_t * * const ptr, const int16_t v);
+extern DLL_IMP_EXP void serial_uint16(uint8_t * * const ptr, const uint16_t v);
+extern DLL_IMP_EXP void serial_int32(uint8_t * * const ptr, const int32_t v);
+extern DLL_IMP_EXP void serial_uint32(uint8_t * * const ptr, const uint32_t v);
+extern DLL_IMP_EXP void serial_int64(uint8_t * * ptr, int64_t v);
+extern DLL_IMP_EXP void serial_uint64(uint8_t * * const ptr, const uint64_t v);
+extern DLL_IMP_EXP void serial_btime(uint8_t * * const ptr, const btime_t v);
+extern DLL_IMP_EXP void serial_float64(uint8_t * * const ptr, const float64_t v);
+extern DLL_IMP_EXP void serial_string(uint8_t * * const ptr, const char * const str);
 
-extern int16_t unserial_int16(uint8_t * * const ptr);
-extern uint16_t unserial_uint16(uint8_t * * const ptr);
-extern int32_t unserial_int32(uint8_t * * const ptr);
-extern uint32_t unserial_uint32(uint8_t * * const ptr);
-extern int64_t unserial_int64(uint8_t * * const ptr);
-extern uint64_t unserial_uint64(uint8_t * * const ptr);
-extern btime_t unserial_btime(uint8_t * * const ptr);
-extern float64_t unserial_float64(uint8_t * * const ptr);
-extern void unserial_string(uint8_t * * const ptr, char * const str);
+extern DLL_IMP_EXP int16_t unserial_int16(uint8_t * * const ptr);
+extern DLL_IMP_EXP uint16_t unserial_uint16(uint8_t * * const ptr);
+extern DLL_IMP_EXP int32_t unserial_int32(uint8_t * * const ptr);
+extern DLL_IMP_EXP uint32_t unserial_uint32(uint8_t * * const ptr);
+extern DLL_IMP_EXP int64_t unserial_int64(uint8_t * * const ptr);
+extern DLL_IMP_EXP uint64_t unserial_uint64(uint8_t * * const ptr);
+extern DLL_IMP_EXP btime_t unserial_btime(uint8_t * * const ptr);
+extern DLL_IMP_EXP float64_t unserial_float64(uint8_t * * const ptr);
+extern DLL_IMP_EXP void unserial_string(uint8_t * * const ptr, char * const str);
 
 /*
 
Index: src/lib/smartall.h
===================================================================
--- src/lib/smartall.h	(revision 8043)
+++ src/lib/smartall.h	(working copy)
@@ -43,22 +43,22 @@
 #define SMARTALLOC SMARTALLOC
 
 
-extern void *sm_malloc(const char *fname, int lineno, unsigned int nbytes),
+extern DLL_IMP_EXP void *sm_malloc(const char *fname, int lineno, unsigned int nbytes),
             *sm_calloc(const char *fname, int lineno,
                 unsigned int nelem, unsigned int elsize),
             *sm_realloc(const char *fname, int lineno, void *ptr, unsigned int size),
             *actuallymalloc(unsigned int size),
             *actuallycalloc(unsigned int nelem, unsigned int elsize),
             *actuallyrealloc(void *ptr, unsigned int size);
-extern void sm_free(const char *fname, int lineno, void *fp);
-extern void actuallyfree(void *cp),
+extern DLL_IMP_EXP void sm_free(const char *fname, int lineno, void *fp);
+extern DLL_IMP_EXP void actuallyfree(void *cp),
             sm_dump(bool bufdump, bool in_use=false), sm_static(int mode);
-extern void sm_new_owner(const char *fname, int lineno, char *buf);
+extern DLL_IMP_EXP void sm_new_owner(const char *fname, int lineno, char *buf);
 
 #ifdef SMCHECK
 #define Dsm_check(lvl) if ((lvl)<=debug_level) sm_check(__FILE__, __LINE__, true)
-extern void sm_check(const char *fname, int lineno, bool bufdump);
-extern int sm_check_rtn(const char *fname, int lineno, bool bufdump);
+extern DLL_IMP_EXP void sm_check(const char *fname, int lineno, bool bufdump);
+extern DLL_IMP_EXP int sm_check_rtn(const char *fname, int lineno, bool bufdump);
 #else
 #define Dsm_check(lvl)
 #define sm_check(f, l, fl)
@@ -92,7 +92,7 @@
 #define sm_check(f, l, fl)
 #define sm_check_rtn(f, l, fl) 1
 
-extern void *b_malloc();
+extern DLL_IMP_EXP void *b_malloc();
 #define malloc(x) b_malloc(__FILE__, __LINE__, (x))
 
 
Index: src/lib/fnmatch.h
===================================================================
--- src/lib/fnmatch.h	(revision 8043)
+++ src/lib/fnmatch.h	(working copy)
@@ -51,6 +51,6 @@
 #define FNM_IGNORECASE  FNM_CASEFOLD
 #define FNM_FILE_NAME   FNM_PATHNAME
 
-extern "C" int fnmatch(const char *, const char *, int);
+extern "C" DLL_IMP_EXP int fnmatch(const char *, const char *, int);
 
 #endif                          /* !_FNMATCH_H_ */
Index: src/lib/plugins.h
===================================================================
--- src/lib/plugins.h	(revision 8043)
+++ src/lib/plugins.h	(working copy)
@@ -75,14 +75,14 @@
 };
 
 /* Functions */
-extern Plugin *new_plugin();
-extern bool load_plugins(void *binfo, void *bfuncs, const char *plugin_dir, const char *type);
-extern void unload_plugins();
+extern DLL_IMP_EXP Plugin *new_plugin();
+extern DLL_IMP_EXP bool load_plugins(void *binfo, void *bfuncs, const char *plugin_dir, const char *type);
+extern DLL_IMP_EXP void unload_plugins();
 
 /* Each daemon can register a debug hook that will be called
  * after a fatal signal
  */
 typedef void (dbg_plugin_hook_t)(Plugin *plug, FILE *fp);
-extern void dbg_plugin_add_hook(dbg_plugin_hook_t *fct);
+extern DLL_IMP_EXP void dbg_plugin_add_hook(dbg_plugin_hook_t *fct);
 
 #endif /* __PLUGINS_H */
Index: src/lib/queue.h
===================================================================
--- src/lib/queue.h	(revision 8043)
+++ src/lib/queue.h	(working copy)
@@ -43,7 +43,7 @@
 
 /*  Queue functions  */
 
-void    qinsert(BQUEUE *qhead, BQUEUE *object);
-BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem);
-BQUEUE *qdchain(BQUEUE *qitem);
-BQUEUE *qremove(BQUEUE *qhead);
+DLL_IMP_EXP void    qinsert(BQUEUE *qhead, BQUEUE *object);
+DLL_IMP_EXP BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem);
+DLL_IMP_EXP BQUEUE *qdchain(BQUEUE *qitem);
+DLL_IMP_EXP BQUEUE *qremove(BQUEUE *qhead);
Index: src/lib/lex.h
===================================================================
--- src/lib/lex.h	(revision 8043)
+++ src/lib/lex.h	(working copy)
@@ -133,7 +133,7 @@
 #define scan_err5(lc, msg, a1, a2, a3, a4, a5) lc->scan_error(__FILE__, __LINE__, lc, msg, a1, a2, a3, a4, a5)
 #define scan_err6(lc, msg, a1, a2, a3, a4, a5, a6) lc->scan_error(__FILE__, __LINE__, lc, msg, a1, a2, a3, a4, a5, a6)
 
-void scan_to_eol(LEX *lc);
+DLL_IMP_EXP void scan_to_eol(LEX *lc);
 int scan_to_next_not_eol(LEX * lc);
 
 #endif /* _LEX_H */
Index: src/lib/var.h
===================================================================
--- src/lib/var.h	(revision 8043)
+++ src/lib/var.h	(working copy)
@@ -136,13 +136,13 @@
 );
 
 
-var_rc_t  var_create    (var_t **var);
-var_rc_t  var_destroy   (var_t  *var);
-var_rc_t  var_config    (var_t  *var, var_config_t mode, ...);
-var_rc_t  var_unescape  (var_t  *var, const char *src_ptr, int src_len, char  *dst_ptr, int dst_len, int all);
-var_rc_t  var_expand    (var_t  *var, const char *src_ptr, int src_len, char **dst_ptr, int *dst_len, int force_expand);
-var_rc_t  var_formatv   (var_t  *var, char **dst_ptr, int force_expand, const char *fmt, va_list ap);
-var_rc_t  var_format    (var_t  *var, char **dst_ptr, int force_expand, const char *fmt, ...);
-const char *var_strerror  (var_t  *var, var_rc_t rc);
+DLL_IMP_EXP var_rc_t  var_create    (var_t **var);
+DLL_IMP_EXP var_rc_t  var_destroy   (var_t  *var);
+DLL_IMP_EXP var_rc_t  var_config    (var_t  *var, var_config_t mode, ...);
+DLL_IMP_EXP var_rc_t  var_unescape  (var_t  *var, const char *src_ptr, int src_len, char  *dst_ptr, int dst_len, int all);
+DLL_IMP_EXP var_rc_t  var_expand    (var_t  *var, const char *src_ptr, int src_len, char **dst_ptr, int *dst_len, int force_expand);
+DLL_IMP_EXP var_rc_t  var_formatv   (var_t  *var, char **dst_ptr, int force_expand, const char *fmt, va_list ap);
+DLL_IMP_EXP var_rc_t  var_format    (var_t  *var, char **dst_ptr, int force_expand, const char *fmt, ...);
+DLL_IMP_EXP const char *var_strerror(var_t  *var, var_rc_t rc);
 
 #endif /* __VAR_H__ */
Index: src/findlib/find_one.c
===================================================================
--- src/findlib/find_one.c	(revision 8043)
+++ src/findlib/find_one.c	(working copy)
@@ -527,10 +527,10 @@
        */
       if (ff_pkt->ignoredir != NULL) {
          struct stat sb;
-         char fname[MAXPATHLEN];
+         char fname[256];
 
          if (strlen(ff_pkt->fname) + strlen("/") +
-            strlen(ff_pkt->ignoredir) + 1 > MAXPATHLEN)
+            strlen(ff_pkt->ignoredir) + 1 > 256)
             return 1;   /* Is this wisdom? */
 
          strcpy(fname, ff_pkt->fname);
Index: src/findlib/bfile.c
===================================================================
--- src/findlib/bfile.c	(revision 8043)
+++ src/findlib/bfile.c	(working copy)
@@ -41,11 +41,11 @@
 
 const int dbglvl = 200;
 
-int       (*plugin_bopen)(BFILE *bfd, const char *fname, int flags, mode_t mode) = NULL;
-int       (*plugin_bclose)(BFILE *bfd) = NULL;
-ssize_t   (*plugin_bread)(BFILE *bfd, void *buf, size_t count) = NULL;
-ssize_t   (*plugin_bwrite)(BFILE *bfd, void *buf, size_t count) = NULL;
-boffset_t (*plugin_blseek)(BFILE *bfd, boffset_t offset, int whence) = NULL;
+DLL_IMP_EXP int       (*plugin_bopen)(BFILE *bfd, const char *fname, int flags, mode_t mode) = NULL;
+DLL_IMP_EXP int       (*plugin_bclose)(BFILE *bfd) = NULL;
+DLL_IMP_EXP ssize_t   (*plugin_bread)(BFILE *bfd, void *buf, size_t count) = NULL;
+DLL_IMP_EXP ssize_t   (*plugin_bwrite)(BFILE *bfd, void *buf, size_t count) = NULL;
+DLL_IMP_EXP boffset_t (*plugin_blseek)(BFILE *bfd, boffset_t offset, int whence) = NULL;
 
 
 #ifdef HAVE_DARWIN_OS
Index: src/findlib/find.h
===================================================================
--- src/findlib/find.h	(revision 8043)
+++ src/findlib/find.h	(working copy)
@@ -68,7 +68,7 @@
 #endif
 
 #ifndef HAVE_READDIR_R
-int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
+DLL_IMP_EXP int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
 #endif
 
 /*  
Index: src/findlib/bfile.h
===================================================================
--- src/findlib/bfile.h	(revision 8043)
+++ src/findlib/bfile.h	(working copy)
@@ -92,7 +92,7 @@
    bool cmd_plugin;                   /* set if we have a command plugin */
 };
 
-HANDLE bget_handle(BFILE *bfd);
+DLL_IMP_EXP HANDLE bget_handle(BFILE *bfd);
 
 #else   /* Linux/Unix systems */
 
@@ -118,26 +118,26 @@
 
 #endif
 
-void    binit(BFILE *bfd);
-bool    is_bopen(BFILE *bfd);
-bool    set_win32_backup(BFILE *bfd);
-bool    set_portable_backup(BFILE *bfd);
-bool    set_cmd_plugin(BFILE *bfd, JCR *jcr);
-bool    have_win32_api();
-bool    is_portable_backup(BFILE *bfd);
-bool    is_restore_stream_supported(int stream);
-bool    is_win32_stream(int stream);
-char   *xberror(BFILE *bfd);          /* DO NOT USE  -- use berrno class */
-int     bopen(BFILE *bfd, const char *fname, int flags, mode_t mode);
+DLL_IMP_EXP void    binit(BFILE *bfd);
+DLL_IMP_EXP bool    is_bopen(BFILE *bfd);
+DLL_IMP_EXP bool    set_win32_backup(BFILE *bfd);
+DLL_IMP_EXP bool    set_portable_backup(BFILE *bfd);
+DLL_IMP_EXP bool    set_cmd_plugin(BFILE *bfd, JCR *jcr);
+DLL_IMP_EXP bool    have_win32_api();
+DLL_IMP_EXP bool    is_portable_backup(BFILE *bfd);
+DLL_IMP_EXP bool    is_restore_stream_supported(int stream);
+DLL_IMP_EXP bool    is_win32_stream(int stream);
+DLL_IMP_EXP char   *xberror(BFILE *bfd);          /* DO NOT USE  -- use berrno class */
+DLL_IMP_EXP int     bopen(BFILE *bfd, const char *fname, int flags, mode_t mode);
 #ifdef HAVE_DARWIN_OS
 int     bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode);
 #endif
-int     bclose(BFILE *bfd);
-ssize_t bread(BFILE *bfd, void *buf, size_t count);
-ssize_t bwrite(BFILE *bfd, void *buf, size_t count);
-boffset_t blseek(BFILE *bfd, boffset_t offset, int whence);
-const char   *stream_to_ascii(int stream);
+DLL_IMP_EXP int     bclose(BFILE *bfd);
+DLL_IMP_EXP ssize_t bread(BFILE *bfd, void *buf, size_t count);
+DLL_IMP_EXP ssize_t bwrite(BFILE *bfd, void *buf, size_t count);
+DLL_IMP_EXP boffset_t blseek(BFILE *bfd, boffset_t offset, int whence);
+DLL_IMP_EXP const char   *stream_to_ascii(int stream);
 
-bool processWin32BackupAPIBlock (BFILE *bfd, void *pBuffer, ssize_t dwSize);
+DLL_IMP_EXP bool processWin32BackupAPIBlock (BFILE *bfd, void *pBuffer, ssize_t dwSize);
 
 #endif /* __BFILE_H */
Index: src/findlib/protos.h
===================================================================
--- src/findlib/protos.h	(revision 8043)
+++ src/findlib/protos.h	(working copy)
@@ -32,57 +32,57 @@
  */
 
 /* from attribs.c */
-void    encode_stat       (char *buf, FF_PKT *ff_pkt, int data_stream);
-int     decode_stat       (char *buf, struct stat *statp, int32_t *LinkFI);
-int32_t decode_LinkFI     (char *buf, struct stat *statp);
-int     encode_attribsEx  (JCR *jcr, char *attribsEx, FF_PKT *ff_pkt);
-bool    set_attributes    (JCR *jcr, ATTR *attr, BFILE *ofd);
-int     select_data_stream(FF_PKT *ff_pkt);
+DLL_IMP_EXP void    encode_stat       (char *buf, FF_PKT *ff_pkt, int data_stream);
+DLL_IMP_EXP int     decode_stat       (char *buf, struct stat *statp, int32_t *LinkFI);
+DLL_IMP_EXP int32_t decode_LinkFI     (char *buf, struct stat *statp);
+DLL_IMP_EXP int     encode_attribsEx  (JCR *jcr, char *attribsEx, FF_PKT *ff_pkt);
+DLL_IMP_EXP bool    set_attributes    (JCR *jcr, ATTR *attr, BFILE *ofd);
+DLL_IMP_EXP int     select_data_stream(FF_PKT *ff_pkt);
 
 /* from create_file.c */
-int    create_file       (JCR *jcr, ATTR *attr, BFILE *ofd, int replace);
+DLL_IMP_EXP int    create_file       (JCR *jcr, ATTR *attr, BFILE *ofd, int replace);
 
 /* From find.c */
-FF_PKT *init_find_files();
-void  set_find_options(FF_PKT *ff, int incremental, time_t mtime);
-void set_find_changed_function(FF_PKT *ff, bool check_fct(JCR *jcr, FF_PKT *ff));
-int   find_files(JCR *jcr, FF_PKT *ff, int file_sub(JCR *, FF_PKT *ff_pkt, bool),
-                 int plugin_sub(JCR *, FF_PKT *ff_pkt, bool));
-int   match_files(JCR *jcr, FF_PKT *ff, int sub(JCR *, FF_PKT *ff_pkt, bool));
-int   term_find_files(FF_PKT *ff);
-int   get_win32_driveletters(FF_PKT *ff, char* szDrives);
-bool  is_in_fileset(FF_PKT *ff);
+DLL_IMP_EXP FF_PKT *init_find_files();
+DLL_IMP_EXP void  set_find_options(FF_PKT *ff, int incremental, time_t mtime);
+DLL_IMP_EXP void set_find_changed_function(FF_PKT *ff, bool check_fct(JCR *jcr, FF_PKT *ff));
+DLL_IMP_EXP int   find_files(JCR *jcr, FF_PKT *ff, int file_sub(JCR *, FF_PKT *ff_pkt, bool),
+			     int plugin_sub(JCR *, FF_PKT *ff_pkt, bool));
+DLL_IMP_EXP int   match_files(JCR *jcr, FF_PKT *ff, int sub(JCR *, FF_PKT *ff_pkt, bool));
+DLL_IMP_EXP int   term_find_files(FF_PKT *ff);
+DLL_IMP_EXP int   get_win32_driveletters(FF_PKT *ff, char* szDrives);
+DLL_IMP_EXP bool  is_in_fileset(FF_PKT *ff);
 
 /* From match.c */
-void  init_include_exclude_files(FF_PKT *ff);
-void  term_include_exclude_files(FF_PKT *ff);
-void  add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname);
-void  add_fname_to_exclude_list(FF_PKT *ff, const char *fname);
-int   file_is_excluded(FF_PKT *ff, const char *file);
-int   file_is_included(FF_PKT *ff, const char *file);
-struct s_included_file *get_next_included_file(FF_PKT *ff,
-                           struct s_included_file *inc);
+DLL_IMP_EXP void  init_include_exclude_files(FF_PKT *ff);
+DLL_IMP_EXP void  term_include_exclude_files(FF_PKT *ff);
+DLL_IMP_EXP void  add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname);
+DLL_IMP_EXP void  add_fname_to_exclude_list(FF_PKT *ff, const char *fname);
+DLL_IMP_EXP int   file_is_excluded(FF_PKT *ff, const char *file);
+DLL_IMP_EXP int   file_is_included(FF_PKT *ff, const char *file);
+DLL_IMP_EXP struct s_included_file *get_next_included_file(FF_PKT *ff,
+							   struct s_included_file *inc);
 
 /* From find_one.c */
-int   find_one_file(JCR *jcr, FF_PKT *ff, 
-               int handle_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level),
-               char *p, dev_t parent_device, bool top_level);
-int   term_find_one(FF_PKT *ff);
-bool  has_file_changed(JCR *jcr, FF_PKT *ff_pkt);
+DLL_IMP_EXP int   find_one_file(JCR *jcr, FF_PKT *ff,
+				int handle_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level),
+				char *p, dev_t parent_device, bool top_level);
+DLL_IMP_EXP int   term_find_one(FF_PKT *ff);
+DLL_IMP_EXP bool  has_file_changed(JCR *jcr, FF_PKT *ff_pkt);
 
 /* From get_priv.c */
-int enable_backup_privileges(JCR *jcr, int ignore_errors);
+DLL_IMP_EXP int enable_backup_privileges(JCR *jcr, int ignore_errors);
 
 
 /* from makepath.c */
-bool makepath(ATTR *attr, const char *path, mode_t mode,
-           mode_t parent_mode, uid_t owner, gid_t group,
-           int keep_dir_modes);
+DLL_IMP_EXP bool makepath(ATTR *attr, const char *path, mode_t mode,
+			  mode_t parent_mode, uid_t owner, gid_t group,
+			  int keep_dir_modes);
 
 /* from fstype.c */
-bool fstype(const char *fname, char *fs, int fslen);
+DLL_IMP_EXP bool fstype(const char *fname, char *fs, int fslen);
 
 /* from drivetype.c */
-bool drivetype(const char *fname, char *fs, int fslen);
+DLL_IMP_EXP bool drivetype(const char *fname, char *fs, int fslen);
 
 /* from bfile.c -- see bfile.h */
Index: src/bacula.h
===================================================================
--- src/bacula.h	(revision 8043)
+++ src/bacula.h	(working copy)
@@ -40,17 +40,28 @@
 #endif
 
 #if defined(HAVE_WIN32)
+
+#if defined(BUILDING_DLL)
+#define DLL_IMP_EXP   __declspec(dllexport)
+#elif defined(USING_DLL)
+#define DLL_IMP_EXP   __declspec(dllimport)
+#else
+#define DLL_IMP_EXP
+#endif
+
 #if defined(HAVE_MINGW)
 #include "mingwconfig.h"
 #else
 #include "winconfig.h"
 #endif
+
 #else
+#define DLL_IMP_EXP
+
 #include "config.h"
 #endif
 #define __CONFIG_H
 
-
 #define _REENTRANT    1
 #define _THREAD_SAFE  1
 #define _POSIX_PTHREAD_SEMANTICS 1
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilot Consulting.