pgcrypto update

From: Marko Kreen <marko(at)l-t(dot)ee>
To: pgsql-patches(at)postgresql(dot)org
Subject: pgcrypto update
Date: 2001-02-20 13:37:47
Message-ID: 20010220153747.A21741@l-t.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Changes:

* reverse the change #include <> -> "" in krb.c.
It _must not_ include files in "."
* Makefile update. Inconsistent var usage and SHLIB was
not set.

Now it should work with all external libs.

--
marko

Index: contrib/pgcrypto/Makefile
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/contrib/pgcrypto/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- contrib/pgcrypto/Makefile 2001/01/24 03:46:16 1.2
+++ contrib/pgcrypto/Makefile 2001/02/20 13:19:41
@@ -12,34 +12,37 @@
##########################

ifeq ($(cryptolib), builtin)
-SRCS= md5.c sha1.c internal.c
+CRYPTO_CFLAGS =
+CRYPTO_LDFLAGS =
+SRCS = md5.c sha1.c internal.c
endif

ifeq ($(cryptolib), openssl)
-cryptoinc := -I/usr/include/openssl
-cryptolib := -lcrypto
+CRYPTO_CFLAGS = -I/usr/include/openssl
+CRYPTO_LDFLAGS = -lcrypto
SRCS = openssl.c
endif

ifeq ($(cryptolib), mhash)
-cryptoinc=
-cryptolib=-lmhash
-SRCS=mhash.c
+CRYPTO_CFLAGS = -I/usr/local/include
+CRYPTO_LDFLAGS = -L/usr/local/lib -lmhash
+SRCS = mhash.c
endif

ifeq ($(cryptolib), krb5)
-cryptoinc=-I/usr/include
-cryptolib=-ldes
-SRCS=krb.c
+CRYPTO_CFLAGS = -I/usr/include
+CRYPTO_LDFLAGS = -ldes
+SRCS = krb.c
endif

NAME := pgcrypto
SRCS += pgcrypto.c encode.c
OBJS := $(SRCS:.c=.o)
+SHLIB_LINK := $(CRYPTO_LDFLAGS)
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 1

-override CPPFLAGS += -I$(srcdir) $(cryptoinc)
+override CPPFLAGS += $(CRYPTO_CFLAGS) -I$(srcdir)

all: all-lib $(NAME).sql

Index: contrib/pgcrypto/krb.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/contrib/pgcrypto/krb.c,v
retrieving revision 1.2
diff -u -r1.2 krb.c
--- contrib/pgcrypto/krb.c 2001/02/10 02:31:25 1.2
+++ contrib/pgcrypto/krb.c 2001/02/20 13:19:41
@@ -38,8 +38,8 @@

#include "pgcrypto.h"

-#include "md5.h"
-#include "sha.h"
+#include <md5.h>
+#include <sha.h>

#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-02-20 15:34:12 Re: pgcrypto update
Previous Message Tom Lane 2001-02-13 23:23:31 Planned patch for join scope rules (long)