Re: Contrib modules on Win32

"Laurent Ballester" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <007401c495ca$d5446be0$9c697852@fleche>
Hello,

I am fixed the dbase contrib module. Unfortunately without any .dbf files, I
don't know how to test it!


Attached, two diff files with my modifications.



Regards, Laurent




----- Original Message ----- 
From: "Dave Page" <[email protected]>
To: "PgSQL Win32 developers" <[email protected]>
Sent: Wednesday, September 08, 2004 1:07 PM
Subject: [pgsql-hackers-win32] Contrib modules on Win32


I'm just building a new rlease of the win32 installer and have been
compiling the contrib modules. As of todays CVS, the following modules
do not compile on Win32. Note that I haven't even looked at why - I have
enough to do with the installer and pgAdmin betas :-)

cube
dbase
miscutil
pg_logger
pgbench
pgcrypto
seg
tsearch

All the rest compile OK, but I haven't tested any of them.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
dbf.h.diff (application/octet-stream, 343 B)
*** dbf.h.cvs	Wed Sep  8 17:15:22 2004
--- dbf.h	Wed Sep  8 17:27:27 2004
***************
*** 8,13 ****
--- 8,16 ----
  #ifndef _DBF_H
  #define _DBF_H
  
+ #ifdef _WIN32
+ #include <gmon.h>			/* we need it to define u_char type */
+ #endif
  #include <sys/types.h>
  
  /**********************************************************************
dbf2pg.c.diff (application/octet-stream, 1.2 KB)
*** dbf2pg.c.cvs	Wed Sep  8 17:16:38 2004
--- dbf2pg.c	Wed Sep  8 17:26:20 2004
***************
*** 57,63 ****
  void		do_inserts(PGconn *, char *, dbhead *);
  int			check_table(PGconn *, char *);
  
! char	   *Escape(char *);
  
  #ifdef HAVE_ICONV_H
  char	   *convert_charset(char *string);
--- 57,63 ----
  void		do_inserts(PGconn *, char *, dbhead *);
  int			check_table(PGconn *, char *);
  
! char	   *Escape_db(char *);
  
  #ifdef HAVE_ICONV_H
  char	   *convert_charset(char *string);
***************
*** 110,116 ****
  
  /* FIXME: should this check for overflow? */
  char *
! Escape(char *string)
  {
  	char	   *foo,
  			   *bar;
--- 110,116 ----
  
  /* FIXME: should this check for overflow? */
  char *
! Escape_db(char *string)
  {
  	char	   *foo,
  			   *bar;
***************
*** 466,472 ****
  				if (charset_from)
  					foo = convert_charset(foo);
  #endif
! 				foo = Escape(foo);
  
  				/* handle the date first - liuk */
  				if (fields[h].db_type == 'D')
--- 466,472 ----
  				if (charset_from)
  					foo = convert_charset(foo);
  #endif
! 				foo = Escape_db(foo);
  
  				/* handle the date first - liuk */
  				if (fields[h].db_type == 'D')
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.