Commit Graph

267 Commits

Author SHA1 Message Date
Neil Conway 0b112045b7 Fix vpath build break, induced by Bruce's recent commit. 2004-10-12 04:48:36 +00:00
Bruce Momjian 29e7dc420a Add some pg_config_path.h dependencies for places that include
pg_config_paths.h outside of /src/port.
2004-10-12 01:04:11 +00:00
Bruce Momjian 48018da7ce The Win32 (mingw) build of libpq seems to have lost it's SSL libs from
the link step resulting in a build failure. The attached patch fixes
that.

Dave Page
2004-10-06 16:42:01 +00:00
Bruce Momjian ee7de3d662 Make sure no libs use libpgport by removing it from the link line. 2004-10-04 20:36:12 +00:00
Bruce Momjian 786f3d147d Here is a patch that adds the version info from libpq.rc to the DLL
build in mingw. The MSVC build already did this, but it was not linked
into the mingw one.

This is not the same as the versioninfo patch that's in the queue.
Please apply this one before beta-3 if at all possible.

Magnus Hagander
2004-09-26 02:14:47 +00:00
Tom Lane 9df3086972 Cause libpq and ecpg libraries to be built as proper shared libraries
(.dylib format) on Mac OS X, while not messing up loadable modules for
the backend (which are the same kind of animal as a shared library on
every other platform, but not here).  Also get the naming convention
to match OS X practice, viz libFOO.version.so not libFOO.so.version.
In support of that last, refactor code in Makefile.shlib to make it
easier to have platform-specific shlib naming conventions.
This patch is loosely based on the Fink project's current postgresql.patch.
Tested by yours truly on OS X 10.3.4; does anyone have 10.2.* to check
it on?
2004-07-13 00:06:46 +00:00
Bruce Momjian 57d2665108 Fix Makefile syntax. Forgot to test this. 2004-06-19 15:14:17 +00:00
Bruce Momjian 3101181e9e Add changes to support threads on Win32 native port at some point in the future. 2004-06-19 04:43:18 +00:00
Bruce Momjian 82695df3b7 Remove a few $filter() calls that were not needed. 2004-05-24 01:01:38 +00:00
Tom Lane 13f96c4b6b Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it.  Also, do any adjustment
of installation paths during configure, rather than every time Makefile.global
is read.
2004-05-21 20:56:50 +00:00
Bruce Momjian f16874c23d Win32 can't have the same function coming from two library object files,
so we make is_absolute_path a macro so libpq doesn't use path.o.
2004-05-19 04:21:49 +00:00
Bruce Momjian 3febb477e6 Reorganize code to allow path-relative installs.
Create new get_* functions to access compiled-in paths and adjust if
relative installs are to be used.

Clean up substitute_libpath_macro() code.
2004-05-17 14:35:34 +00:00
Bruce Momjian 608b85a23c Clean up indenting of Makefile filenames. 2004-05-10 23:09:04 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian 45fbab2933 Make thread flags CFLAGS, not CPPFLAGS. 2004-04-25 20:57:32 +00:00
Bruce Momjian 7a66015e98 Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
2004-04-23 18:15:55 +00:00
Bruce Momjian 31338352bd * Most changes are to fix warnings issued when compiling win32
* removed a few redundant defines
* get_user_name safe under win32
* rationalized pipe read EOF for win32 (UPDATED PATCH USED)
* changed all backend instances of sleep() to pg_usleep

    - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a
32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is
acceptable, please replace with pg_usleep(2000000000L)]

I added a comment to that part of the code:

    /*
     *  It would be nice to use pg_usleep() here, but only does 2000 sec
     *  or 33 minutes, which seems too short.
     */
    sleep(1000000);

Claudio Natoli
2004-04-19 17:42:59 +00:00
Bruce Momjian b8fd6756e2 Allow unlink/rename of files open by another process on Win32, using a
special Win32 open flag FILE_SHARE_DELETE.

Claudio Natoli
2004-03-24 03:54:16 +00:00
Bruce Momjian 1c89c51b9e Rename incorrect references to nonblock.c to noblock.c. Claudio. 2004-03-12 04:33:41 +00:00
Bruce Momjian 60a068b389 Move non-blocking code into its own /port file, for code clarity. 2004-03-10 21:12:49 +00:00
Bruce Momjian e5e5a323ca Briefly,
* configure + Makefile changes
 * shared memory attaching in EXEC_BACKEND case (+ minor fix for apparent
cygwin bug under cygwin/EXEC_BACKEND case only)
 * PATH env var separator differences
 * missing win32 rand functions added
 * placeholder replacements for sync etc under port.h


To those who are really interested, and there are a few of you: the attached
patch + file will allow the source base to be compiled (and, for some
definition, "run") under MingW, with the following caveats (I wanted to
first properly fix all but the last of these, but y'all won't quit asking
for a patch :-):

        * child death: SIGCHLD not yet sent, so as a minimum, you'll need to
put in some sort of delay after StartupDatabase, and handle setting
StartupPID to 0 etc (ie. the stuff the reaper() signal function is supposed
to do)

        * dirmod.c: comment out the elog calls

        * dfmgr.c: some hackage required to substitute_libpath_macro

        * slru/xact.c: comment out the errno checking after the readdir
(fixed by next version of MingW)

Again, this is only if you *really* want to see postgres compile and start,
and is a nice leg-up for working on the other Win32 TODO list items. Just
don't expect too much else from it at this point...


Claudio Natoli
2004-02-02 00:11:31 +00:00
Bruce Momjian 32abf0e781 Bump all version numbers and version stamps mentioned in RELEASE_CHANGES. 2003-11-30 06:09:54 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Bruce Momjian 227dd9b427 Rename thread compile flag. Move thread test program to tools/thread,
and improve tests.
2003-09-27 15:32:48 +00:00
Bruce Momjian 4b407f6c3c Changes for MinGW/WIN32:
o allow configure to see include/port/win32 include files
        o add matching Win32 accept() prototype
        o allow pg_id to compile with native Win32 API
        o fix invalide mbvalidate() function calls (existing bug)
        o allow /scripts to compile with native Win32 API
        o add win32.c to Win32 compiles (already in *.mak files)
2003-09-07 03:43:57 +00:00
Peter Eisentraut 588970c399 Correct uninstall target. 2003-08-23 04:21:59 +00:00
Bruce Momjian 6a991845a3 sprompt not needed in libpq. 2003-08-08 16:32:45 +00:00
Bruce Momjian 63c4d156e0 Move simple_prompt()/sprompt.c into /port. 2003-08-08 04:52:22 +00:00
Bruce Momjian 522b4937b3 Makefile cleanup. 2003-08-08 03:22:24 +00:00
Bruce Momjian 48af71423d Cleanup. 2003-08-08 03:18:40 +00:00
Bruce Momjian 86b07104dd Makefile cleanup. 2003-08-08 03:03:54 +00:00
Bruce Momjian ba0d38fd89 More thread.c cleanup. 2003-08-08 03:00:31 +00:00
Bruce Momjian 30c63f460a More threading cleanups. 2003-08-08 02:55:08 +00:00
Bruce Momjian e4cbb982b0 threads.c -> thread.c, be consistent. 2003-08-08 02:46:40 +00:00
Peter Eisentraut 3d6fd2557c Add missing file to clean target. 2003-06-17 17:58:54 +00:00
Bruce Momjian 62b532b736 Add thread.c for libpq threading, and hook it into libpq/configure. 2003-06-14 14:35:42 +00:00
Bruce Momjian 41a10a13b1 Add thread-enable compile variables into libpq. 2003-06-12 17:31:50 +00:00
Tom Lane 6bdb7aa4db libpq can now talk to either 3.0 or 2.0 protocol servers. It first tries
protocol 3, then falls back to 2 if postmaster rejects the startup packet
with an old-format error message.  A side benefit of the rewrite is that
SSL-encrypted connections can now be made without blocking.  (I think,
anyway, but do not have a good way to test.)
2003-06-08 17:43:00 +00:00
Bruce Momjian cb8b1299a3 Add Makefile rules for new crypt/rint() /port functions. Add include
for rint prototype.
2003-05-10 02:05:50 +00:00
Bruce Momjian 66e0a8cb39 Add crypt() to /port for Win32. 2003-05-09 16:52:11 +00:00
Bruce Momjian 52e49e298f Remove Win32 special rename/unlink from libpq. 2003-04-22 19:42:27 +00:00
Bruce Momjian 7fc30094c7 Add dirmod to libpq Makefile. 2003-04-22 02:21:34 +00:00
Tom Lane 49c3cf5fd1 path.c needs to be included in libpq; per Joe Conway. 2003-04-14 21:15:13 +00:00
Peter Eisentraut 82a91eb54e Simplify the socket handling code by supplying a replacement getaddrinfo()
function if the OS doesn't provide one.
2003-03-29 11:31:52 +00:00
Bruce Momjian 0d3e36b668 Move pg_service.conf.sample to /interfaces/libpq. 2003-02-03 14:24:07 +00:00
Peter Eisentraut 611278cc0b Clean ip.c. 2003-01-10 10:59:08 +00:00
Bruce Momjian c3e9699f21 Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entries
if the OS supports it.  Code will still compile on non-IPv6-aware
machines (feature added by Bruce).

Nigel Kukard
2003-01-06 03:18:27 +00:00
Bruce Momjian 29cdab3d53 Increment libpq major number for 7.3.1 and minor for 7.4. 2002-12-13 22:17:57 +00:00
Bruce Momjian 6ca16d7b80 Bump version for 7.3 and 7.4. 2002-12-11 04:07:39 +00:00
Bruce Momjian 38ffbb95d5 Back out V6 code, caused postmaster startup failure. 2002-12-06 04:37:05 +00:00
Bruce Momjian 8fc86dd593 We have just finished porting the old KAME IPv6 patch over to
postgresql version 7.3, but yea... this patch adds full IPv6
support to postgres. I've tested it out on 7.2.3 and has
been running perfectly stable.

CREDITS:
 The KAME Project  (Initial patch)
 Nigel Kukard  <nkukard@lbsd.net>
 Johan Jordaan  <johanj@lando.co.za>
2002-12-06 03:46:37 +00:00
Bruce Momjian 5cdf45c6aa Stamp minor version numbers for 7.4 release. 2002-12-04 18:14:11 +00:00
Peter Eisentraut 77f7763b55 Remove all traces of multibyte and locale options. Clean up comments
referring to "multibyte" where it really means character encoding.
2002-09-03 21:45:44 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Bruce Momjian 7f43165dd2 Make src/backend/port/*.c file location dependent only on configure.in. 2002-07-18 03:59:49 +00:00
Bruce Momjian 19570420f5 UPDATED PATCH:
Attached are a revised set of SSL patches.  Many of these patches
are motivated by security concerns, it's not just bug fixes.  The key
differences (from stock 7.2.1) are:

*) almost all code that directly uses the OpenSSL library is in two
   new files,

     src/interfaces/libpq/fe-ssl.c
     src/backend/postmaster/be-ssl.c

   in the long run, it would be nice to merge these two files.

*) the legacy code to read and write network data have been
   encapsulated into read_SSL() and write_SSL().  These functions
   should probably be renamed - they handle both SSL and non-SSL
   cases.

   the remaining code should eliminate the problems identified
   earlier, albeit not very cleanly.

*) both front- and back-ends will send a SSL shutdown via the
   new close_SSL() function.  This is necessary for sessions to
   work properly.

   (Sessions are not yet fully supported, but by cleanly closing
   the SSL connection instead of just sending a TCP FIN packet
   other SSL tools will be much happier.)

*) The client certificate and key are now expected in a subdirectory
   of the user's home directory.  Specifically,

	- the directory .postgresql must be owned by the user, and
	  allow no access by 'group' or 'other.'

	- the file .postgresql/postgresql.crt must be a regular file
	  owned by the user.

	- the file .postgresql/postgresql.key must be a regular file
	  owned by the user, and allow no access by 'group' or 'other'.

   At the current time encrypted private keys are not supported.
   There should also be a way to support multiple client certs/keys.

*) the front-end performs minimal validation of the back-end cert.
   Self-signed certs are permitted, but the common name *must*
   match the hostname used by the front-end.  (The cert itself
   should always use a fully qualified domain name (FDQN) in its
   common name field.)

   This means that

	  psql -h eris db

   will fail, but

	  psql -h eris.example.com db

   will succeed.  At the current time this must be an exact match;
   future patches may support any FQDN that resolves to the address
   returned by getpeername(2).

   Another common "problem" is expiring certs.  For now, it may be
   a good idea to use a very-long-lived self-signed cert.

   As a compile-time option, the front-end can specify a file
   containing valid root certificates, but it is not yet required.

*) the back-end performs minimal validation of the client cert.
   It allows self-signed certs.  It checks for expiration.  It
   supports a compile-time option specifying a file containing
   valid root certificates.

*) both front- and back-ends default to TLSv1, not SSLv3/SSLv2.

*) both front- and back-ends support DSA keys.  DSA keys are
   moderately more expensive on startup, but many people consider
   them preferable than RSA keys.  (E.g., SSH2 prefers DSA keys.)

*) if /dev/urandom exists, both client and server will read 16k
   of randomization data from it.

*) the server can read empheral DH parameters from the files

     $DataDir/dh512.pem
     $DataDir/dh1024.pem
     $DataDir/dh2048.pem
     $DataDir/dh4096.pem

   if none are provided, the server will default to hardcoded
   parameter files provided by the OpenSSL project.

Remaining tasks:

*) the select() clauses need to be revisited - the SSL abstraction
   layer may need to absorb more of the current code to avoid rare
   deadlock conditions.  This also touches on a true solution to
   the pg_eof() problem.

*) the SIGPIPE signal handler may need to be revisited.

*) support encrypted private keys.

*) sessions are not yet fully supported.  (SSL sessions can span
   multiple "connections," and allow the client and server to avoid
   costly renegotiations.)

*) makecert - a script that creates back-end certs.

*) pgkeygen - a tool that creates front-end certs.

*) the whole protocol issue, SASL, etc.

 *) certs are fully validated - valid root certs must be available.
    This is a hassle, but it means that you *can* trust the identity
    of the server.

 *) the client library can handle hardcoded root certificates, to
    avoid the need to copy these files.

 *) host name of server cert must resolve to IP address, or be a
    recognized alias.  This is more liberal than the previous
    iteration.

 *) the number of bytes transferred is tracked, and the session
    key is periodically renegotiated.

 *) basic cert generation scripts (mkcert.sh, pgkeygen.sh).  The
    configuration files have reasonable defaults for each type
    of use.

Bear Giles
2002-06-14 04:23:17 +00:00
Bruce Momjian eb43af3210 Back out SSL changes. Newer patch available. 2002-06-14 04:09:37 +00:00
Bruce Momjian a9bd17616e Attached are a revised set of SSL patches. Many of these patches
are motivated by security concerns, it's not just bug fixes.  The key
differences (from stock 7.2.1) are:

*) almost all code that directly uses the OpenSSL library is in two
   new files,

     src/interfaces/libpq/fe-ssl.c
     src/backend/postmaster/be-ssl.c

   in the long run, it would be nice to merge these two files.

*) the legacy code to read and write network data have been
   encapsulated into read_SSL() and write_SSL().  These functions
   should probably be renamed - they handle both SSL and non-SSL
   cases.

   the remaining code should eliminate the problems identified
   earlier, albeit not very cleanly.

*) both front- and back-ends will send a SSL shutdown via the
   new close_SSL() function.  This is necessary for sessions to
   work properly.

   (Sessions are not yet fully supported, but by cleanly closing
   the SSL connection instead of just sending a TCP FIN packet
   other SSL tools will be much happier.)

*) The client certificate and key are now expected in a subdirectory
   of the user's home directory.  Specifically,

	- the directory .postgresql must be owned by the user, and
	  allow no access by 'group' or 'other.'

	- the file .postgresql/postgresql.crt must be a regular file
	  owned by the user.

	- the file .postgresql/postgresql.key must be a regular file
	  owned by the user, and allow no access by 'group' or 'other'.

   At the current time encrypted private keys are not supported.
   There should also be a way to support multiple client certs/keys.

*) the front-end performs minimal validation of the back-end cert.
   Self-signed certs are permitted, but the common name *must*
   match the hostname used by the front-end.  (The cert itself
   should always use a fully qualified domain name (FDQN) in its
   common name field.)

   This means that

	  psql -h eris db

   will fail, but

	  psql -h eris.example.com db

   will succeed.  At the current time this must be an exact match;
   future patches may support any FQDN that resolves to the address
   returned by getpeername(2).

   Another common "problem" is expiring certs.  For now, it may be
   a good idea to use a very-long-lived self-signed cert.

   As a compile-time option, the front-end can specify a file
   containing valid root certificates, but it is not yet required.

*) the back-end performs minimal validation of the client cert.
   It allows self-signed certs.  It checks for expiration.  It
   supports a compile-time option specifying a file containing
   valid root certificates.

*) both front- and back-ends default to TLSv1, not SSLv3/SSLv2.

*) both front- and back-ends support DSA keys.  DSA keys are
   moderately more expensive on startup, but many people consider
   them preferable than RSA keys.  (E.g., SSH2 prefers DSA keys.)

*) if /dev/urandom exists, both client and server will read 16k
   of randomization data from it.

*) the server can read empheral DH parameters from the files

     $DataDir/dh512.pem
     $DataDir/dh1024.pem
     $DataDir/dh2048.pem
     $DataDir/dh4096.pem

   if none are provided, the server will default to hardcoded
   parameter files provided by the OpenSSL project.

Remaining tasks:

*) the select() clauses need to be revisited - the SSL abstraction
   layer may need to absorb more of the current code to avoid rare
   deadlock conditions.  This also touches on a true solution to
   the pg_eof() problem.

*) the SIGPIPE signal handler may need to be revisited.

*) support encrypted private keys.

*) sessions are not yet fully supported.  (SSL sessions can span
   multiple "connections," and allow the client and server to avoid
   costly renegotiations.)

*) makecert - a script that creates back-end certs.

*) pgkeygen - a tool that creates front-end certs.

*) the whole protocol issue, SASL, etc.

 *) certs are fully validated - valid root certs must be available.
    This is a hassle, but it means that you *can* trust the identity
    of the server.

 *) the client library can handle hardcoded root certificates, to
    avoid the need to copy these files.

 *) host name of server cert must resolve to IP address, or be a
    recognized alias.  This is more liberal than the previous
    iteration.

 *) the number of bytes transferred is tracked, and the session
    key is periodically renegotiated.

 *) basic cert generation scripts (mkcert.sh, pgkeygen.sh).  The
    configuration files have reasonable defaults for each type
    of use.

Bear Giles
2002-06-14 03:56:47 +00:00
Peter Eisentraut 364a7ebe26 Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager.  In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.

Migrate portability sections common to several files into psqlodbc.h.
2001-09-22 22:54:33 +00:00
Tom Lane c1c888a9de Code review for MD5 authorization patch. Clean up some breakage
(salts were always zero!?), add much missing documentation.
2001-09-21 20:31:49 +00:00
Tatsuo Ishii 227767112c Commit Karel's patch.
-------------------------------------------------------------------
Subject: Re: [PATCHES] encoding names
From: Karel Zak <zakkr@zf.jcu.cz>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-patches <pgsql-patches@postgresql.org>
Date: Fri, 31 Aug 2001 17:24:38 +0200

On Thu, Aug 30, 2001 at 01:30:40AM +0200, Peter Eisentraut wrote:
> > 		- convert encoding 'name' to 'id'
>
> I thought we decided not to add functions returning "new" names until we
> know exactly what the new names should be, and pending schema

 Ok, the patch not to add functions.

> better
>
>     ...(): encoding name too long

 Fixed.

 I found new bug in command/variable.c in parse_client_encoding(), nobody
probably never see this error:

if (pg_set_client_encoding(encoding))
{
	elog(ERROR, "Conversion between %s and %s is not supported",
                     value, GetDatabaseEncodingName());
}

because pg_set_client_encoding() returns -1 for error and 0 as true.
It's fixed too.

 IMHO it can be apply.

		Karel
PS:

    * following files are renamed:

src/utils/mb/Unicode/KOI8_to_utf8.map  -->
        src/utils/mb/Unicode/koi8r_to_utf8.map

src/utils/mb/Unicode/WIN_to_utf8.map  -->
        src/utils/mb/Unicode/win1251_to_utf8.map

src/utils/mb/Unicode/utf8_to_KOI8.map -->
        src/utils/mb/Unicode/utf8_to_koi8r.map

src/utils/mb/Unicode/utf8_to_WIN.map -->
        src/utils/mb/Unicode/utf8_to_win1251.map

   * new file:

src/utils/mb/encname.c

   * removed file:

src/utils/mb/common.c

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
2001-09-06 04:57:30 +00:00
Peter Eisentraut f5944af8ba Include directory rearrangement
Client headers are no longer in a subdirectory, since they have been made
namespace-clean.

Internal libpq headers are in a private subdirectory.

Server headers are in a private subdirectory.  pg_config has a new option
to point there.
2001-08-28 14:20:28 +00:00
Bruce Momjian d4fb1b2388 Move md5.h contents to crypt.h. 2001-08-15 21:08:21 +00:00
Bruce Momjian 38bb1abcda Use MD5 for wire protocol encryption for >= 7.2 client/server.
Allow pg_shadow to be MD5 encrypted.
Add ENCRYPTED/UNENCRYPTED option to CREATE/ALTER user.
Add password_encryption postgresql.conf option.
Update wire protocol version to 2.1.
2001-08-15 18:42:16 +00:00
Peter Eisentraut 1a17447be1 NLS for libpq. Clean up the message formats and change the documentation
accordingly.
2001-07-15 13:45:04 +00:00
Bruce Momjian 54d9099596 Stamp CVS as 7.2. Update all interface version numbers. This is the
time to do it, not during beta because people are using this stuff in
production sometimes.
2001-05-11 01:46:33 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Tatsuo Ishii 91382c2882 Clean up mutibyte supoorting source files.
Now only wchar.c is shared by fronetnd/backend.
2001-02-11 01:52:11 +00:00
Peter Eisentraut b1f528f86c Check for -lresolv. 2001-02-04 14:09:33 +00:00
Tom Lane 37fd198456 Get rid of sunos4-only strerror() macro, and arrange to use the
implementation in backend/port/strerror.c if configure finds no strerror
in libc, same as we do for snprintf and inet_aton.
2001-01-20 23:07:27 +00:00
Tatsuo Ishii 0b10d35e2b Avoid dependency on backend's multibyte module as possible.
Now frontend/libpq has its own version of pg_encoding_to_char
and pg_char_to_encoding.
2000-10-30 10:31:46 +00:00
Peter Eisentraut 53f300d49e Rearrange handling of -L linker options so that they are always before all
the -l options.  (This was not the case when using the  OpenSSL or Kerberos
options.)  Also make sure that shared library links get to see all the -L
options.  Get Kerberos 5 support to compile on Redhat 7.0.  Add OpenSSL and
-lsocket (if used/found) to libpq link.
2000-10-25 16:13:52 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Tom Lane e18a862d46 Remove 'override' keyword, which breaks the build on HPUX, and probably
anywhere else that Makefile.shlib needs to modify CFLAGS to produce
valid code for a shared library.  I'm not real clear on *why* the use
of override causes make to ignore the later attempt to assign
CFLAGS		+=
but it indubitably does --- at least on gmake 3.79.1.  gmake bug?
2000-10-20 03:45:35 +00:00
Peter Eisentraut 179b8e5722 Locate the file pg_service.conf in the directory configured as --syconfdir
(i.e., /usr/local/pgsql/etc by default).
2000-10-17 17:43:13 +00:00
Tatsuo Ishii f20d2a87fb Add more files from backend 2000-10-12 07:38:13 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Marc G. Fournier 405ced26ba Various fixes resulting from removing the PORTNAME defines
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-01-13 04:18:22 +00:00
Marc G. Fournier 9093238c7e Fix up paths to $(SRCDIR) 1997-08-17 00:33:28 +00:00
Bruce Momjian 8d25436d70 mkLinux patches from Tatsuo Ishii. 1997-07-29 14:09:11 +00:00
Marc G. Fournier c7b40e6058 This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
1997-04-04 10:43:16 +00:00
Marc G. Fournier 82a27f230a Install os.h when we install the other headers...
Pointed out by: System Administrator <sysadmin@sba.miami.edu>
1997-04-04 02:53:14 +00:00
Marc G. Fournier c2e73db87a Various patches for shared libraries under i386-solaris by:
Christoph Kaesling <ck@dog.pfalz.sub.de>
1997-03-25 09:21:59 +00:00
Marc G. Fournier 6304e2c273 Here's two more diffs...
The first fixes a warning from gcc about the assignment within the condition.
The extra set of parens should not make a difference, but with -Werror, they
are necessary.

The second fixes an "ln -s" invocation that assumes the current directory is
implicitly the target if not specified.  Not true in all cases, and again, it
should not make a difference except to those implementation that it does.

From: "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>
1997-03-25 09:08:06 +00:00
Marc G. Fournier 7d02575ad1 Fixes for libpgtcl from Massimo 1997-03-17 22:05:08 +00:00
Marc G. Fournier ea58f28ee8 om: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch for io routines

  I am currently trying to improve on the front-backend communication
routines; and noticed that lots of code are duplicated for libpq and
the backend. This is a first patch that tries to share code between
the two, more to follow.

        mjl
1997-03-16 18:51:29 +00:00
Marc G. Fournier 3031ec7c72 NetBSD Shared Library Patch from Martin J. Laubach 1997-03-15 19:17:03 +00:00
Marc G. Fournier 791c075852 Date/Time updates from Thomas... 1997-03-14 23:34:16 +00:00
Bryan Henderson 52052f3a19 Use gcc to make Linux ELF shared library, instead of ld. 1997-01-20 00:51:38 +00:00
Bruce Momjian 63b22d8aa9 cleanup for LINUX_ELF 1997-01-10 18:55:24 +00:00
Vadim B. Mikheev 41857f3ca2 Additional fixes for shared library (BSD44_Derived port). 1997-01-10 04:01:09 +00:00
Marc G. Fournier 5b104c30e9 NeXT port specific changes by: Ovidiu Predescu <ovidiu@bx.logicnet.ro> 1997-01-06 00:24:24 +00:00
Marc G. Fournier 0865f587ea Shared library fixes for BSD44_Derived port
Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>

NOTE: The following patch I was uncertain of, but applied it...will end up
	testing the compile on my machine later tonight anyway, but if anyone
	knows why this *shouldn't* have been done, please change it. (CC -> LD)

***************
*** 61,68 ****
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! libpq.so.1: $(OBJS)
!       $(CC) $(LDFLAGS) -shared $(OBJS) -o libpq.so.1

  c.h: ../include/c.h
        rm -f c.h
--- 66,73 ----
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! $(shlib): $(OBJS)
!       $(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib)

  c.h: ../include/c.h
        rm -f c.h
1997-01-05 23:52:21 +00:00
Bryan Henderson 7f36a2a718 Fix bug: libpq clients (which include libpq-fe.h) won't compile. 1996-12-10 07:05:12 +00:00
Bryan Henderson 93f722536f Whoops, redo Ultrix patch so the other ports still compile. 1996-11-26 07:39:11 +00:00
Bryan Henderson c118543186 Fix double-colon syntax error on fe-lobj.o. 1996-11-26 06:33:18 +00:00
Bryan Henderson 46d58fba33 Make it compile on Ultrix. Thanks Erik Bertelson. 1996-11-26 03:20:35 +00:00
Bruce Momjian 99a4dc0598 Copy needed include files into standard directory. 1996-11-17 19:27:38 +00:00
Bryan Henderson f64b840387 Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR.  Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.
1996-11-14 10:25:54 +00:00
Bryan Henderson d7dd9295b7 End of the make file simplifications. 1996-11-12 11:43:32 +00:00
Bruce Momjian a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian 78078236ea Fix typo in file name found during install. 1996-11-08 21:40:11 +00:00
Bruce Momjian 4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Bryan Henderson 089dfb61f0 Add ability to deal with the fmgr.h dependency. 1996-11-04 06:32:59 +00:00
Bruce Momjian 7e42f4814d Removed PORTNAME_. Use OS version only. 1996-11-04 04:00:56 +00:00
Marc G. Fournier 4bdf308bdf shared build fails, but the rest compiles...formatting error in the
cc -shared, I believe...
1996-11-03 07:14:32 +00:00
Bryan Henderson b216c1eac6 Continuation of make file simplification; deal with header file shuffle. 1996-11-02 09:54:44 +00:00
Bryan Henderson e18d49d82a Add CFLAGS+=-DPOSTPORT=... so we can take it out of the global CFLAGS. 1996-10-25 09:22:30 +00:00
Bruce Momjian fd067981be Fix location of include files to match postgres.h includes. 1996-09-25 19:37:31 +00:00
Marc G. Fournier afcbce5c22 CFLAGS +- -I... got messed by one of Bryan's patches
Fix Submitted by: Bryan himself :)
1996-09-23 18:14:08 +00:00
Marc G. Fournier ff4d0d435e Here's a patch that I discussed recently on pg95-dev that changes the
way one creates a database system.  Parts that were in "make install"
are not either in "make all" or initdb.  Nothing goes in the PGDATA
directory besides user data.  Creating multiple database systems is
easier.

In addition to applying the patch, it is necessary to move the file
libpq/pg_hba to backend/libpq/pg_hba.sample.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-09-23 08:24:13 +00:00
Marc G. Fournier 28fad34c7b modifications required to reflect centralized include files 1996-08-28 23:02:43 +00:00
Marc G. Fournier 4d837e370c Change the TEMPDIR to be obj instead of /tmp
Suggested by: Michael Babcock <michael@kanji.com>
1996-08-01 05:04:29 +00:00
Marc G. Fournier c4ea55d2c9 clean up /tmp behind itself
submitted by: bruce
1996-07-29 20:52:24 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00