* 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 $
*
*-------------------------------------------------------------------------
*/
/* 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);
/* 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);
#
# 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 $
#
#-------------------------------------------------------------------------
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) $< .
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