summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-07 12:02:44 -0800
committerJeremy Allison <jra@samba.org>2007-12-07 12:02:44 -0800
commit9e8180b9835fc100c25ef230747f7b44ef03d685 (patch)
treecf5d36ea4d4d94f4ca841ef2905ffd7c53b60038 /source3/include
parent67344a467f77513c31fc8c941a22701ce26eea83 (diff)
downloadsamba-9e8180b9835fc100c25ef230747f7b44ef03d685.tar.gz
samba-9e8180b9835fc100c25ef230747f7b44ef03d685.tar.bz2
samba-9e8180b9835fc100c25ef230747f7b44ef03d685.zip
Remove pstrings completely except for smbctool (what does this do ?).
Don't build this for now. Jeremy. (This used to be commit 46b67fd82c795d1a34a1efca9e409c0f3fa4f3a2)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/dynconfig.h16
-rw-r--r--source3/include/includes.h7
-rw-r--r--source3/include/msdfs.h2
-rw-r--r--source3/include/pstring.h35
-rw-r--r--source3/include/safe_string.h10
5 files changed, 12 insertions, 58 deletions
diff --git a/source3/include/dynconfig.h b/source3/include/dynconfig.h
index 996cf61492..a26f840f66 100644
--- a/source3/include/dynconfig.h
+++ b/source3/include/dynconfig.h
@@ -27,15 +27,15 @@ extern char const *dyn_SBINDIR,
*dyn_BINDIR,
*dyn_SWATDIR;
-extern pstring dyn_CONFIGFILE;
-extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE;
-extern pstring dyn_LIBDIR;
-extern pstring dyn_CODEPAGEDIR;
+extern char dyn_CONFIGFILE[1024];
+extern char dyn_LOGFILEBASE[1024], dyn_LMHOSTSFILE[1024];
+extern char dyn_LIBDIR[1024];
+extern char dyn_CODEPAGEDIR[1024];
extern fstring dyn_SHLIBEXT;
-extern pstring dyn_LOCKDIR;
-extern pstring dyn_PIDDIR;
-extern pstring dyn_SMB_PASSWD_FILE;
-extern pstring dyn_PRIVATE_DIR;
+extern char dyn_LOCKDIR[1024];
+extern char dyn_PIDDIR[1024];
+extern char dyn_SMB_PASSWD_FILE[1024];
+extern char dyn_PRIVATE_DIR[1024];
char *dyn_STATEDIR(void);
char *dyn_CACHEDIR(void);
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 22530f76af..67995fa499 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -617,8 +617,9 @@ struct timespec {
#define NGROUPS_MAX 32 /* Guess... */
#endif
-/* Our own pstrings and fstrings */
-#include "pstring.h"
+/* Our own fstrings */
+#define FSTRING_LEN 256
+typedef char fstring[FSTRING_LEN];
/* Lists, trees, caching, database... */
#include "xfile.h"
@@ -1034,8 +1035,6 @@ int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3);
void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3);
/* PRINTFLIKE2 */
-int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-/* PRINTFLIKE2 */
int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h
index c5bfac68d1..49b3ad4949 100644
--- a/source3/include/msdfs.h
+++ b/source3/include/msdfs.h
@@ -40,7 +40,7 @@
typedef struct _client_referral {
uint32 proximity;
uint32 ttl;
- pstring dfspath;
+ char *dfspath;
} CLIENT_DFS_REFERRAL;
struct referral {
diff --git a/source3/include/pstring.h b/source3/include/pstring.h
deleted file mode 100644
index cf06ad8471..0000000000
--- a/source3/include/pstring.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- samba -- Unix SMB/CIFS implementation.
- Safe standardized string types
-
- Copyright (C) Andrew Tridgell 1992-2000
- Copyright (C) John H Terpstra 1996-2000
- Copyright (C) Luke Kenneth Casson Leighton 1996-2000
- Copyright (C) Paul Ashton 1998-2000
- Copyright (C) Martin Pool 2002
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _PSTRING
-
-#define PSTRING_LEN 1024
-#define FSTRING_LEN 256
-
-typedef char pstring[PSTRING_LEN];
-typedef char fstring[FSTRING_LEN];
-
-#define _PSTRING
-
-#endif /* ndef _PSTRING */
diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h
index 439a0cf760..c030acf8fd 100644
--- a/source3/include/safe_string.h
+++ b/source3/include/safe_string.h
@@ -86,16 +86,8 @@ size_t __unsafe_string_function_usage_here_char__(void);
#define CHECK_STRING_SIZE(d, len) (sizeof(d) != (len) && sizeof(d) != sizeof(char *))
-#define push_pstring_base(dest, src, pstring_base) \
- (CHECK_STRING_SIZE(pstring_base, sizeof(pstring)) \
- ? __unsafe_string_function_usage_here_size_t__() \
- : push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE))
-
#else /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
-#define push_pstring_base(dest, src, pstring_base) \
- push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE)
-
#endif /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
#define safe_strcpy_base(dest, src, base, size) \
@@ -105,8 +97,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
but the best we can do in C) and may tag with function name/number to
record the last 'clobber region' on that string */
-#define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1)
-#define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1)
#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
#define nstrcpy(d,s) safe_strcpy((d), (s),sizeof(nstring)-1)