]> granicus.if.org Git - postgresql/commitdiff
> src/backend/commands/user.c file has some parse error at repalloc(),
authorBruce Momjian <bruce@momjian.us>
Mon, 2 Feb 2004 17:21:08 +0000 (17:21 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 2 Feb 2004 17:21:08 +0000 (17:21 +0000)
palloc()$

Fixed.  Thanks.

> src/backend/postmaster/pgstat.c miss
> #include "tcop/tcopprot.h" line.

Fixed.

> src/utils/dllinit.c wrong include header line at MinGW.
> #include <cygwin/version.h> must be not included

Fixed.

> by the way,
> I can't compile eccp because I used lower version bison.

> and bin/pg_resetxlog too. in this case I can't find what's wrong.

Fixed.

src/backend/commands/user.c
src/bin/pg_resetxlog/Makefile
src/utils/dllinit.c

index d0e39af9c1a7211cb4869b8deae5ca21d4b3f5d4..d2d1a3c7a950a59ac5616ab744b79dca786573ee 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.135 2004/02/02 16:37:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.136 2004/02/02 17:21:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -470,7 +470,7 @@ AtEOXact_UpdatePasswordFile(bool isCommit)
                        /* Rename active file while not holding an exclusive lock */
                        char *filename = user_getfilename(), *filename_new;
 
-                       filename_new = palloc(strlen(filename) + 1 + strlen(".new")));
+                       filename_new = palloc(strlen(filename) + 1 + strlen(".new"));
                        sprintf(filename_new, "%s.new", filename);
                        rename(filename_new, filename);
                        pfree(filename);
@@ -489,7 +489,7 @@ AtEOXact_UpdatePasswordFile(bool isCommit)
                        /* Rename active file while not holding an exclusive lock */
                        char *filename = group_getfilename(), *filename_new;
 
-                       filename_new = palloc(strlen(filename) + 1 + strlen(".new")));
+                       filename_new = palloc(strlen(filename) + 1 + strlen(".new"));
                        sprintf(filename_new, "%s.new", filename);
                        rename(filename_new, filename);
                        pfree(filename);
index d0e51c32c8dfcb74298be29ca5403af74b417d2e..3a38db7a622995731b0f3d10435af25a386e1d68 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1998-2002, PostgreSQL Global Development Group
 #
-# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.3 2003/11/29 19:52:06 pgsql Exp $
+# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.4 2004/02/02 17:21:08 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -12,13 +12,19 @@ subdir = src/bin/pg_resetxlog
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-OBJS= pg_resetxlog.o pg_crc.o
+override CPPFLAGS := $(CPPFLAGS) -DFRONTEND
+
+OBJS= pg_resetxlog.o pg_crc.o \
+      $(filter dirmod.o, $(LIBOBJS))
 
 all: submake-libpgport pg_resetxlog
 
 pg_resetxlog: $(OBJS)
        $(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@
 
+dirmod.c: % : $(top_srcdir)/src/port/%
+       rm -f $@ && $(LN_S) $< .
+
 pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
        rm -f $@ && $(LN_S) $< .
 
@@ -32,4 +38,4 @@ uninstall:
        rm -f $(DESTDIR)$(bindir)/pg_resetxlog$(X)
 
 clean distclean maintainer-clean:
-       rm -f pg_resetxlog$(X) pg_resetxlog.o pg_crc.o pg_crc.c
+       rm -f pg_resetxlog$(X) pg_resetxlog.o pg_crc.o pg_crc.c dirmod.c
index e30a76a5f25841fe52359b990b1a583b48dd1727..264806e4abbd15aaa3a981db32571d49468df629 100644 (file)
@@ -1,4 +1,6 @@
+#ifdef CYGWIN
 #include <cygwin/version.h>
+#endif
 #if CYGWIN_VERSION_DLL_MAJOR < 1001
 
 /* dllinit.c -- Portable DLL initialization.