summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-06-10 17:30:28 +0000
committerJeremy Allison <jra@samba.org>2003-06-10 17:30:28 +0000
commit5cee22714c1fc418dc8a3e1770e9048071b892d9 (patch)
tree6542a22f74614b249a4bd3f9be6b9c03f762c4f6 /source3
parent09530bfa604ee60b62e10e638ab32e9c0059d65d (diff)
downloadsamba-5cee22714c1fc418dc8a3e1770e9048071b892d9.tar.gz
samba-5cee22714c1fc418dc8a3e1770e9048071b892d9.tar.bz2
samba-5cee22714c1fc418dc8a3e1770e9048071b892d9.zip
Ok, I've tried being Mr. Nice Guy and people (you know who you are) still
keep putting bzero BSD'ism's into our source code. Make this an error like bcopy and others to prevent it in future. Jeremy. (This used to be commit 80d043231626192db85f08ccea062b91fcf999cc)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/includes.h4
-rw-r--r--source3/include/safe_string.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 7b4c8dbdff..3dbe6d1093 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1035,10 +1035,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
int vasprintf(char **ptr, const char *format, va_list ap);
#endif
-#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET)
-#define bzero(a,b) memset((a),'\0',(b))
-#endif
-
#ifdef REPLACE_GETPASS
#define getpass(prompt) getsmbpass((prompt))
#endif
diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h
index df3633d91d..9f908bc145 100644
--- a/source3/include/safe_string.h
+++ b/source3/include/safe_string.h
@@ -32,6 +32,11 @@
#endif /* bcopy */
#define bcopy(src,dest,size) __ERROR__XX__NEVER_USE_BCOPY___;
+#ifdef bzero
+#undef bzero
+#endif /* bzero */
+#define bzero(dest,size) __ERROR__XX__NEVER_USE_BZERO_USE_MEMSET_INSTEAD___;
+
#ifdef strcpy
#undef strcpy
#endif /* strcpy */