*** ./include/share/alloc.h.ORIG	Fri Mar 28 00:26:58 2014
--- ./include/share/alloc.h	Fri Mar 28 00:21:48 2014
***************
*** 46,51 ****
--- 46,60 ----
  #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
  #endif
  #include <stdlib.h> /* for size_t, malloc(), etc */
+ 
+ #if !defined(SIZE_MAX) && defined(_AIX)
+ # if (__64BIT__)
+ #  define SIZE_MAX        UINT64_MAX
+ # else
+ #  define SIZE_MAX        UINT32_MAX
+ # endif
+ #endif
+ 
  #include "share/compat.h"
  
  #ifndef SIZE_MAX
*** ./include/FLAC/ordinals.h.ORIG	Fri Mar 28 00:22:21 2014
--- ./include/FLAC/ordinals.h	Fri Mar 28 00:23:02 2014
***************
*** 53,59 ****
--- 53,63 ----
  
  /* For MSVC 2010 and everything else which provides <stdint.h>. */
  
+ #if defined(_AIX) && !defined(_AIX52)
+ #include <inttypes.h>
+ #else
  #include <stdint.h>
+ #endif
  
  typedef int8_t FLAC__int8;
  typedef uint8_t FLAC__uint8;
*** ./src/test_streams/main.c.ORIG	Fri Mar 28 00:38:25 2014
--- ./src/test_streams/main.c	Fri Mar 28 00:39:27 2014
***************
*** 905,911 ****
  
  		sample += sin (2.0 * k * M_PI * 1.0 / 32.0);
  		sample *= 0.4;
! #if !defined _MSC_VER
  		write_little_endian_int16(f, lrintf(sample * 32700.0));
  #else
  		write_little_endian_int16(f, (FLAC__int16)(sample * 32700.0));
--- 905,911 ----
  
  		sample += sin (2.0 * k * M_PI * 1.0 / 32.0);
  		sample *= 0.4;
! #if !defined _MSC_VER && defined(_AIX52)
  		write_little_endian_int16(f, lrintf(sample * 32700.0));
  #else
  		write_little_endian_int16(f, (FLAC__int16)(sample * 32700.0));
*** ./configure.ORIG	Thu Apr  2 23:32:10 2015
--- ./configure	Thu Apr  2 23:32:28 2015
***************
*** 19875,19881 ****
  else
  	CPPFLAGS="-DNDEBUG $CPPFLAGS"
  	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
! 	CFLAGS="-O3 -funroll-loops $CFLAGS"
  fi
  
  
--- 19875,19881 ----
  else
  	CPPFLAGS="-DNDEBUG $CPPFLAGS"
  	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
! 	CFLAGS="-O2 $CFLAGS"
  fi
  
  
