Ok, I've tried being Mr. Nice Guy and people (you know who you are) still
authorJeremy Allison <jra@samba.org>
Tue, 10 Jun 2003 17:30:28 +0000 (17:30 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 10 Jun 2003 17:30:28 +0000 (17:30 +0000)
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)

source3/include/includes.h
source3/include/safe_string.h

index 7b4c8dbdff5fd6d985252387ac8078fb7e48aaf0..3dbe6d10934b58cb00a0ac07bd378c0cb20d5154 100644 (file)
@@ -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
index df3633d91d911aa848c22844d7d2f163c9d598c0..9f908bc145761404b478b04eae9adb7e144eb243 100644 (file)
 #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 */