Commit 8dd4751b authored by tnurnberg@sin.intern.azundris.com's avatar tnurnberg@sin.intern.azundris.com
Browse files

Bug #10776: Failure to compile ndb ReadNodesConf.cpp on AIX 5.2

mysqld hasn't been built on AIX with ndb-everything in quite a while.
this allowed a variety of changes to be added that broke the AIX build
for both the GNU and IBM compilers (but the IBM suite in particular).
Changeset lets build to complete on AIX 5.2 for users of the GNU and
the IBM suite both. Tudo bem?
parent 4a52b5c8
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -127,14 +127,9 @@ AC_DEFUN([MYSQL_SYS_LARGEFILE],
	hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
	  ac_cv_sys_largefile_source=1 ;;
	esac])
     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
       ac_cv_sys_large_files,
       [Large files support on AIX-style hosts.],
       [case "$host_os" in
	# AIX 4.2 and later
	aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
	  ac_cv_sys_large_files=1 ;;
	esac])

     # AIX 4.2 and later -- do nothing, include standards.h instead.
     # this goes for both GNU and IBM C and C++ compilers.
   fi
  ])
+6 −0
Original line number Diff line number Diff line
@@ -2890,6 +2890,12 @@ then
  ndb_opt_subdirs="$ndb_opt_subdirs docs"
  ndb_bin_am_ldflags=""
fi
# building dynamic breaks on AIX. (If you want to try it and get unresolved
# __vec__delete2 and some such, try linking against libhC.)
case "$host_os" in
  aix3.* | aix4.0.* | aix4.1.*) ;;
  *) ndb_bin_am_ldflags="-static";;
esac
AC_SUBST([ndb_bin_am_ldflags])
AC_SUBST([ndb_opt_subdirs])

+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@
#ifndef _mysql_h
#define _mysql_h

#ifdef _AIX           /* large-file support will break without this */
#include <standards.h>
#endif

#ifdef __CYGWIN__     /* CYGWIN implements a UNIX API */
#undef WIN
#undef _WIN
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ File_class::size(FILE* f)
  MY_STAT s;

  // Note that my_fstat behaves *differently* than my_stat. ARGGGHH!
  if(my_fstat(::fileno(f), &s, MYF(0)))
  if(my_fstat(fileno(f), &s, MYF(0)))
    return 0;

  return s.st_size;
@@ -196,7 +196,7 @@ File_class::flush() const
{
#if defined NDB_OSE || defined NDB_SOFTOSE
  ::fflush(m_file);
  return ::fsync(::fileno(m_file));
  return ::fsync(fileno(m_file));
#else
  return ::fflush(m_file);;
#endif
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi \
LDADD_LOC = $(noinst_LTLIBRARIES) \
	    ../common/portlib/libportlib.la \
            @readline_link@ \
            $(top_builddir)/ndb/src/libndbclient.la \
            $(top_builddir)/dbug/libdbug.a \
            $(top_builddir)/mysys/libmysys.a \
            $(top_builddir)/strings/libmystrings.a \
Loading