*** Configure.orig	Wed Sep 14 20:26:40 2005
--- Configure	Fri Sep 23 13:01:14 2005
***************
*** 290,296 ****
  ==========================================================================
  I know of the following Operating Systems
  EOM
!   rep='os2 freebsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix';
    . ./display
    echo $n ..."Any of these apply ? $c"
    dflt=$osname; . ./myread
--- 290,296 ----
  ==========================================================================
  I know of the following Operating Systems
  EOM
!   rep='os2 freebsd netbsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix';
    . ./display
    echo $n ..."Any of these apply ? $c"
    dflt=$osname; . ./myread
***************
*** 326,332 ****
  #   Modifications for pretty name and asm file
  #
  case "$osname" in
!   nextstep|cygwin*|linux|freebsd|os2|gnu)
         pretty="$pretty running $osname";
          if test "$arch" = m68k; then asmarch=none; fi ;;
  esac
--- 326,332 ----
  #   Modifications for pretty name and asm file
  #
  case "$osname" in
!   nextstep|cygwin*|linux|freebsd|netbsd|os2|gnu)
         pretty="$pretty running $osname";
          if test "$arch" = m68k; then asmarch=none; fi ;;
  esac
***************
*** 398,404 ****
        fi
      fi;;
  esac
! readline_enabledp="nil"
  if test "$optimization" != profiling; then
  # First, construct the PATHs
   case "$osname" in
--- 398,406 ----
        fi
      fi;;
  esac
! #readline_enabledp="nil"
! readline_enabledp="t"
! readline=/usr/gnu/lib
  if test "$optimization" != profiling; then
  # First, construct the PATHs
   case "$osname" in
***************
*** 546,551 ****
--- 548,554 ----
         $cygtop/H-${arch}-cygwin32/${arch}-cygwin32/include\
       ";;
        *) incpth="\
+       /usr/gnu/include/readline\
        /usr/local/include/readline\
        /usr/include/readline\
        /opt/include/readline\
***************
*** 834,840 ****
  if test -n "$__gnuc__"; then
    __GNUC__="-D__GNUC__"
    warn="-Wall -Wno-implicit"
!   OPTFLAGS=-O3
    ASMINLINE=yes
    case "$asmarch" in
      alpha)
--- 837,844 ----
  if test -n "$__gnuc__"; then
    __GNUC__="-D__GNUC__"
    warn="-Wall -Wno-implicit"
! #  OPTFLAGS=-O3
!   OPTFLAGS=-m486 -O2
    ASMINLINE=yes
    case "$asmarch" in
      alpha)
***************
*** 870,876 ****
                    OPTFLAGS=-O; cflags=-Aa; DLCFLAGS=+z;;
      # best tuning option, even for PPC604:
      aix-*)        OPTFLAGS=-O2; cflags='-qlanglvl=ansi -qtune=601';;
!     cygwin*|linux-i?86|freebsd-i?86)
                    OPTFLAGS=-O2; cflags=-m486;;
      osf1-*)       OPTFLAGS='-O4 -migrate -ifo -Olimit 9999';;
      sunos-*)      OPTFLAGS=-fast; PRFFLAGS='-pg -Bstatic';;
--- 874,880 ----
                    OPTFLAGS=-O; cflags=-Aa; DLCFLAGS=+z;;
      # best tuning option, even for PPC604:
      aix-*)        OPTFLAGS=-O2; cflags='-qlanglvl=ansi -qtune=601';;
!     cygwin*|linux-i?86|freebsd-i?86|netbsd-i?86)
                    OPTFLAGS=-O2; cflags=-m486;;
      osf1-*)       OPTFLAGS='-O4 -migrate -ifo -Olimit 9999';;
      sunos-*)      OPTFLAGS=-fast; PRFFLAGS='-pg -Bstatic';;
***************
*** 942,948 ****
  #
  case "$osname" in
    nextstep) cppfl="-traditional-cpp" ;;
!   freebsd)
      if test $PORTOBJFORMAT = "elf"; then
        cppfl="-DUSE_ELF"    
        FREEBSD_ELF=1
--- 946,952 ----
  #
  case "$osname" in
    nextstep) cppfl="-traditional-cpp" ;;
!   freebsd|netbsd)
      if test $PORTOBJFORMAT = "elf"; then
        cppfl="-DUSE_ELF"    
        FREEBSD_ELF=1
***************
*** 1009,1015 ****
  #    aix-*)  DLSUFFIX=a  ;; dynamic linking does not work!
      sunos-*) sodest=$VersionMajor$VersionMinor.$patch
               soname=$sodest;;
!     gnu-*|*-alpha|solaris-*|linux-*|freebsd-*)
        case $libpari_base in
          pari) sodest=$version.$patch;; # released versions
          *) sodest=$patch.0.0;; # unstable versions
--- 1013,1019 ----
  #    aix-*)  DLSUFFIX=a  ;; dynamic linking does not work!
      sunos-*) sodest=$VersionMajor$VersionMinor.$patch
               soname=$sodest;;
!     gnu-*|*-alpha|solaris-*|linux-*|freebsd-*|netbsd-*)
        case $libpari_base in
          pari) sodest=$version.$patch;; # released versions
          *) sodest=$patch.0.0;; # unstable versions
***************
*** 1044,1050 ****
      case "$osname-$arch" in
        aix-*)      DLLDFLAGS="-r" ;;
        hpux-*)     DLLDFLAGS="-b -E" ;;
!       freebsd-*)  DLLDFLAGS="-Bshareable -x" ;;
        gnu-*|linux-*)    DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
        irix-*)     DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
        *-alpha)    DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
--- 1048,1054 ----
      case "$osname-$arch" in
        aix-*)      DLLDFLAGS="-r" ;;
        hpux-*)     DLLDFLAGS="-b -E" ;;
!       freebsd-*|netbsd-*)  DLLDFLAGS="-Bshareable -x" ;;
        gnu-*|linux-*)    DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
        irix-*)     DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
        *-alpha)    DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
***************
*** 1057,1063 ****
      esac
    fi
    case "$osname" in 
!     freebsd|linux|sunos|solaris) DLLDFLAGS="$DLLDFLAGS -lc -lm";;
    esac
  
    if test "$fastread" != yes; then
--- 1061,1067 ----
      esac
    fi
    case "$osname" in 
!     freebsd|netbsd|linux|sunos|solaris) DLLDFLAGS="$DLLDFLAGS -lc -lm";;
    esac
  
    if test "$fastread" != yes; then
*** config/arch-osname.orig	Fri Nov 26 00:58:25 2004
--- config/arch-osname	Fri Sep 23 13:06:11 2005
***************
*** 11,16 ****
--- 11,17 ----
    fx2800)   arch=fx2800; osname=concentrix;;
    hp*)      arch=hppa; osname=hpux;;
    freebsd|os2)  arch=ix86;;
+   netbsd)  arch=i386;;
    ultrix)   arch=mips;;
    nextstep) arch=`file /bin/sh | sed 's/.*(for architecture \(.*\))/\1/'`;;
    osf1)     case "$5" in alpha) arch=alpha;; esac;;
*** src/kernel/ix86/l0asm.c.orig	Sat Apr  6 21:14:02 2002
--- src/kernel/ix86/l0asm.c	Fri Sep 23 14:25:44 2005
***************
*** 36,50 ****
     global variable `hiremainder'. */
  
  /* This should ideally be determined at configure time. */
! #if defined(__EMX__) || defined(__DJGCC__) || defined(__GO32__) || (defined(linux) && !defined(__ELF__)) || defined(__386BSD__) || defined(__NetBSD__) || (defined(__FreeBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__CYGWIN32__) || defined(__MINGW32__)
  #  define ASM_UNDERSCORE
  #endif
  
  #include "l0asm.h"
  
  #if defined(__EMX__) && defined(__NO_AOUT) /* No underscores, rest as is */
  #   undef C
  #   define C(entrypoint) /**/entrypoint
  #endif
  
  
--- 36,54 ----
     global variable `hiremainder'. */
  
  /* This should ideally be determined at configure time. */
! #if defined(__EMX__) || defined(__DJGCC__) || defined(__GO32__) || (defined(linux) && !defined(__ELF__)) || defined(__386BSD__) || (defined(__NetBSD__) && !defined(__ELF__)) || (defined(__FreeBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__CYGWIN32__) || defined(__MINGW32__)
  #  define ASM_UNDERSCORE
  #endif
  
  #include "l0asm.h"
  
  #if defined(__EMX__) && defined(__NO_AOUT) /* No underscores, rest as is */
+ /* H.Nakao
  #   undef C
  #   define C(entrypoint) /**/entrypoint
+ */
+ extern char *filename_completion_function(const char *text,int state);
+ extern char *username_completion_function(const char *text,int state);
  #endif
  
  
*** src/gp/gp.c.orig	Sat Jan 18 23:09:10 2003
--- src/gp/gp.c	Fri Sep 23 14:19:35 2005
***************
*** 45,51 ****
--- 45,54 ----
  #   endif
  #  endif
    extern int isatty(int);
+ /* H.Nakao
    extern void add_history(char*);
+ */
+   extern int add_history(const char*);
  ENDEXTERN
  #endif
  
*** src/gp/gp_rl.c.orig	Mon Feb 21 02:03:27 2005
--- src/gp/gp_rl.c	Fri Sep 23 14:20:02 2005
***************
*** 43,50 ****
--- 43,54 ----
  extern int rl_begin_undo_group(), rl_end_undo_group();
  extern int rl_read_key();
  extern int rl_stuff_char();
+ /* H.Nakao
  extern char *filename_completion_function(char *text,int state);
  extern char *username_completion_function(char *text,int state);
+ */
+ extern char *filename_completion_function(const char *text,int state);
+ extern char *username_completion_function(const char *text,int state);
  #endif
  char **pari_completion(char *text, int start, int end);
  extern int rl_completion_query_items;
