summaryrefslogtreecommitdiff
path: root/databases/tcl-gdbm/patches/patch-tclgdbm_c
blob: 43afe1935c99831d2cda129fd16b9c8cad0ff0fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-tclgdbm_c,v 1.1 2012/09/28 08:54:25 dholland Exp $

Fix build with tcl85.

--- tclgdbm.c~	2001-02-10 22:40:44.000000000 +0000
+++ tclgdbm.c
@@ -491,7 +491,7 @@ nextkey( ClientData client, Tcl_Interp *
 static int 
 open( ClientData client, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] )
 {
-  static char *modes[] ={ "r",        "rw",         "rwc",       "rwn", NULL };
+  static const char *modes[] ={ "r",        "rw",         "rwc",       "rwn", NULL };
   static int values[] ={  GDBM_READER, GDBM_WRITER, GDBM_WRCREAT, GDBM_NEWDB };
   int mode, new;
   char buf[16];
@@ -556,7 +556,7 @@ open( ClientData client, Tcl_Interp *int
 static int 
 error( ClientData client, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] )
 {
-  static char *modes[] ={ "number", "text", NULL };
+  static const char *modes[] ={ "number", "text", NULL };
   int mode;
 
   if ( objc != 3 )
@@ -589,7 +589,7 @@ error( ClientData client, Tcl_Interp *in
 static int 
 writemode( ClientData client, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] )
 {
-  static char *modes[] ={ "replace",    "insert",   NULL };
+  static const char *modes[] ={ "replace",    "insert",   NULL };
   static int values[] ={  GDBM_REPLACE, GDBM_INSERT };
   int mode;
   DB *db ;
@@ -619,7 +619,7 @@ writemode( ClientData client, Tcl_Interp
 static int 
 tclgdbm( ClientData client, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] )
 {
-  static char *cmds[] = {
+  static const char *cmds[] = {
 	"close", "delete", "error", "exists", "fetch", "firstkey", "insert",
 	"list", "nextkey", "open", "reorganize", "store", "writemode", NULL };
   static int (*f[])(ClientData,Tcl_Interp*,int,Tcl_Obj*CONST*) = {
@@ -641,13 +641,6 @@ tclgdbm( ClientData client, Tcl_Interp *
 
 
 /*
- * Not exported in tcl.h
- */
-Tcl_Namespace *Tcl_FindNamespace( Tcl_Interp*, char*, Tcl_Namespace*, int );
-int Tcl_Export( Tcl_Interp*, Tcl_Namespace*, char*, int );
-
-
-/*
  * Tclgdbm_Init
  *
  * Initialization for package.