Chris Browne cbbrowne at lists.slony.info
Tue Jan 8 12:42:43 PST 2008
Update of /home/cvsd/slony1/slony1-engine/src/slonik
In directory main.slony.info:/tmp/cvs-serv25562

Modified Files:
      Tag: REL_1_2_STABLE
	Makefile slonik.c 
Log Message:
Change slonik build to query Postgres for the share directory at runtime

Per Dave Page


Index: slonik.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.67.2.12
retrieving revision 1.67.2.13
diff -C2 -d -r1.67.2.12 -r1.67.2.13
*** slonik.c	20 Jul 2007 19:55:57 -0000	1.67.2.12
--- slonik.c	8 Jan 2008 20:42:41 -0000	1.67.2.13
***************
*** 43,49 ****
  int			current_try_level;
  
- #ifdef WIN32
  static char myfull_path[MAXPGPATH];
- #endif
  static char share_path[MAXPGPATH];
  
--- 43,47 ----
***************
*** 105,111 ****
  	if (parser_errors)
  		usage();
! #ifndef WIN32
!         strcpy(share_path, PGSHARE);
! #else
  	/*
  	 * We need to find a share directory like PostgreSQL. 
--- 103,107 ----
  	if (parser_errors)
  		usage();
! 
  	/*
  	 * We need to find a share directory like PostgreSQL. 
***************
*** 113,118 ****
  	if (find_my_exec(argv[0],myfull_path) < 0)
  	{
! 		printf("full path was unacquirable. '%s'\n", argv[0]);
! 		return -1;
  	}
  	else
--- 109,113 ----
  	if (find_my_exec(argv[0],myfull_path) < 0)
  	{
! 		strcpy(share_path, PGSHARE);
  	}
  	else
***************
*** 120,124 ****
  		get_share_path(myfull_path, share_path);
  	}
! #endif
  	if (optind < argc)
  	{
--- 115,119 ----
  		get_share_path(myfull_path, share_path);
  	}
! 
  	if (optind < argc)
  	{

Index: Makefile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/Makefile,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -C2 -d -r1.24 -r1.24.2.1
*** Makefile	2 Aug 2006 15:32:02 -0000	1.24
--- Makefile	8 Jan 2008 20:42:41 -0000	1.24.2.1
***************
*** 18,21 ****
--- 18,22 ----
  
  CFLAGS += -I$(slony_top_builddir) -DPGSHARE="\"$(pgsharedir)\"" 
+ LDFLAGS += -lpgport
  
  PROG		= slonik
***************
*** 23,32 ****
  ifeq ($(PORTNAME), win)
  PROG            = slonik.exe
- LDFLAG		= $(LDFLAG) -lpgport
  endif
  ifeq ($(PORTNAME), win32)
  PROG            = slonik.exe
- LDFLAG		= $(LDFLAG) -lpgport
  endif
  
  OBJS		= 			\
--- 24,32 ----
  ifeq ($(PORTNAME), win)
  PROG            = slonik.exe
  endif
  ifeq ($(PORTNAME), win32)
  PROG            = slonik.exe
  endif
+ LDFLAGS += $(filter -lcrypto -lz, $(LIBS))
  
  OBJS		= 			\



More information about the Slony1-commit mailing list