Commit e05df20d authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

Fixed gethostname_r tests to be more portable

parent 336019a5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ fi

$make $AM_MAKEFLAGS
if [ "x$strip" = "xyes" ]; then
  nm --numeric-sort sql/mysqld  > mysqld.sym
  objdump -d sql/mysqld > mysqld.S 
  mkdir -p tmp
  nm --numeric-sort sql/mysqld  > tmp/mysqld.sym
  objdump -d sql/mysqld > tmp/mysqld.S
  strip sql/mysqld
fi  
+8 −0
Original line number Diff line number Diff line
@@ -18274,6 +18274,9 @@ exist.
@code{RESTRICT} and @code{CASCADE} are allowed to make porting easier.
For the moment they don't do anything.
@strong{NOTE}: @code{DROP TABLE} is not transaction safe and will
automaticly commit any active transactions.
@cindex tables, defragment
@cindex tables, fragmentation
@findex OPTIMIZE TABLE
@@ -21276,6 +21279,9 @@ You can also lock all tables in all databases with read locks with the
convinient way to get backups if you have a file system, like Veritas,
that can take snapshots in time.
@strong{NOTE}: @code{LOCK TABLES} is not transaction safe and will
automaticly commit any active transactions before attempting to lock the
tables.
@findex SET OPTION
@node SET OPTION, GRANT, LOCK TABLES, Reference
@@ -40018,6 +40024,8 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.30
@itemize @bullet
@item
@code{LOCK TABLES} will now automaticly start a new transaction.
@item
Changed BDB tables to not use internal subtransactions and reuse open files to
get more speed.
@item
+4 −4
Original line number Diff line number Diff line
@@ -68,12 +68,12 @@
/* READLINE: */
#undef HAVE_GETPW_DECLS

/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
#undef HAVE_GETHOSTBYNAME_R_WITH_HOSTENT_DATA

/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
   this with 6 arguments */
#undef HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE

/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
#undef HAVE_GETHOSTBYNAME_R_RETURN_INT

/* Define if int8, int16 and int32 types exist */
#undef HAVE_INT_8_16_32
+2 −7
Original line number Diff line number Diff line
@@ -728,11 +728,6 @@ case $SYSTEM_TYPE in
    fi
    CXXFLAGS="-D_BOOL"
    ;;
    *dec-osf4*)
      echo "Adding fix to not use gethostbyname_r"
      CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
      CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
    ;;
    *aix4.3*)
      echo "Adding defines for AIX"
      CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
@@ -1341,7 +1336,7 @@ AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_style" = "glibc2"
then
  AC_DEFINE(HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R)
  AC_DEFINE(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
fi

# Check 3rd argument of getthostbyname_r
@@ -1371,7 +1366,7 @@ AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_arg" = "hostent_data"
then
  AC_DEFINE(HAVE_GETHOSTBYNAME_R_WITH_HOSTENT_DATA)
  AC_DEFINE(HAVE_GETHOSTBYNAME_R_RETURN_INT)
fi


+10 −8
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ extern int my_pthread_create_detached;
#define HAVE_LOCALTIME_R
#undef	HAVE_PTHREAD_ATTR_SETSCOPE
#define HAVE_PTHREAD_ATTR_SETSCOPE
#undef HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R	/* If we are running linux */
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE	/* If we are running linux */
#undef HAVE_RWLOCK_T
#undef HAVE_RWLOCK_INIT
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
@@ -378,28 +378,30 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
#define HAVE_PTHREAD_KILL
#endif

#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R)
#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
#if !defined(HPUX)
struct hostent;
#endif /* HPUX */
struct hostent *my_gethostbyname_r(const char *name,
				   struct hostent *result, char *buffer,
				   int buflen, int *h_errnop);
#if defined(HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R)
#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
#define GETHOSTBYNAME_BUFF_SIZE 2048
#else
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#endif /* defined(HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R) */
#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */

#else
#ifdef HAVE_GETHOSTBYNAME_R_WITH_HOSTENT_DATA
#ifdef HAVE_GETHOSTBYNAME_R_RETURN_INT
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(struct hostent_data*) (C))
struct hostent *my_gethostbyname_r(const char *name,
				   struct hostent *result, char *buffer,
				   int buflen, int *h_errnop);
#else
#define GETHOSTBYNAME_BUFF_SIZE 2048
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
#endif /* HAVE_GETHOSTBYNAME_R_WITH_HOSTENT_DATA */
#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R) */
#endif /* HAVE_GETHOSTBYNAME_R_RETURN_INT */
#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */

#endif /* defined(__WIN__) */

Loading