1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Adjust Tcl-related code to compile cleanly with Tcl 8.4 (add const modifiers as

needed).  Some desultory const-ification of SPI interface to support this.
This commit is contained in:
Tom Lane
2002-12-30 22:10:54 +00:00
parent d82794ee33
commit 699782b695
10 changed files with 187 additions and 165 deletions

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pgtclCmds.h,v 1.28 2002/09/04 20:31:46 momjian Exp $
* $Id: pgtclCmds.h,v 1.29 2002/12/30 22:10:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,8 +15,14 @@
#define PGTCLCMDS_H
#include <tcl.h>
#include "libpq-fe.h"
/* Hack to deal with Tcl 8.4 const-ification without losing compatibility */
#ifndef CONST84
#define CONST84
#endif
#define RES_HARD_MAX 128
#define RES_START 16
@@ -86,54 +92,52 @@ typedef struct Pg_ConnectionId_s
/* **************************/
/* registered Tcl functions */
/* **************************/
extern int Pg_conndefaults(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_connect(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_disconnect(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_exec(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_execute(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_select(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_result(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_open(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_close(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_conndefaults(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_connect(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_disconnect(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_exec(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_execute(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_select(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_result(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_open(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_close(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
#ifdef PGTCL_USE_TCLOBJ
extern int Pg_lo_read(
ClientData cData, Tcl_Interp *interp, int objc,
extern int Pg_lo_read(ClientData cData, Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
extern int Pg_lo_write(
ClientData cData, Tcl_Interp *interp, int objc,
extern int Pg_lo_write(ClientData cData, Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
#else
extern int Pg_lo_read(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_write(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_read(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_write(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
#endif
extern int Pg_lo_lseek(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_creat(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_tell(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_unlink(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_import(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_export(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_listen(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_on_connection_loss(
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
extern int Pg_lo_lseek(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_creat(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_tell(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_unlink(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_import(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_lo_export(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_listen(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
extern int Pg_on_connection_loss(ClientData cData, Tcl_Interp *interp,
int argc, CONST84 char *argv[]);
#endif /* PGTCLCMDS_H */