Re: Patches to fix compilations on NetBSD

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Johnny C(dot) Lam" <lamj(at)stat(dot)cmu(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Patches to fix compilations on NetBSD
Date: 2000-05-11 04:26:25
Message-ID: 200005110426.AAA15344@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Can someone comment on this patch? It appears it should be applied.

> As postgresql 7.0 grew more imminent, I decided to try compiling the
> latest release candidate 7.0RC4. The following diff against the 7.0RC4
> tree accomplishes the following things:
>
> 1) pl/tcl no longer builds correctly since it doesn't use the
> Tcl header directory passed in via --with-includes="tcldir".
> The configure script saves this directory in "CPPFLAGS", so
> I patched Makefile.global.in to substitute for CPPFLAGS, and
> pl/tcl/Makefile to include CPPFLAGS in its header search path.
>
> 2) bin/pgtclsh and pl/tcl use pgsql headers but don't properly
> use -I$(LIBPQDIR) to include the correct header directory.
> This has been fixed.
>
> 3) I couldn't find anything in the tree which still needs
> ncurses/curses. I removed the check for those libraries from
> configure.in. If I'm wrong please let me know.
>
> 4) Properly build the shared object in the odbc directory on
> NetBSD. Well, at least it works on NetBSD/ELF.
>
> I hope all of this makes it into 7.0.
>
> Thanks!
>
> -- Johnny C. Lam <lamj(at)stat(dot)cmu(dot)edu>
> Department of Statistics, Carnegie Mellon University
> http://www.stat.cmu.edu/~lamj/
>
> --- Makefile.global.in.orig Sun Apr 16 23:44:56 2000
> +++ Makefile.global.in Thu May 4 19:31:24 2000
> @@ -208,8 +208,9 @@
> YACC= @YACC@
> LEX= @LEX@
> AROPT= @AROPT@
> -CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@
> +CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend $(CPPFLAGS) @CFLAGS@
> CFLAGS_SL= @SHARED_LIB@
> +CPPFLAGS= @CPPFLAGS@
> LIBS= @LIBS@
> LDFLAGS= @LDFLAGS@ $(LIBS)
> LDREL= -r
> --- bin/pgtclsh/Makefile.orig Tue Mar 7 20:58:21 2000
> +++ bin/pgtclsh/Makefile Thu May 4 19:31:24 2000
> @@ -22,7 +22,7 @@
> include Makefile.tkdefs
> endif
>
> -CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR)
> +CFLAGS+= $(X_CFLAGS) -I$(LIBPQDIR) -I$(LIBPGTCLDIR)
>
> ifdef KRBVERS
> LDFLAGS+= $(KRBLIBS)
> --- configure.in.orig Wed May 3 15:10:55 2000
> +++ configure.in Thu May 4 19:31:24 2000
> @@ -655,10 +655,6 @@
> AC_SUBST(YFLAGS)
>
> AC_CHECK_LIB(sfio, main)
> -for curses in ncurses curses ; do
> - AC_CHECK_LIB(${curses}, main,
> - [LIBS="-l${curses} $LIBS"; break])
> -done
> AC_CHECK_LIB(termcap, main)
> AC_CHECK_LIB(readline, main)
> AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
> --- interfaces/odbc/psqlodbc.c.orig Mon Dec 28 20:49:57 1998
> +++ interfaces/odbc/psqlodbc.c Thu May 4 19:31:24 2000
> @@ -33,8 +33,14 @@
>
> GLOBAL_VALUES globals;
>
> -BOOL _init(void);
> -BOOL _fini(void);
> +#ifdef linux
> +# define STATIC
> +#else
> +# define STATIC static
> +#endif
> +
> +STATIC BOOL _init(void);
> +STATIC BOOL _fini(void);
> RETCODE SQL_API SQLDummyOrdinal(void);
>
> #ifdef WIN32
> @@ -98,7 +104,7 @@
> #endif
>
> /* These two functions do shared library initialziation on UNIX, well at least
> - * on Linux. I don't know about other systems.
> + * on Linux and some of the BSDs. I don't know about other systems.
> */
> BOOL
> _init(void)
> --- pl/tcl/Makefile.orig Sat Apr 29 13:45:42 2000
> +++ pl/tcl/Makefile Thu May 4 19:31:24 2000
> @@ -70,7 +70,7 @@
>
> CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
>
> -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
> +CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend -I$(LIBPQDIR) $(CPPFLAGS)
>
> #
> # Uncomment the following to enable the unknown command lookup
> --- pl/tcl/Makefile.orig Sat Apr 29 13:45:42 2000
> +++ pl/tcl/Makefile Thu May 4 19:21:57 2000
> @@ -70,7 +70,7 @@
>
> CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
>
> -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
> +CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend -I$(LIBPQDIR) $(CPPFLAGS)
>
> #
> # Uncomment the following to enable the unknown command lookup
>

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-05-11 04:27:40 Re: kerberos 5 patch against 7.0RC5
Previous Message Bruce Momjian 2000-05-11 04:06:58 Fix for plpgsql and timestamp/interval