Skip to content

Commit bd2a807

Browse files
committed
> src/backend/commands/user.c file has some parse error at repalloc(),
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.
1 parent 9e218af commit bd2a807

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/backend/commands/user.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.135 2004/02/02 16:37:46 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.136 2004/02/02 17:21:07 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -470,7 +470,7 @@ AtEOXact_UpdatePasswordFile(bool isCommit)
470470
/* Rename active file while not holding an exclusive lock */
471471
char *filename = user_getfilename(), *filename_new;
472472

473-
filename_new = palloc(strlen(filename) + 1 + strlen(".new")));
473+
filename_new = palloc(strlen(filename) + 1 + strlen(".new"));
474474
sprintf(filename_new, "%s.new", filename);
475475
rename(filename_new, filename);
476476
pfree(filename);
@@ -489,7 +489,7 @@ AtEOXact_UpdatePasswordFile(bool isCommit)
489489
/* Rename active file while not holding an exclusive lock */
490490
char *filename = group_getfilename(), *filename_new;
491491

492-
filename_new = palloc(strlen(filename) + 1 + strlen(".new")));
492+
filename_new = palloc(strlen(filename) + 1 + strlen(".new"));
493493
sprintf(filename_new, "%s.new", filename);
494494
rename(filename_new, filename);
495495
pfree(filename);

src/bin/pg_resetxlog/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@
44
#
55
# Copyright (c) 1998-2002, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.3 2003/11/29 19:52:06 pgsql Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.4 2004/02/02 17:21:08 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/bin/pg_resetxlog
1212
top_builddir = ../../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
OBJS= pg_resetxlog.o pg_crc.o
15+
override CPPFLAGS := $(CPPFLAGS) -DFRONTEND
16+
17+
OBJS= pg_resetxlog.o pg_crc.o \
18+
$(filter dirmod.o, $(LIBOBJS))
1619

1720
all: submake-libpgport pg_resetxlog
1821

1922
pg_resetxlog: $(OBJS)
2023
$(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@
2124

25+
dirmod.c: % : $(top_srcdir)/src/port/%
26+
rm -f $@ && $(LN_S) $< .
27+
2228
pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
2329
rm -f $@ && $(LN_S) $< .
2430

@@ -32,4 +38,4 @@ uninstall:
3238
rm -f $(DESTDIR)$(bindir)/pg_resetxlog$(X)
3339

3440
clean distclean maintainer-clean:
35-
rm -f pg_resetxlog$(X) pg_resetxlog.o pg_crc.o pg_crc.c
41+
rm -f pg_resetxlog$(X) pg_resetxlog.o pg_crc.o pg_crc.c dirmod.c

src/utils/dllinit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#ifdef CYGWIN
12
#include <cygwin/version.h>
3+
#endif
24
#if CYGWIN_VERSION_DLL_MAJOR < 1001
35

46
/* dllinit.c -- Portable DLL initialization.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy