summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
committerJeremy Allison <jra@samba.org>2007-12-10 11:30:37 -0800
commit7faee02d0d351c5c039e8f1be7e82ce3a93cbe96 (patch)
treef79fc09f414f9873d9a985e380b6384c24d00315 /source3/include
parent0c0054fe1615a504d103da94149d1c1729abb8e2 (diff)
downloadsamba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.tar.gz
samba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.tar.bz2
samba-7faee02d0d351c5c039e8f1be7e82ce3a93cbe96.zip
Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/dynconfig.h51
1 files changed, 46 insertions, 5 deletions
diff --git a/source3/include/dynconfig.h b/source3/include/dynconfig.h
index a26f840f66..bb7e2c20f4 100644
--- a/source3/include/dynconfig.h
+++ b/source3/include/dynconfig.h
@@ -23,9 +23,10 @@
* @brief Exported global configurations.
**/
-extern char const *dyn_SBINDIR,
- *dyn_BINDIR,
- *dyn_SWATDIR;
+#if 0
+const char *get_dyn_SBINDIR(void);
+const char *get_dyn_BINDIR(void);
+const char *get_dyn_SWATDIR(void);
extern char dyn_CONFIGFILE[1024];
extern char dyn_LOGFILEBASE[1024], dyn_LMHOSTSFILE[1024];
@@ -36,6 +37,46 @@ extern char dyn_LOCKDIR[1024];
extern char dyn_PIDDIR[1024];
extern char dyn_SMB_PASSWD_FILE[1024];
extern char dyn_PRIVATE_DIR[1024];
+#endif
-char *dyn_STATEDIR(void);
-char *dyn_CACHEDIR(void);
+const char *get_dyn_SBINDIR(void);
+const char *set_dyn_SBINDIR(const char *newpath);
+
+const char *get_dyn_BINDIR(void);
+const char *set_dyn_BINDIR(const char *newpath);
+
+const char *get_dyn_SWATDIR(void);
+const char *set_dyn_SWATDIR(const char *newpath);
+
+const char *get_dyn_CONFIGFILE(void);
+const char *set_dyn_CONFIGFILE(const char *newpath);
+
+const char *get_dyn_dyn_LOGFILEBASE(void);
+const char *set_dyn_dyn_LOGFILEBASE(const char *newpath);
+
+const char *get_dyn_LMHOSTSFILE(void);
+const char *set_dyn_LMHOSTSFILE(const char *newpath);
+
+const char *get_dyn_CODEPAGEDIR(void);
+const char *set_dyn_CODEPAGEDIR(const char *newpath);
+
+const char *get_dyn_LIBDIR(void);
+const char *set_dyn_LIBDIR(const char *newpath);
+
+const char *get_dyn_SHLIBEXT(void);
+const char *set_dyn_SHLIBEXT(const char *newpath);
+
+const char *get_dyn_LOCKDIR(void);
+const char *set_dyn_LOCKDIR(const char *newpath);
+
+const char *get_dyn_PIDDIR(void);
+const char *set_dyn_PIDDIR(const char *newpath);
+
+const char *get_dyn_SMB_PASSWD_FILE(void);
+const char *set_dyn_SMB_PASSWD_FILE(const char *newpath);
+
+const char *get_dyn_PRIVATE_DIR(void);
+const char *set_dyn_PRIVATE_DIR(const char *newpath);
+
+const char *get_dyn_STATEDIR(void);
+const char *get_dyn_CACHEDIR(void);