Skip to content

Commit

Permalink
Fix [dd068d5942]: package tdbc::mysql fails to load under Fedora 17.
Browse files Browse the repository at this point in the history
Make some internal tables "const"
  • Loading branch information
jan.nijtmans committed Jul 26, 2012
1 parent bdb8c59 commit daf1687
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions tdbcmysql/generic/mysqlStubInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
* Names of the libraries that might contain the MySQL API
*/

static const char* mysqlStubLibNames[] = {
static const char *const mysqlStubLibNames[] = {
/* @LIBNAMES@: DO NOT EDIT THESE NAMES */
"libmysqlclient_r", "libmysqlclient", "libmysql", NULL
/* @END@ */
};

/* ABI Version numbers of the MySQL API that we can cope with */

static const char* mysqlSuffixes[] = {
"", ".16", ".15", NULL
static const char *const mysqlSuffixes[] = {
"", ".18", ".17", ".16", ".15", NULL
};

/* Names of the functions that we need from MySQL */

static const char* mysqlSymbolNames[] = {
static const char *const mysqlSymbolNames[] = {
/* @SYMNAMES@: DO NOT EDIT THESE NAMES */
"mysql_server_init",
"mysql_server_end",
Expand Down
4 changes: 2 additions & 2 deletions tdbcmysql/generic/tdbcmysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,14 @@ static const struct {

/* Tables of isolation levels: Tcl, SQL, and MySQL 'tx_isolation' */

static const char* TclIsolationLevels[] = {
static const char *const TclIsolationLevels[] = {
"readuncommitted",
"readcommitted",
"repeatableread",
"serializable",
NULL
};
static const char* SqlIsolationLevels[] = {
static const char *const SqlIsolationLevels[] = {
"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED",
"SET TRANSACTION ISOLATION LEVEL READ COMMITTED",
"SET TRANSACTION ISOLATION LEVEL REPEATABLE READ",
Expand Down
6 changes: 3 additions & 3 deletions tdbcodbc/generic/odbcStubInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
* Names of the libraries that might contain the ODBC API
*/

static const char* odbcStubLibNames[] = {
static const char *const odbcStubLibNames[] = {
/* @LIBNAMES@: DO NOT EDIT THESE NAMES */
"odbc32", "odbc", "libodbc32", "libodbc", NULL
/* @END@ */
};
static const char* odbcOptLibNames[] = {
static const char *const odbcOptLibNames[] = {
"odbccp", "odbccp32", "odbcinst",
"libodbccp", "libodbccp32", "libodbcinst", NULL
};
Expand All @@ -43,7 +43,7 @@ static const char* odbcOptLibNames[] = {
* Names of the functions that we need from ODBC
*/

static const char* odbcSymbolNames[] = {
static const char *const odbcSymbolNames[] = {
/* @SYMNAMES@: DO NOT EDIT THESE NAMES */
"SQLAllocHandle",
"SQLBindParameter",
Expand Down
4 changes: 2 additions & 2 deletions tdbcoracle/generic/tdbcoracle.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ static const struct {

/* Tables of isolation levels: Tcl, SQL, and MySQL 'tx_isolation' */

static const char* TclIsolationLevels[] = {
static const char *const TclIsolationLevels[] = {
"readcommitted",
"serializable",
NULL
};

static const char* SqlIsolationLevels[] = {
static const char *const SqlIsolationLevels[] = {
"SET TRANSACTION ISOLATION LEVEL READ COMMITTED",
"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE",
NULL
Expand Down
6 changes: 3 additions & 3 deletions tdbcpostgres/generic/pqStubInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
* ABI version numbers of the PostgreSQL API that we can cope with.
*/

static const char* pqSuffixes[] = {
static const char *const pqSuffixes[] = {
"", ".5", NULL
};

/*
* Names of the libraries that might contain the PostgreSQL API
*/

static const char* pqStubLibNames[] = {
static const char *const pqStubLibNames[] = {
/* @LIBNAMES@: DO NOT EDIT THESE NAMES */
"libpq", NULL
/* @END@ */
Expand All @@ -47,7 +47,7 @@ static const char* pqStubLibNames[] = {
* Names of the functions that we need from PostgreSQL
*/

static const char* pqSymbolNames[] = {
static const char *const pqSymbolNames[] = {
/* @SYMNAMES@: DO NOT EDIT THESE NAMES */
"pg_encoding_to_char",
"PQclear",
Expand Down
8 changes: 4 additions & 4 deletions tdbcpostgres/generic/tdbcpostgres.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static Tcl_LoadHandle pgLoadHandle = NULL;

/* Pool of literal values used to avoid excess Tcl_NewStringObj calls */

const char* LiteralValues[] = {
static const char *const LiteralValues[] = {
"",
"0",
"1",
Expand Down Expand Up @@ -160,7 +160,7 @@ enum OptStringIndex {

/* Names of string options for Postgres PGconnectdb() */

const char * optStringNames[] = {
static const char *const optStringNames[] = {
"host", "hostaddr", "port", "dbname", "user",
"password", "options", "tty", "service", "connect_timeout",
"sslmode", "requiressl", "krbsrvname"
Expand Down Expand Up @@ -367,15 +367,15 @@ typedef struct ResultSetData {

/* Tables of isolation levels: Tcl, SQL and Postgres C API */

static const char* TclIsolationLevels[] = {
static const char *const TclIsolationLevels[] = {
"readuncommitted",
"readcommitted",
"repeatableread",
"serializable",
NULL
};

static const char* SqlIsolationLevels[] = {
static const char *const SqlIsolationLevels[] = {
"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED",
"SET TRANSACTION ISOLATION LEVEL READ COMMITTED",
"SET TRANSACTION ISOLATION LEVEL REPEATABLE READ",
Expand Down

0 comments on commit daf1687

Please sign in to comment.