Skip site navigation (1) Skip section navigation (2)

ecpg patches

From: Michael Meskes <meskes(at)online-club(dot)de>
To: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: ecpg patches
Date: 1998-08-28 13:40:16
Message-ID: 19980828154016.A6472@online-club.de (view raw or flat)
Thread:
Lists: pgsql-hackers
This one is against the current archive (so it contains the one I send the
other day). It should fix the AIX problems. Andreas, could you please try
it? Thanks.

Michael

diff -rcN ecpg/ChangeLog ecpg.mm/ChangeLog
*** ecpg/ChangeLog	Tue Aug 25 19:11:36 1998
--- ecpg.mm/ChangeLog	Fri Aug 28 15:37:46 1998
***************
*** 297,299 ****
--- 297,313 ----
  	- Cleaned up memory allocation in ecpglib.c
  	- Set library version to 2.6
  
+ Wed Aug 26 16:17:39 CEST 1998
+ 
+ 	- Sync preproc.y with gram.y
+ 
+ Thu Aug 27 15:32:23 CEST 1998
+ 
+ 	- Fix some minor glitches that the AIX compiler complains about
+ 	- Added patchlevel to library
+ 
+ Fri Aug 28 15:36:58 CEST 1998
+ 
+ 	- Removed one line of code that AIX complains about since it was not
+ 	  needed anyway
+ 	- Set library version to 2.6.1
diff -rcN ecpg/lib/Makefile.in ecpg.mm/lib/Makefile.in
*** ecpg/lib/Makefile.in	Tue Aug 25 19:11:37 1998
--- ecpg.mm/lib/Makefile.in	Thu Aug 27 15:34:39 1998
***************
*** 5,10 ****
--- 5,11 ----
  
  SO_MAJOR_VERSION=2
  SO_MINOR_VERSION=6
+ SO_PATCHLEVEL=1
  
  PORTNAME=(at)PORTNAME@
  
***************
*** 19,39 ****
    LINUX_ELF=(at)LINUX_ELF@
    ifdef LINUX_ELF
      install-shlib-dep := install-shlib
!     shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
      LDFLAGS_SL = -shared -soname libecpg.so.$(SO_MAJOR_VERSION)
    endif
  endif
  ifeq ($(PORTNAME), bsd)
    ifdef BSD_SHLIB
      install-shlib-dep := install-shlib
!     shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
      LDFLAGS_SL = -x -Bshareable -Bforcearchive
      CFLAGS += $(CFLAGS_SL)
    endif
  endif
  #ifeq ($(PORTNAME), solaris)
  #  install-shlib-dep := install-shlib
! #  shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
  #  LDFLAGS_SL = -G -z text
  #  CFLAGS += $(CFLAGS_SL)
  #endif
--- 20,40 ----
    LINUX_ELF=(at)LINUX_ELF@
    ifdef LINUX_ELF
      install-shlib-dep := install-shlib
!     shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
      LDFLAGS_SL = -shared -soname libecpg.so.$(SO_MAJOR_VERSION)
    endif
  endif
  ifeq ($(PORTNAME), bsd)
    ifdef BSD_SHLIB
      install-shlib-dep := install-shlib
!     shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
      LDFLAGS_SL = -x -Bshareable -Bforcearchive
      CFLAGS += $(CFLAGS_SL)
    endif
  endif
  #ifeq ($(PORTNAME), solaris)
  #  install-shlib-dep := install-shlib
! #  shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
  #  LDFLAGS_SL = -G -z text
  #  CFLAGS += $(CFLAGS_SL)
  #endif
diff -rcN ecpg/lib/ecpglib.c ecpg.mm/lib/ecpglib.c
*** ecpg/lib/ecpglib.c	Tue Aug 25 19:11:38 1998
--- ecpg.mm/lib/ecpglib.c	Fri Aug 28 14:45:59 1998
***************
*** 701,707 ****
                                                                   }
                                                                   else
                                                                   {
!                                                                          strncpy((char *) (var->value + var->offset * act_tuple), pval, var->varcharsize);
                                                                           if (var->varcharsize < strlen(pval))
                                                                           {
                                                                                   /* truncation */
--- 701,707 ----
                                                                   }
                                                                   else
                                                                   {
!                                                                          strncpy((char *) ((long)var->value + var->offset * act_tuple), pval, var->varcharsize);
                                                                           if (var->varcharsize < strlen(pval))
                                                                           {
                                                                                   /* truncation */
***************
*** 731,737 ****
                                                   case ECPGt_varchar:
                                                           {
                                                                   struct ECPGgeneric_varchar *variable =
! 								 (struct ECPGgeneric_varchar *) (var->value + var->offset * act_tuple);
      
  								 if (var->varcharsize == 0)
  								   strncpy(variable->arr, pval, strlen(pval));
--- 731,737 ----
                                                   case ECPGt_varchar:
                                                           {
                                                                   struct ECPGgeneric_varchar *variable =
! 								 (struct ECPGgeneric_varchar *) ((long)var->value + var->offset * act_tuple);
      
  								 if (var->varcharsize == 0)
  								   strncpy(variable->arr, pval, strlen(pval));
***************
*** 828,834 ****
  		free(notify);
  	}
  
- 	va_end(ap);
  	return status;
  }
  
--- 828,833 ----
diff -rcN ecpg/preproc/preproc.y ecpg.mm/preproc/preproc.y
*** ecpg/preproc/preproc.y	Wed Aug 26 20:19:42 1998
--- ecpg.mm/preproc/preproc.y	Wed Aug 26 16:17:29 1998
***************
*** 566,572 ****
                  LANCOMPILER, LISTEN, UNLISTEN, LOAD, LOCK_P, LOCATION, MAXVALUE, MINVALUE, MOVE,
                  NEW, NONE, NOTHING, NOTNULL, OIDS, OPERATOR, PROCEDURAL,
                  RECIPE, RENAME, RESET, RETURNS, ROW, RULE,
!                 SEQUENCE, SETOF, SHOW, START, STATEMENT, STDIN, STDOUT, TRUSTED,
                  VACUUM, VERBOSE, VERSION, ENCODING
  
  /* Keywords (obsolete; retain through next version for parser - thomas 1997-12-0 4) */
--- 566,572 ----
                  LANCOMPILER, LISTEN, UNLISTEN, LOAD, LOCK_P, LOCATION, MAXVALUE, MINVALUE, MOVE,
                  NEW, NONE, NOTHING, NOTNULL, OIDS, OPERATOR, PROCEDURAL,
                  RECIPE, RENAME, RESET, RETURNS, ROW, RULE,
!                 SERIAL, SEQUENCE, SETOF, SHOW, START, STATEMENT, STDIN, STDOUT, TRUSTED,
                  VACUUM, VERBOSE, VERSION, ENCODING
  
  /* Keywords (obsolete; retain through next version for parser - thomas 1997-12-0 4) */
***************
*** 1083,1088 ****
--- 1083,1092 ----
  				{
  					$$ = cat3_str($1, $2, $3);
  				}
+ 	| ColId SERIAL
+ 		{
+ 			$$ = make2_str($1, make1_str(" serial"));
+ 		}
  		;
  
  ColQualifier:  ColQualList	{ $$ = $1; }
***************
*** 3795,3800 ****
--- 3799,3805 ----
  		| PRIVILEGES					{ $$ = make1_str("privileges"); }
  		| RECIPE						{ $$ = make1_str("recipe"); }
  		| ROW							{ $$ = make1_str("row"); }
+ 		| SERIAL						{ $$ = make1_str("serial"); }
  		| START							{ $$ = make1_str("start"); }
  		| STATEMENT						{ $$ = make1_str("statement"); }
  		| TIME							{ $$ = make1_str("time"); }

-- 
Michael Meskes			meskes(at)online-club(dot)de, meskes(at)debian(dot)org
Go SF49ers! Go Rhein Fire!	Use Debian GNU/Linux! 

Responses

pgsql-hackers by date

Next:From: Michael MeskesDate: 1998-08-28 13:41:32
Subject: Re: [HACKERS] Still getting ERROR: fmgr_info: function 28261: cache lookup faile
Previous:From: Massimo Dal ZottoDate: 1998-08-28 11:13:39
Subject: minor patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group