Commit 4dbd9e06 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Lots of portability fixes.

Fixed shutdown on HPUX.
Fixed bug in query cache.
parent fc3e066f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47795,6 +47795,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Fixed shutdown problem on HPUX.
@item
Added functions @code{des_encrypt()} and @code{des_decrypt()}.
@item
Added statement FLUSH DES_KEY_FILE.
+4 −4
Original line number Diff line number Diff line
@@ -819,8 +819,8 @@ case $SYSTEM_TYPE in
    ;;
  *hpux10.20*)
    echo "Enabling snprintf workaround for hpux 10.20"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX"
    if test "$with_named_thread" = "no"
    then 
      echo "Using --with-named-thread=-lpthread"
@@ -829,8 +829,8 @@ case $SYSTEM_TYPE in
    ;;
  *hpux11.*)
    echo "Enabling pread/pwrite workaround for hpux 11"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS"
    if test "$with_named_thread" = "no"
    then 
      echo "Using --with-named-thread=-lpthread"
+1 −1
Original line number Diff line number Diff line
@@ -131,11 +131,11 @@ extern void bzero(gptr dst,uint len);

#if !defined(bcmp) && !defined(HAVE_BCMP)
extern	int bcmp(const char *s1,const char *s2,uint len);
#endif
#ifdef HAVE_purify
extern	int my_bcmp(const char *s1,const char *s2,uint len);
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
#endif
#endif

#ifndef bmove512
extern	void bmove512(gptr dst,const gptr src,uint len);
+5 −0
Original line number Diff line number Diff line
@@ -446,6 +446,10 @@ struct hostent *my_gethostbyname_r(const char *name,

#endif /* defined(__WIN__) */

#if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
#endif

	/* safe_mutex adds checking to mutex for easier debugging */

typedef struct st_safe_mutex_t
@@ -476,6 +480,7 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
#undef pthread_mutex_t
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B))
#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
+1 −8
Original line number Diff line number Diff line
@@ -23,14 +23,7 @@
#define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */

extern const char *raid_type_string[];

#ifdef __cplusplus
extern "C" {
#endif
const char *my_raid_type(int raid_type);
#ifdef __cplusplus
}
#endif
#define my_raid_type(raid_type)  raid_type_string[(int)(raid_type)]

#if defined(USE_RAID) && !defined(DONT_USE_RAID)

Loading