mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user