diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-17 15:00:14 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-17 15:00:14 +0200 |
commit | 1af1c70d711d1934dad41cec1d5dc55c4fdb4d71 (patch) | |
tree | 7f95675b3decc36faca63e90ee99ac223133c290 /strings/bcmp.c | |
parent | 640bd5699ca01d1ab7408759f413d95085b204ae (diff) | |
download | mariadb-git-1af1c70d711d1934dad41cec1d5dc55c4fdb4d71.tar.gz |
Portability fixes
include/my_pthread.h:
Fix for HPUX
mysql-test/mysql-test-run.sh:
Wait for socket instead of pid file
mysys/my_static.c:
Portability fix (for OSF1)
mysys/raid.cc:
Portability fix (for OSF1)
sql/mysqld.cc:
Fixed typo for FreeBSD.
strings/bcmp.c:
Fix for purify
Diffstat (limited to 'strings/bcmp.c')
-rw-r--r-- | strings/bcmp.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/strings/bcmp.c b/strings/bcmp.c index 52f545e7b42..7b510258fef 100644 --- a/strings/bcmp.c +++ b/strings/bcmp.c @@ -18,12 +18,18 @@ bcmp(s1, s2, len) returns 0 if the "len" bytes starting at "s1" are identical to the "len" bytes starting at "s2", non-zero if they are different. - Now only used with purify. + Now only used with purify because purify gives wrong warnings when + comparing a shorter string with bcmp. */ #include <my_global.h> #include "m_string.h" +#ifdef HAVE_purify +#undef bcmp +#undef HAVE_BCMP +#endif + #if !defined(bcmp) && !defined(HAVE_BCMP) #if defined(MC68000) && defined(DS90) @@ -45,14 +51,7 @@ uint len; /* 0 <= len <= 65535 */ #else -#ifdef HAVE_purify -int my_bcmp(s1, s2, len) -#else -int bcmp(s1, s2, len) -#endif - register const char *s1; - register const char *s2; - register uint len; +int bcmp(register const char *s1,register const char *s2, register uint len) { while (len-- != 0 && *s1++ == *s2++) ; return len+1; |