*** ./src/tailor.h.ORIG	Mon Jun 13 22:07:50 2011
--- ./src/tailor.h	Mon Jun 13 22:08:05 2011
***************
*** 69,77 ****
--- 69,79 ----
  #  define MODERN
  #endif
  
+ #ifndef _AIX51
  #ifdef __IBMC__
  #  define S_IFMT 0xF000
  #endif /* __IBMC__ */
+ #endif
  
  #if defined(__EMX__) || defined(__WATCOMC__) || defined(__BORLANDC__)
  #  if (defined(OS2) && !defined(__32BIT__))
*** ./src/wcd.c.ORIG	Tue Oct  8 11:12:17 2013
--- ./src/wcd.c	Tue Oct  8 11:12:39 2013
***************
*** 37,42 ****
--- 37,43 ----
  
  #include <stdio.h>
  #include <stdlib.h>
+ #include <stdarg.h>
  #include <errno.h>
  #include <string.h>
  #include <ctype.h>
*** ./src/Makefile.ORIG	Mon Jul 28 13:33:11 2014
--- ./src/Makefile	Mon Jul 28 13:37:04 2014
***************
*** 44,50 ****
  
  .PRECIOUS: %.1 %.pod
  
! CC		?= gcc
  STATIC		=
  STRIP		= strip
  
--- 44,50 ----
  
  .PRECIOUS: %.1 %.pod
  
! CC		= cc -qcpluscmt
  STATIC		=
  STRIP		= strip
  
***************
*** 51,61 ****
  ENABLE_NLS = 1
  
  PACKAGE		= wcd
! EXT		= .exe
  PROGRAM         = $(PACKAGE)$(EXT)
  BIN		= $(PROGRAM)
  
! PREFIX		= /usr
  prefix		= $(PREFIX)
  exec_prefix	= $(prefix)
  bindir		= $(exec_prefix)/bin
--- 51,61 ----
  ENABLE_NLS = 1
  
  PACKAGE		= wcd
! EXT		=
  PROGRAM         = $(PACKAGE)$(EXT)
  BIN		= $(PROGRAM)
  
! PREFIX		= /opt/freeware
  prefix		= $(PREFIX)
  exec_prefix	= $(prefix)
  bindir		= $(exec_prefix)/bin
***************
*** 68,74 ****
  sysconfdir      = /etc
  
  # 1 = regular, 5 = conf, 6 = games, 8 = daemons
! mandir		= $(datarootdir)/man
  man1dir		= $(mandir)/man1
  
  
--- 68,74 ----
  sysconfdir      = /etc
  
  # 1 = regular, 5 = conf, 6 = games, 8 = daemons
! mandir		= $(prefix)/man
  man1dir		= $(mandir)/man1
  
  
***************
*** 190,196 ****
  ifdef UCS
  	CURSES = ncursesw
  else
! 	CURSES = ncurses
  endif
  
  ifdef CURSES
--- 190,196 ----
  ifdef UCS
  	CURSES = ncursesw
  else
! 	CURSES = curses
  endif
  
  ifdef CURSES
***************
*** 250,256 ****
  
  # ......................................................... OS flags ...
  
! OS =
  
  ifndef OS
  ifeq (Linux, $(shell uname -s))
--- 250,256 ----
  
  # ......................................................... OS flags ...
  
! OS = aix
  
  ifndef OS
  ifeq (Linux, $(shell uname -s))
***************
*** 264,269 ****
--- 264,273 ----
  endif
  endif
  
+ ifeq (aix,$(OS))
+ 	LDFLAGS_EXTRA = -L/opt/freeware/lib -lintl
+ endif
+ 
  ifeq (cygwin,$(OS))
  ifdef ENABLE_NLS
  	LIBS_EXTRA    = -lintl -liconv -lmpr
***************
*** 375,382 ****
  # (often found as /usr/lib/libncurses.a) to the OBJS1 list.
  
  CFLAGS_USER	=
! CFLAGS	?= -O2
! CFLAGS  += -Wall -Wextra -Wno-unused-parameter -Wconversion $(RPM_OPT_FLAGS) $(CPPFLAGS) $(CFLAGS_USER)
  
  EXTRA_CFLAGS	= -Ic3po \
  		  $(CFLAGS_VERSION) \
--- 379,385 ----
  # (often found as /usr/lib/libncurses.a) to the OBJS1 list.
  
  CFLAGS_USER	=
! CFLAGS	= -O $(CPPFLAGS) $(CFLAGS_USER)
  
  EXTRA_CFLAGS	= -Ic3po \
  		  $(CFLAGS_VERSION) \
***************
*** 406,413 ****
  endif
  
  LDFLAGS_USER   =
! LDFLAGS		= $(RPM_OPT_FLAGS) \
! 	          $(LDFLAGS_EXTRA) \
  		  $(NLFLAG) \
  		  $(LDFLAG_STATIC) \
  		  $(LDFLAGS_USER)
--- 409,415 ----
  endif
  
  LDFLAGS_USER   =
! LDFLAGS		= $(LDFLAGS_EXTRA) \
  		  $(NLFLAG) \
  		  $(LDFLAG_STATIC) \
  		  $(LDFLAGS_USER)
***************
*** 513,519 ****
  	pod2text $< > $@
  
  %.ps : %.1
! 	groff -man $< -T ps > $@
  
  %.$(HTMLEXT) : %.pod
  	pod2html --title="$(PACKAGE) $(VERSION) - Wherever Change Directory" $< > $@
--- 515,521 ----
  	pod2text $< > $@
  
  %.ps : %.1
! 	groff -mandoc $< -T ps > $@
  
  %.$(HTMLEXT) : %.pod
  	pod2html --title="$(PACKAGE) $(VERSION) - Wherever Change Directory" $< > $@
