BUG #2606: (libpq) incorrect function declaration in libpq-fe.h
The following bug has been logged online:
Bug reference: 2606
Logged by: Marc ROGLIANO
Email address: marc@rogliano.net
PostgreSQL version: 8.1.4
Operating system: Windows XP
Description: (libpq) incorrect function declaration in libpq-fe.h
Details:
Hello,
In libpq-fe.h, the function lo_write is declared :
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
=> 'const' missing before char *buf : buf should not be writable here
Best regards,
Marc
Marc ROGLIANO wrote:
The following bug has been logged online:
Bug reference: 2606
Logged by: Marc ROGLIANO
Email address: marc@rogliano.net
PostgreSQL version: 8.1.4
Operating system: Windows XP
Description: (libpq) incorrect function declaration in libpq-fe.h
Details:Hello,
In libpq-fe.h, the function lo_write is declared :
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
=> 'const' missing before char *buf : buf should not be writable here
Right, patch attached and applied. Interestingly, it was documented as
taking a 'const' there, but not implemented as const in the code.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +