ibm_db 5.0.5-x86-mingw32 → 5.1.0-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 431bd5a8a968177cca4733ecb3612353f4b46c1aaef82e69c27cafbff5cc13be
4
- data.tar.gz: a148b2d5695bea923e0f624ec02f1d88cb554dd9a4097665b59aad10f2ea243b
3
+ metadata.gz: be1de1af66403c30445bd110b3d5ce8cc435fcd0638e135b96e9b2ae9f2cca82
4
+ data.tar.gz: 3065ed9b5e17d5adc6cbf1448352756f012ab255d786929126378136ac909823
5
5
  SHA512:
6
- metadata.gz: 7799b0f97238828cd8100944fdff0a50544d4b62539c4f771dc2de7b1703a8ad6afcd9548ea094311a746613a5f6d0edacb7a100dba8678dad8ce344739b90d3
7
- data.tar.gz: ebef53348015de9f0860dc6ceceda17cfc70c498a5eb806048120761bf5acec5df26a43c928469b8e5ab93d5002bed87c2f5b279c9ebd1714178548fc60ea3e5
6
+ metadata.gz: 31d06492e6b2122f8c6fa6b62921d86a26fcf4d287acacf595c507e39ad47332438d8bbd52955a3ff1e008a24358edd5b32b822763d5cbe00ff2e4c3918697c6
7
+ data.tar.gz: 61699425ea3c7f8b01f8ed4d2526cd61ddd5cc87861449aa23bc4651a7568eca26a9bef891a439149ccaa24702ecfd59d488550f77a6bab9c3590f11fc00d537
@@ -75,7 +75,7 @@ OUTFLAG = -o $(empty)
75
75
  COUTFLAG = -o $(empty)
76
76
  CSRCFLAG = $(empty)
77
77
 
78
- RUBY_EXTCONF_H = unicode_support_version
78
+ RUBY_EXTCONF_H = unicode_support_version.h
79
79
  cflags = $(optflags) $(debugflags) $(warnflags)
80
80
  cxxflags = $(optflags) $(debugflags) $(warnflags)
81
81
  optflags = -O3 -fno-omit-frame-pointer
@@ -140,7 +140,7 @@ LIBS = $(LIBRUBYARG_SHARED) -ldb2cli -lshell32 -lws2_32 -liphlpapi -limagehlp -
140
140
  ORIG_SRCS = ibm_db.c ruby_ibm_db_cli.c
141
141
  SRCS = $(ORIG_SRCS)
142
142
  OBJS = ibm_db.o ruby_ibm_db_cli.o
143
- HDRS = $(srcdir)/ruby_ibm_db.h $(srcdir)/ruby_ibm_db_cli.h
143
+ HDRS = $(srcdir)/gil_release_version.h $(srcdir)/ruby_ibm_db.h $(srcdir)/ruby_ibm_db_cli.h $(srcdir)/unicode_support_version.h
144
144
  LOCAL_HDRS =
145
145
  TARGET = ibm_db
146
146
  TARGET_NAME = ibm_db
@@ -45,7 +45,7 @@ LIBRUBYARG_STATIC = $(LIBRUBY_A)
45
45
  OUTFLAG = -Fe
46
46
  COUTFLAG = -Fo
47
47
 
48
- RUBY_EXTCONF_H = unicode_support_version
48
+ RUBY_EXTCONF_H = unicode_support_version.h
49
49
  cflags =
50
50
  optflags =
51
51
  debugflags =
@@ -243,8 +243,8 @@ def crash(str)
243
243
  end
244
244
 
245
245
  if( RUBY_VERSION =~ /1.9/ || RUBY_VERSION =~ /2./)
246
- create_header('gil_release_version')
247
- create_header('unicode_support_version')
246
+ create_header('gil_release_version.h')
247
+ create_header('unicode_support_version.h')
248
248
  end
249
249
 
250
250
  unless (have_library(WIN ? 'db2cli' : 'db2','SQLConnect') or find_library(WIN ? 'db2cli' : 'db2','SQLConnect', IBM_DB_LIB))
@@ -316,7 +316,7 @@ def libpathflag(libpath)
316
316
  end
317
317
  end
318
318
 
319
- have_header('gil_release_version')
320
- have_header('unicode_support_version')
319
+ have_header('gil_release_version.h')
320
+ have_header('unicode_support_version.h')
321
321
 
322
322
  create_makefile('ibm_db')
@@ -0,0 +1,3 @@
1
+ #ifndef GIL_RELEASE_VERSION_H
2
+ #define GIL_RELEASE_VERSION_H
3
+ #endif
@@ -20,7 +20,7 @@
20
20
 
21
21
  #include "ruby.h"
22
22
 
23
- #ifdef UNICODE_SUPPORT_VERSION
23
+ #ifdef UNICODE_SUPPORT_VERSION_H
24
24
  #include "ruby/encoding.h"
25
25
  #endif
26
26
 
@@ -119,7 +119,7 @@ static VALUE id_id2name;
119
119
 
120
120
 
121
121
 
122
- #ifdef UNICODE_SUPPORT_VERSION
122
+ #ifdef UNICODE_SUPPORT_VERSION_H
123
123
  const int _check_i = 1;
124
124
  #define arch_is_bigendian() ( (*(char*)&_check_i) == 0 ) /* returns 0 if the machine is of little endian architecture, 1 if the machine is of bigendian architecture*/
125
125
 
@@ -414,7 +414,7 @@ char *estrdup(char *data) {
414
414
  return dup;
415
415
  }
416
416
 
417
- #ifdef UNICODE_SUPPORT_VERSION
417
+ #ifdef UNICODE_SUPPORT_VERSION_H
418
418
  SQLWCHAR *esqlwchardup(SQLWCHAR *data, int len) {
419
419
  SQLWCHAR *dup = ALLOC_N(SQLWCHAR, len + 1 );
420
420
  memset(dup, '\0', (len * sizeof(SQLWCHAR)) + 2 );
@@ -435,7 +435,7 @@ char *estrndup(char *data, int max) {
435
435
  }
436
436
 
437
437
  void strtolower(char *data, int max) {
438
- #ifdef UNICODE_SUPPORT_VERSION
438
+ #ifdef UNICODE_SUPPORT_VERSION_H
439
439
  rb_encoding *enc;
440
440
 
441
441
  if ( arch_is_bigendian() ){
@@ -447,7 +447,7 @@ void strtolower(char *data, int max) {
447
447
 
448
448
  if( max > 0 ) {
449
449
  while (max--) {
450
- #ifdef UNICODE_SUPPORT_VERSION
450
+ #ifdef UNICODE_SUPPORT_VERSION_H
451
451
  data[max] = rb_enc_tolower((int)data[max], enc);
452
452
  #else
453
453
  data[max] = tolower(data[max]);
@@ -457,7 +457,7 @@ void strtolower(char *data, int max) {
457
457
  }
458
458
 
459
459
  void strtoupper(char *data, int max) {
460
- #ifdef UNICODE_SUPPORT_VERSION
460
+ #ifdef UNICODE_SUPPORT_VERSION_H
461
461
  rb_encoding *enc;
462
462
 
463
463
  if ( arch_is_bigendian() ){
@@ -468,7 +468,7 @@ void strtoupper(char *data, int max) {
468
468
  #endif
469
469
  if( max > 0 ) {
470
470
  while (max--) {
471
- #ifdef UNICODE_SUPPORT_VERSION
471
+ #ifdef UNICODE_SUPPORT_VERSION_H
472
472
  data[max] = rb_enc_toupper((int)data[max], enc);
473
473
  #else
474
474
  data[max] = toupper(data[max]);
@@ -968,7 +968,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
968
968
  SQLSMALLINT length;
969
969
  SQLSMALLINT to_decrement = 0;
970
970
 
971
- #ifdef UNICODE_SUPPORT_VERSION
971
+ #ifdef UNICODE_SUPPORT_VERSION_H
972
972
  VALUE print_str = Qnil;
973
973
  #else
974
974
  char* print_str = NULL;
@@ -987,7 +987,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
987
987
  stmt_res = (stmt_handle *) conn_or_stmt;
988
988
  }
989
989
 
990
- #ifdef UNICODE_SUPPORT_VERSION
990
+ #ifdef UNICODE_SUPPORT_VERSION_H
991
991
  errMsg = ALLOC_N( SQLWCHAR, DB2_MAX_ERR_MSG_LEN );
992
992
  memset(errMsg, '\0', DB2_MAX_ERR_MSG_LEN * sizeof(SQLWCHAR) );
993
993
 
@@ -1024,7 +1024,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1024
1024
 
1025
1025
  if( release_gil == 1 ){
1026
1026
 
1027
- #ifdef UNICODE_SUPPORT_VERSION
1027
+ #ifdef UNICODE_SUPPORT_VERSION_H
1028
1028
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLGetDiagRec_helper, get_DiagRec_args,
1029
1029
  RUBY_UBF_IO, NULL);
1030
1030
  return_code =get_DiagRec_args->return_code;
@@ -1044,7 +1044,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1044
1044
 
1045
1045
  if ( return_code == SQL_SUCCESS) {
1046
1046
 
1047
- #ifdef UNICODE_SUPPORT_VERSION
1047
+ #ifdef UNICODE_SUPPORT_VERSION_H
1048
1048
  while ((p = memchr( (char *)msg, '\n', length * sizeof(SQLWCHAR) ))) {
1049
1049
  to_decrement = 1;
1050
1050
  *p = '\0';
@@ -1086,7 +1086,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1086
1086
  This copying into global should be removed once the deprecated methods
1087
1087
  conn_errormsg and conn_error are removed
1088
1088
  */
1089
- #ifdef UNICODE_SUPPORT_VERSION
1089
+ #ifdef UNICODE_SUPPORT_VERSION_H
1090
1090
  memset(IBM_DB_G( __ruby_conn_err_msg), '\0', DB2_MAX_ERR_MSG_LEN * sizeof(SQLWCHAR) );
1091
1091
  memset(IBM_DB_G( __ruby_conn_err_state), '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1092
1092
 
@@ -1106,7 +1106,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1106
1106
  conn_res->errorType = 1;
1107
1107
 
1108
1108
  if( conn_res->ruby_error_state == NULL ) {
1109
- #ifdef UNICODE_SUPPORT_VERSION
1109
+ #ifdef UNICODE_SUPPORT_VERSION_H
1110
1110
  conn_res->ruby_error_state = ALLOC_N( SQLWCHAR, SQL_SQLSTATE_SIZE + 1 );
1111
1111
  #else
1112
1112
  conn_res->ruby_error_state = ALLOC_N( char, SQL_SQLSTATE_SIZE + 1 );
@@ -1114,14 +1114,14 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1114
1114
  }
1115
1115
 
1116
1116
  if( conn_res->ruby_error_msg == NULL ) {
1117
- #ifdef UNICODE_SUPPORT_VERSION
1117
+ #ifdef UNICODE_SUPPORT_VERSION_H
1118
1118
  conn_res->ruby_error_msg = ALLOC_N( SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
1119
1119
  #else
1120
1120
  conn_res->ruby_error_msg = ALLOC_N( char, DB2_MAX_ERR_MSG_LEN + 1 );
1121
1121
  #endif
1122
1122
  }
1123
1123
 
1124
- #ifdef UNICODE_SUPPORT_VERSION
1124
+ #ifdef UNICODE_SUPPORT_VERSION_H
1125
1125
  memset( conn_res->ruby_error_state, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1126
1126
  memset( conn_res->ruby_error_msg, '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
1127
1127
 
@@ -1147,7 +1147,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1147
1147
  conn_res->errorType = 0;
1148
1148
 
1149
1149
  if( conn_res->ruby_error_state == NULL ) {
1150
- #ifdef UNICODE_SUPPORT_VERSION
1150
+ #ifdef UNICODE_SUPPORT_VERSION_H
1151
1151
  conn_res->ruby_error_state = ALLOC_N( SQLWCHAR, SQL_SQLSTATE_SIZE + 1 );
1152
1152
  #else
1153
1153
  conn_res->ruby_error_state = ALLOC_N(char, SQL_SQLSTATE_SIZE + 1 );
@@ -1155,14 +1155,14 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1155
1155
  }
1156
1156
 
1157
1157
  if( conn_res->ruby_error_msg == NULL ) {
1158
- #ifdef UNICODE_SUPPORT_VERSION
1158
+ #ifdef UNICODE_SUPPORT_VERSION_H
1159
1159
  conn_res->ruby_error_msg = ALLOC_N( SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
1160
1160
  #else
1161
1161
  conn_res->ruby_error_msg = ALLOC_N( char, DB2_MAX_ERR_MSG_LEN + 1 );
1162
1162
  #endif
1163
1163
  }
1164
1164
 
1165
- #ifdef UNICODE_SUPPORT_VERSION
1165
+ #ifdef UNICODE_SUPPORT_VERSION_H
1166
1166
  memset( conn_res->ruby_error_state, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1167
1167
  memset( conn_res->ruby_error_msg, '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
1168
1168
 
@@ -1185,7 +1185,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1185
1185
  }
1186
1186
 
1187
1187
  if( stmt_res->ruby_stmt_err_state == NULL ) {
1188
- #ifdef UNICODE_SUPPORT_VERSION
1188
+ #ifdef UNICODE_SUPPORT_VERSION_H
1189
1189
  stmt_res->ruby_stmt_err_state = ALLOC_N( SQLWCHAR, SQL_SQLSTATE_SIZE + 1 );
1190
1190
  #else
1191
1191
  stmt_res->ruby_stmt_err_state = ALLOC_N( char, SQL_SQLSTATE_SIZE + 1 );
@@ -1193,14 +1193,14 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1193
1193
  }
1194
1194
 
1195
1195
  if( stmt_res->ruby_stmt_err_msg == NULL ) {
1196
- #ifdef UNICODE_SUPPORT_VERSION
1196
+ #ifdef UNICODE_SUPPORT_VERSION_H
1197
1197
  stmt_res->ruby_stmt_err_msg = ALLOC_N( SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
1198
1198
  #else
1199
1199
  stmt_res->ruby_stmt_err_msg = ALLOC_N( char, DB2_MAX_ERR_MSG_LEN + 1 );
1200
1200
  #endif
1201
1201
  }
1202
1202
 
1203
- #ifdef UNICODE_SUPPORT_VERSION
1203
+ #ifdef UNICODE_SUPPORT_VERSION_H
1204
1204
  memset( stmt_res->ruby_stmt_err_state, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1205
1205
  memset( stmt_res->ruby_stmt_err_msg, '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
1206
1206
 
@@ -1223,7 +1223,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1223
1223
  This copying into global should be removed once the deprecated methods
1224
1224
  conn_errormsg and conn_error are removed
1225
1225
  */
1226
- #ifdef UNICODE_SUPPORT_VERSION
1226
+ #ifdef UNICODE_SUPPORT_VERSION_H
1227
1227
  memset( IBM_DB_G(__ruby_stmt_err_state), '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1228
1228
  memset( IBM_DB_G(__ruby_stmt_err_msg), '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
1229
1229
 
@@ -1247,7 +1247,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1247
1247
  switch (API) {
1248
1248
  case DB_ERR_STATE:
1249
1249
  if ( ret_str != NULL ) {
1250
- #ifdef UNICODE_SUPPORT_VERSION
1250
+ #ifdef UNICODE_SUPPORT_VERSION_H
1251
1251
  memcpy( ret_str, sqlstate, (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
1252
1252
  if( ret_str_len != NULL ) {
1253
1253
  *ret_str_len = (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR);
@@ -1262,7 +1262,7 @@ static void _ruby_ibm_db_check_sql_errors( void *conn_or_stmt, int resourceType,
1262
1262
  break;
1263
1263
  case DB_ERRMSG:
1264
1264
  if ( ret_str != NULL ) {
1265
- #ifdef UNICODE_SUPPORT_VERSION
1265
+ #ifdef UNICODE_SUPPORT_VERSION_H
1266
1266
  memcpy( ret_str, msg, length );
1267
1267
  #else
1268
1268
  memcpy( ret_str, msg, length );
@@ -1310,7 +1310,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1310
1310
 
1311
1311
  set_handle_attr_args *handleAttr_args = NULL;
1312
1312
 
1313
- #ifdef UNICODE_SUPPORT_VERSION
1313
+ #ifdef UNICODE_SUPPORT_VERSION_H
1314
1314
  VALUE data_utf16 = Qnil;
1315
1315
  #endif
1316
1316
 
@@ -1329,7 +1329,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1329
1329
  ((stmt_handle*)handle)->s_case_mode = CASE_NATURAL;
1330
1330
  break;
1331
1331
  default:
1332
- #ifdef UNICODE_SUPPORT_VERSION
1332
+ #ifdef UNICODE_SUPPORT_VERSION_H
1333
1333
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("ATTR_CASE attribute must be one of CASE_LOWER, CASE_UPPER, or CASE_NATURAL");
1334
1334
  #else
1335
1335
  *error = rb_str_new2("ATTR_CASE attribute must be one of CASE_LOWER, CASE_UPPER, or CASE_NATURAL");
@@ -1348,7 +1348,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1348
1348
  ((conn_handle*)handle)->c_case_mode = CASE_NATURAL;
1349
1349
  break;
1350
1350
  default:
1351
- #ifdef UNICODE_SUPPORT_VERSION
1351
+ #ifdef UNICODE_SUPPORT_VERSION_H
1352
1352
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("ATTR_CASE attribute must be one of CASE_LOWER, CASE_UPPER, or CASE_NATURAL");
1353
1353
  #else
1354
1354
  *error = rb_str_new2("ATTR_CASE attribute must be one of CASE_LOWER, CASE_UPPER, or CASE_NATURAL");
@@ -1356,7 +1356,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1356
1356
  return Qfalse;
1357
1357
  }
1358
1358
  } else {
1359
- #ifdef UNICODE_SUPPORT_VERSION
1359
+ #ifdef UNICODE_SUPPORT_VERSION_H
1360
1360
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Connection or statement handle must be passed in");
1361
1361
  #else
1362
1362
  *error = rb_str_new2("Connection or statement handle must be passed in");
@@ -1372,7 +1372,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1372
1372
 
1373
1373
  if (TYPE(data) == T_STRING) {
1374
1374
 
1375
- #ifndef UNICODE_SUPPORT_VERSION
1375
+ #ifndef UNICODE_SUPPORT_VERSION_H
1376
1376
  option_str = RSTRING_PTR(data);
1377
1377
  #else
1378
1378
  data_utf16 = _ruby_ibm_db_export_str_to_utf16(data);
@@ -1395,7 +1395,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1395
1395
  ruby_xfree( handleAttr_args );
1396
1396
  handleAttr_args = NULL;
1397
1397
  if( handle != NULL && ((stmt_handle *)handle)->ruby_stmt_err_msg != NULL ) {
1398
- #ifdef UNICODE_SUPPORT_VERSION
1398
+ #ifdef UNICODE_SUPPORT_VERSION_H
1399
1399
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Setting of statement attribute failed: "),
1400
1400
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(((stmt_handle *)handle)->ruby_stmt_err_msg,
1401
1401
  ((stmt_handle *)handle)->ruby_stmt_err_msg_len)
@@ -1404,7 +1404,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1404
1404
  *error = rb_str_cat2(rb_str_new2("Setting of statement attribute failed: "), ((stmt_handle *)handle)->ruby_stmt_err_msg);
1405
1405
  #endif
1406
1406
  } else {
1407
- #ifdef UNICODE_SUPPORT_VERSION
1407
+ #ifdef UNICODE_SUPPORT_VERSION_H
1408
1408
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Setting of statement attribute failed: <error message could not be retrieved>");
1409
1409
  #else
1410
1410
  *error = rb_str_new2("Setting of statement attribute failed: <error message could not be retrieved>");
@@ -1437,7 +1437,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1437
1437
  ruby_xfree( handleAttr_args );
1438
1438
  handleAttr_args = NULL;
1439
1439
  if( handle != NULL && ((stmt_handle *)handle)->ruby_stmt_err_msg != NULL ) {
1440
- #ifdef UNICODE_SUPPORT_VERSION
1440
+ #ifdef UNICODE_SUPPORT_VERSION_H
1441
1441
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Setting of statement attribute failed: "),
1442
1442
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(((stmt_handle *)handle)->ruby_stmt_err_msg,
1443
1443
  ((stmt_handle *)handle)->ruby_stmt_err_msg_len)
@@ -1446,7 +1446,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1446
1446
  *error = rb_str_cat2(rb_str_new2("Setting of statement attribute failed: "), ((stmt_handle *)handle)->ruby_stmt_err_msg);
1447
1447
  #endif
1448
1448
  } else {
1449
- #ifdef UNICODE_SUPPORT_VERSION
1449
+ #ifdef UNICODE_SUPPORT_VERSION_H
1450
1450
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Setting of statement attribute failed: <error message could not be retrieved>");
1451
1451
  #else
1452
1452
  *error = rb_str_new2("Setting of statement attribute failed: <error message could not be retrieved>");
@@ -1464,7 +1464,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1464
1464
  handleAttr_args->attribute = opt_key;
1465
1465
 
1466
1466
  if (TYPE(data) == T_STRING) {
1467
- #ifndef UNICODE_SUPPORT_VERSION
1467
+ #ifndef UNICODE_SUPPORT_VERSION_H
1468
1468
  option_str = RSTRING_PTR(data);
1469
1469
  handleAttr_args->strLength = RSTRING_LEN(data);
1470
1470
  #else
@@ -1487,7 +1487,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1487
1487
  ruby_xfree( handleAttr_args );
1488
1488
  handleAttr_args = NULL;
1489
1489
  if( handle != NULL && ((conn_handle *)handle)->ruby_error_msg != NULL ) {
1490
- #ifdef UNICODE_SUPPORT_VERSION
1490
+ #ifdef UNICODE_SUPPORT_VERSION_H
1491
1491
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Setting of connection attribute failed: "),
1492
1492
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(((conn_handle *)handle)->ruby_error_msg,
1493
1493
  ((conn_handle *)handle)->ruby_error_msg_len)
@@ -1496,7 +1496,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1496
1496
  *error = rb_str_cat2(rb_str_new2("Setting of connection attribute failed: "), ((conn_handle *)handle)->ruby_error_msg);
1497
1497
  #endif
1498
1498
  } else {
1499
- #ifdef UNICODE_SUPPORT_VERSION
1499
+ #ifdef UNICODE_SUPPORT_VERSION_H
1500
1500
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Setting of connection attribute failed: <error message could not be retrieved>");
1501
1501
  #else
1502
1502
  *error = rb_str_new2("Setting of connection attribute failed: <error message could not be retrieved>");
@@ -1520,7 +1520,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1520
1520
  ruby_xfree( handleAttr_args );
1521
1521
  handleAttr_args = NULL;
1522
1522
  if( handle != NULL && ((conn_handle *)handle)->ruby_error_msg != NULL ) {
1523
- #ifdef UNICODE_SUPPORT_VERSION
1523
+ #ifdef UNICODE_SUPPORT_VERSION_H
1524
1524
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Setting of connection attribute failed: "),
1525
1525
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( ((stmt_handle *)handle)->ruby_stmt_err_msg,
1526
1526
  ((stmt_handle *)handle)->ruby_stmt_err_msg_len)
@@ -1529,7 +1529,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1529
1529
  *error = rb_str_cat2(rb_str_new2("Setting of connection attribute failed: "), ((conn_handle *)handle)->ruby_error_msg);
1530
1530
  #endif
1531
1531
  } else {
1532
- #ifdef UNICODE_SUPPORT_VERSION
1532
+ #ifdef UNICODE_SUPPORT_VERSION_H
1533
1533
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Setting of connection attribute failed: <error message could not be retrieved>");
1534
1534
  #else
1535
1535
  *error = rb_str_new2("Setting of connection attribute failed: <error message could not be retrieved>");
@@ -1546,7 +1546,7 @@ static VALUE _ruby_ibm_db_assign_options( void *handle, int type, long opt_key,
1546
1546
  }
1547
1547
  }
1548
1548
  } else {
1549
- #ifdef UNICODE_SUPPORT_VERSION
1549
+ #ifdef UNICODE_SUPPORT_VERSION_H
1550
1550
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Connection or statement handle must be passed in");
1551
1551
  #else
1552
1552
  *error = rb_str_new2("Connection or statement handle must be passed in");
@@ -1611,7 +1611,7 @@ static int _ruby_ibm_db_parse_options ( VALUE options, int type, void *handle, V
1611
1611
  static int _ruby_ibm_db_get_result_set_info(stmt_handle *stmt_res)
1612
1612
  {
1613
1613
  int rc = -1, i;
1614
- #ifdef UNICODE_SUPPORT_VERSION
1614
+ #ifdef UNICODE_SUPPORT_VERSION_H
1615
1615
  SQLWCHAR tmp_name[BUFSIZ];
1616
1616
  #else
1617
1617
  SQLCHAR tmp_name[BUFSIZ];
@@ -1652,7 +1652,7 @@ static int _ruby_ibm_db_get_result_set_info(stmt_handle *stmt_res)
1652
1652
  stmt_res->column_info[i].loc_type = 0;
1653
1653
 
1654
1654
  stmt_res->column_info[i].name = tmp_name;
1655
- #ifdef UNICODE_SUPPORT_VERSION
1655
+ #ifdef UNICODE_SUPPORT_VERSION_H
1656
1656
  memset(stmt_res->column_info[i].name, '\0', BUFSIZ * sizeof(SQLWCHAR));
1657
1657
  #else
1658
1658
  memset(stmt_res->column_info[i].name, '\0', BUFSIZ);
@@ -1677,7 +1677,7 @@ static int _ruby_ibm_db_get_result_set_info(stmt_handle *stmt_res)
1677
1677
  return -1;
1678
1678
  }
1679
1679
  if ( describecolargs->name_length <= 0 ) {
1680
- #ifdef UNICODE_SUPPORT_VERSION
1680
+ #ifdef UNICODE_SUPPORT_VERSION_H
1681
1681
  stmt_res->column_info[i].name = esqlwchardup((SQLWCHAR*)"", 0);
1682
1682
  stmt_res->column_info[i].name_length = 0;
1683
1683
  #else
@@ -1686,7 +1686,7 @@ static int _ruby_ibm_db_get_result_set_info(stmt_handle *stmt_res)
1686
1686
  } else if ( describecolargs->name_length >= BUFSIZ ) {
1687
1687
  /* column name is longer than BUFSIZ, free the previously allocate memory and reallocate new*/
1688
1688
 
1689
- #ifdef UNICODE_SUPPORT_VERSION
1689
+ #ifdef UNICODE_SUPPORT_VERSION_H
1690
1690
  stmt_res->column_info[i].name = (SQLWCHAR*)ALLOC_N(SQLWCHAR, describecolargs->name_length+1);
1691
1691
  stmt_res->column_info[i].name_length = describecolargs->name_length ;
1692
1692
  #else
@@ -1710,7 +1710,7 @@ static int _ruby_ibm_db_get_result_set_info(stmt_handle *stmt_res)
1710
1710
  return -1;
1711
1711
  }
1712
1712
  } else {
1713
- #ifdef UNICODE_SUPPORT_VERSION
1713
+ #ifdef UNICODE_SUPPORT_VERSION_H
1714
1714
  stmt_res->column_info[i].name = (SQLWCHAR*) esqlwchardup( tmp_name, describecolargs->name_length );
1715
1715
  stmt_res->column_info[i].name_length = describecolargs->name_length;
1716
1716
  #else
@@ -1770,7 +1770,7 @@ static int _ruby_ibm_db_bind_column_helper(stmt_handle *stmt_res)
1770
1770
  case SQL_LONGVARCHAR:
1771
1771
  case SQL_WLONGVARCHAR:
1772
1772
 
1773
- #ifdef UNICODE_SUPPORT_VERSION
1773
+ #ifdef UNICODE_SUPPORT_VERSION_H
1774
1774
  bindCol_args->TargetType = SQL_C_WCHAR;
1775
1775
  bindCol_args->buff_length = (stmt_res->column_info[i].size+1) * sizeof(SQLWCHAR);
1776
1776
  row_data->str_val = ALLOC_N(char, bindCol_args->buff_length);
@@ -2015,7 +2015,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2015
2015
  int reused = 0;
2016
2016
  SQLSMALLINT out_length = 0;
2017
2017
  VALUE entry = Qnil;
2018
- #ifdef UNICODE_SUPPORT_VERSION
2018
+ #ifdef UNICODE_SUPPORT_VERSION_H
2019
2019
  SQLWCHAR *server = NULL;
2020
2020
  VALUE iserver = Qnil;
2021
2021
  VALUE idsserver = Qnil;
@@ -2087,7 +2087,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2087
2087
  ruby_xfree( handleAttr_args );
2088
2088
  handleAttr_args = NULL;
2089
2089
  if( conn_res != NULL && conn_res->ruby_error_msg != NULL ) {
2090
- #ifdef UNICODE_SUPPORT_VERSION
2090
+ #ifdef UNICODE_SUPPORT_VERSION_H
2091
2091
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Allocation of environment handle failed: "),
2092
2092
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(conn_res->ruby_error_msg, conn_res->ruby_error_msg_len )
2093
2093
  );
@@ -2095,7 +2095,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2095
2095
  *error = rb_str_cat2(rb_str_new2("Allocation of environment handle failed: "), conn_res->ruby_error_msg);
2096
2096
  #endif
2097
2097
  } else {
2098
- #ifdef UNICODE_SUPPORT_VERSION
2098
+ #ifdef UNICODE_SUPPORT_VERSION_H
2099
2099
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Allocation of environment handle failed: <error message could not be retrieved>");
2100
2100
  #else
2101
2101
  *error = rb_str_new2("Allocation of environment handle failed: <error message could not be retrieved>");
@@ -2119,7 +2119,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2119
2119
  if (rc != SQL_SUCCESS) {
2120
2120
  _ruby_ibm_db_check_sql_errors( conn_res, DB_CONN, conn_res->henv, SQL_HANDLE_ENV, rc, 1, NULL, NULL, -1, 1, 0 );
2121
2121
  if( conn_res != NULL && conn_res->ruby_error_msg != NULL ) {
2122
- #ifdef UNICODE_SUPPORT_VERSION
2122
+ #ifdef UNICODE_SUPPORT_VERSION_H
2123
2123
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Setting of Environemnt Attribute during connection failed: "),
2124
2124
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(conn_res->ruby_error_msg, conn_res->ruby_error_msg_len )
2125
2125
  );
@@ -2127,7 +2127,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2127
2127
  *error = rb_str_cat2(rb_str_new2("Setting of Environemnt Attribute during connection failed: "),conn_res->ruby_error_msg);
2128
2128
  #endif
2129
2129
  } else {
2130
- #ifdef UNICODE_SUPPORT_VERSION
2130
+ #ifdef UNICODE_SUPPORT_VERSION_H
2131
2131
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Setting of Environemnt Attribute during connection failed: <error message could not be retrieved>");
2132
2132
  #else
2133
2133
  *error = rb_str_new2("Setting of Environemnt Attribute during connection failed: <error message could not be retrieved>");
@@ -2147,14 +2147,14 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2147
2147
  if (rc != SQL_SUCCESS) {
2148
2148
  _ruby_ibm_db_check_sql_errors( conn_res, DB_CONN, conn_res->henv, SQL_HANDLE_ENV, rc, 1, NULL, NULL, -1, 1, 0 );
2149
2149
  if( conn_res != NULL && conn_res->ruby_error_msg != NULL ) {
2150
- #ifdef UNICODE_SUPPORT_VERSION
2150
+ #ifdef UNICODE_SUPPORT_VERSION_H
2151
2151
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Allocation of connection handle failed: "),
2152
2152
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_msg, conn_res->ruby_error_msg_len) );
2153
2153
  #else
2154
2154
  *error = rb_str_cat2(rb_str_new2("Allocation of connection handle failed: "),conn_res->ruby_error_msg);
2155
2155
  #endif
2156
2156
  } else {
2157
- #ifdef UNICODE_SUPPORT_VERSION
2157
+ #ifdef UNICODE_SUPPORT_VERSION_H
2158
2158
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Allocation of connection handle failed: <error message could not be retrieved>");
2159
2159
  #else
2160
2160
  *error = rb_str_new2("Allocation of connection handle failed: <error message could not be retrieved>");
@@ -2230,14 +2230,14 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2230
2230
  SQLFreeHandle( SQL_HANDLE_DBC, conn_res->hdbc );
2231
2231
  SQLFreeHandle( SQL_HANDLE_ENV, conn_res->henv );
2232
2232
  if( conn_res != NULL && conn_res->ruby_error_msg != NULL ) {
2233
- #ifdef UNICODE_SUPPORT_VERSION
2233
+ #ifdef UNICODE_SUPPORT_VERSION_H
2234
2234
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Connection failed: "),
2235
2235
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(conn_res->ruby_error_msg, conn_res->ruby_error_msg_len));
2236
2236
  #else
2237
2237
  *error = rb_str_cat2(rb_str_new2("Connection failed: "),conn_res->ruby_error_msg);
2238
2238
  #endif
2239
2239
  } else {
2240
- #ifdef UNICODE_SUPPORT_VERSION
2240
+ #ifdef UNICODE_SUPPORT_VERSION_H
2241
2241
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Connection failed: <error message could not be retrieved>");
2242
2242
  #else
2243
2243
  *error = rb_str_new2("Connection failed: <error message could not be retrieved>");
@@ -2266,14 +2266,14 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2266
2266
  SQLFreeHandle( SQL_HANDLE_DBC, conn_res->hdbc );
2267
2267
  SQLFreeHandle( SQL_HANDLE_ENV, conn_res->henv );
2268
2268
  if( conn_res != NULL && conn_res->ruby_error_msg != NULL ) {
2269
- #ifdef UNICODE_SUPPORT_VERSION
2269
+ #ifdef UNICODE_SUPPORT_VERSION_H
2270
2270
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Failed to retrieve autocommit status during connection: "),
2271
2271
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(conn_res->ruby_error_msg, conn_res->ruby_error_msg_len));
2272
2272
  #else
2273
2273
  *error = rb_str_cat2(rb_str_new2("Connection failed: "),conn_res->ruby_error_msg);
2274
2274
  #endif
2275
2275
  } else {
2276
- #ifdef UNICODE_SUPPORT_VERSION
2276
+ #ifdef UNICODE_SUPPORT_VERSION_H
2277
2277
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Failed to retrieve autocommit status during connection: <error message could not be retrieved>");
2278
2278
  #else
2279
2279
  *error = rb_str_new2("Connection failed: <error message could not be retrieved>");
@@ -2297,7 +2297,7 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2297
2297
  #endif
2298
2298
  #endif
2299
2299
  /* Get the server name */
2300
- #ifdef UNICODE_SUPPORT_VERSION
2300
+ #ifdef UNICODE_SUPPORT_VERSION_H
2301
2301
  server = ALLOC_N(SQLWCHAR, 2048);
2302
2302
  memset(server, 0, sizeof(server));
2303
2303
  iserver = _ruby_ibm_db_export_char_to_utf16_rstr("AS");
@@ -2313,14 +2313,14 @@ static VALUE _ruby_ibm_db_connect_helper2( connect_helper_args *data ) {
2313
2313
  getInfo_args->infoType = SQL_DBMS_NAME;
2314
2314
  getInfo_args->infoValue = (SQLPOINTER)server;
2315
2315
 
2316
- #ifdef UNICODE_SUPPORT_VERSION
2316
+ #ifdef UNICODE_SUPPORT_VERSION_H
2317
2317
  getInfo_args->buff_length = 2048 * sizeof(SQLWCHAR);
2318
2318
  #else
2319
2319
  getInfo_args->buff_length = 2048;
2320
2320
  #endif
2321
2321
  rc = _ruby_ibm_db_SQLGetInfo_helper( getInfo_args );
2322
2322
 
2323
- #ifndef UNICODE_SUPPORT_VERSION
2323
+ #ifndef UNICODE_SUPPORT_VERSION_H
2324
2324
  if (!strcmp((char *)server, "AS")) {
2325
2325
  is_systemi = 1;
2326
2326
  }
@@ -2443,7 +2443,7 @@ static VALUE _ruby_ibm_db_connect_helper( int argc, VALUE *argv, int isPersisten
2443
2443
  VALUE r_db, r_uid, r_passwd, options,return_value;
2444
2444
  VALUE r_literal_replacement = Qnil;
2445
2445
 
2446
- #ifdef UNICODE_SUPPORT_VERSION
2446
+ #ifdef UNICODE_SUPPORT_VERSION_H
2447
2447
  VALUE r_db_utf16, r_uid_utf16, r_passwd_utf16, r_db_ascii;
2448
2448
  #endif
2449
2449
 
@@ -2457,7 +2457,7 @@ static VALUE _ruby_ibm_db_connect_helper( int argc, VALUE *argv, int isPersisten
2457
2457
  conn_args = ALLOC( connect_args );
2458
2458
  memset(conn_args,'\0',sizeof(struct _ibm_db_connect_args_struct));
2459
2459
 
2460
- #ifndef UNICODE_SUPPORT_VERSION
2460
+ #ifndef UNICODE_SUPPORT_VERSION_H
2461
2461
  conn_args->database = (SQLCHAR *) RSTRING_PTR( r_db );
2462
2462
  conn_args->database_len = (SQLSMALLINT) RSTRING_LEN( r_db );
2463
2463
 
@@ -2484,7 +2484,7 @@ static VALUE _ruby_ibm_db_connect_helper( int argc, VALUE *argv, int isPersisten
2484
2484
  #endif
2485
2485
 
2486
2486
  /* If the string contains a =, set ctlg_conn = 0, to use SQLDriverConnect */
2487
- #ifndef UNICODE_SUPPORT_VERSION
2487
+ #ifndef UNICODE_SUPPORT_VERSION_H
2488
2488
  if ( strstr( (char *) conn_args->database, "=") != NULL ) {
2489
2489
  #else
2490
2490
  if ( RARRAY_LEN(rb_str_split(r_db_ascii,"=")) > 1) { /*There is no direct API like strstr, hence split string with delimiter as '=' if the returned RARRAY has more than 1 element then set ctlg_conn = 0*/
@@ -2506,7 +2506,7 @@ static VALUE _ruby_ibm_db_connect_helper( int argc, VALUE *argv, int isPersisten
2506
2506
 
2507
2507
  if( isPersistent ) {
2508
2508
  /*If making a persistent connection calculate the hash key to cache the connection in persistence list*/
2509
- #ifndef UNICODE_SUPPORT_VERSION
2509
+ #ifndef UNICODE_SUPPORT_VERSION_H
2510
2510
  helper_args->hKey = rb_str_concat(rb_str_dup(r_uid), r_db); /*A duplicate of r_uid is made so that initial value is intact*/
2511
2511
  helper_args->hKey = rb_str_concat(helper_args->hKey, r_passwd);
2512
2512
  helper_args->hKey = rb_str_concat(rb_str_new2("__ibm_db_"),helper_args->hKey);
@@ -2524,7 +2524,7 @@ static VALUE _ruby_ibm_db_connect_helper( int argc, VALUE *argv, int isPersisten
2524
2524
  helper_args->literal_replacement = SET_QUOTED_LITERAL_REPLACEMENT_ON; /*QUOTED LITERAL replacemnt is ON by default*/
2525
2525
  }
2526
2526
  /* Call the function where the actual logic is being run*/
2527
- #ifdef UNICODE_SUPPORT_VERSION
2527
+ #ifdef UNICODE_SUPPORT_VERSION_H
2528
2528
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_connect_helper2, helper_args, RUBY_UBF_IO, NULL);
2529
2529
 
2530
2530
 
@@ -2593,7 +2593,7 @@ static int _ruby_ibm_db_set_decfloat_rounding_mode_client_helper(_rounding_mode
2593
2593
  exec_cum_prepare_args *exec_direct_args = NULL;
2594
2594
  bind_col_args *bindCol_args = NULL;
2595
2595
  fetch_data_args *fetch_args = NULL;
2596
- #ifndef UNICODE_SUPPORT_VERSION
2596
+ #ifndef UNICODE_SUPPORT_VERSION_H
2597
2597
  SQLCHAR *stmt = (SQLCHAR *)"values current decfloat rounding mode";
2598
2598
  #else
2599
2599
  VALUE stmt = Qnil;
@@ -2603,7 +2603,7 @@ static int _ruby_ibm_db_set_decfloat_rounding_mode_client_helper(_rounding_mode
2603
2603
  exec_direct_args = ALLOC( exec_cum_prepare_args );
2604
2604
  memset(exec_direct_args,'\0',sizeof(struct _ibm_db_exec_direct_args_struct));
2605
2605
 
2606
- #ifdef UNICODE_SUPPORT_VERSION
2606
+ #ifdef UNICODE_SUPPORT_VERSION_H
2607
2607
  exec_direct_args->stmt_string = (SQLWCHAR *)RSTRING_PTR( stmt );
2608
2608
  #else
2609
2609
  exec_direct_args->stmt_string = stmt;
@@ -2897,7 +2897,7 @@ VALUE ruby_ibm_db_createDb_helper(VALUE connection, VALUE dbName, VALUE codeSet,
2897
2897
 
2898
2898
 
2899
2899
  VALUE return_value = Qfalse;
2900
- #ifdef UNICODE_SUPPORT_VERSION
2900
+ #ifdef UNICODE_SUPPORT_VERSION_H
2901
2901
  VALUE dbName_utf16 = Qnil;
2902
2902
  VALUE codeSet_utf16 = Qnil;
2903
2903
  VALUE mode_utf16 = Qnil;
@@ -2925,7 +2925,7 @@ VALUE ruby_ibm_db_createDb_helper(VALUE connection, VALUE dbName, VALUE codeSet,
2925
2925
  create_db_args = ALLOC( create_drop_db_args );
2926
2926
  memset(create_db_args,'\0',sizeof(struct _ibm_db_create_drop_db_args_struct));
2927
2927
 
2928
- #ifdef UNICODE_SUPPORT_VERSION
2928
+ #ifdef UNICODE_SUPPORT_VERSION_H
2929
2929
  dbName_utf16 = _ruby_ibm_db_export_str_to_utf16(dbName);
2930
2930
 
2931
2931
  create_db_args->dbName = (SQLWCHAR*)RSTRING_PTR(dbName_utf16);
@@ -2968,7 +2968,7 @@ VALUE ruby_ibm_db_createDb_helper(VALUE connection, VALUE dbName, VALUE codeSet,
2968
2968
 
2969
2969
  _ruby_ibm_db_clear_conn_err_cache();
2970
2970
 
2971
- #ifdef UNICODE_SUPPORT_VERSION
2971
+ #ifdef UNICODE_SUPPORT_VERSION_H
2972
2972
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLCreateDB_helper, create_db_args,
2973
2973
  RUBY_UBF_IO, NULL );
2974
2974
  rc = create_db_args->rc;
@@ -2983,7 +2983,7 @@ VALUE ruby_ibm_db_createDb_helper(VALUE connection, VALUE dbName, VALUE codeSet,
2983
2983
  if(conn_res->sqlcode == -1005 && 1 == createNX) {
2984
2984
  return_value = Qtrue; /*Return true if database already exists and Create if not existing called*/
2985
2985
  /*Clear the error messages*/
2986
- #ifdef UNICODE_SUPPORT_VERSION
2986
+ #ifdef UNICODE_SUPPORT_VERSION_H
2987
2987
  memset( conn_res->ruby_error_state, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
2988
2988
  memset( conn_res->ruby_error_msg, '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
2989
2989
  #else
@@ -3053,7 +3053,7 @@ VALUE ibm_db_createDB(int argc, VALUE *argv, VALUE self)
3053
3053
  * DropDb helper
3054
3054
  */
3055
3055
  VALUE ruby_ibm_db_dropDb_helper(VALUE connection, VALUE dbName) {
3056
- #ifdef UNICODE_SUPPORT_VERSION
3056
+ #ifdef UNICODE_SUPPORT_VERSION_H
3057
3057
  VALUE dbName_utf16 = Qnil;
3058
3058
  #endif
3059
3059
 
@@ -3081,7 +3081,7 @@ VALUE ruby_ibm_db_dropDb_helper(VALUE connection, VALUE dbName) {
3081
3081
  drop_db_args = ALLOC( create_drop_db_args );
3082
3082
  memset(drop_db_args,'\0',sizeof(struct _ibm_db_create_drop_db_args_struct));
3083
3083
 
3084
- #ifdef UNICODE_SUPPORT_VERSION
3084
+ #ifdef UNICODE_SUPPORT_VERSION_H
3085
3085
  dbName_utf16 = _ruby_ibm_db_export_str_to_utf16(dbName);
3086
3086
 
3087
3087
  drop_db_args->dbName = (SQLWCHAR*)RSTRING_PTR(dbName_utf16);
@@ -3098,7 +3098,7 @@ VALUE ruby_ibm_db_dropDb_helper(VALUE connection, VALUE dbName) {
3098
3098
 
3099
3099
  _ruby_ibm_db_clear_conn_err_cache();
3100
3100
 
3101
- #ifdef UNICODE_SUPPORT_VERSION
3101
+ #ifdef UNICODE_SUPPORT_VERSION_H
3102
3102
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLDropDB_helper, drop_db_args,
3103
3103
  RUBY_UBF_IO, NULL );
3104
3104
  rc = drop_db_args->rc;
@@ -3446,7 +3446,7 @@ VALUE ibm_db_bind_param_helper(int argc, char * varname, long varname_len ,long
3446
3446
 
3447
3447
  int rc = 0;
3448
3448
  VALUE return_value = Qtrue;
3449
- #ifdef UNICODE_SUPPORT_VERSION
3449
+ #ifdef UNICODE_SUPPORT_VERSION_H
3450
3450
  char *err_str = NULL;
3451
3451
  #endif
3452
3452
 
@@ -3476,7 +3476,7 @@ VALUE ibm_db_bind_param_helper(int argc, char * varname, long varname_len ,long
3476
3476
  break;
3477
3477
 
3478
3478
  case 4:
3479
- #ifdef UNICODE_SUPPORT_VERSION
3479
+ #ifdef UNICODE_SUPPORT_VERSION_H
3480
3480
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLDescribeParam_helper, data,
3481
3481
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
3482
3482
  rc = data->rc;
@@ -3496,7 +3496,7 @@ VALUE ibm_db_bind_param_helper(int argc, char * varname, long varname_len ,long
3496
3496
  break;
3497
3497
 
3498
3498
  case 5:
3499
- #ifdef UNICODE_SUPPORT_VERSION
3499
+ #ifdef UNICODE_SUPPORT_VERSION_H
3500
3500
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLDescribeParam_helper, data,
3501
3501
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
3502
3502
  rc = data->rc;
@@ -3517,7 +3517,7 @@ VALUE ibm_db_bind_param_helper(int argc, char * varname, long varname_len ,long
3517
3517
  break;
3518
3518
 
3519
3519
  case 6:
3520
- #ifdef UNICODE_SUPPORT_VERSION
3520
+ #ifdef UNICODE_SUPPORT_VERSION_H
3521
3521
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLDescribeParam_helper, data,
3522
3522
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
3523
3523
  rc = data->rc;
@@ -3559,7 +3559,7 @@ VALUE ibm_db_bind_param_helper(int argc, char * varname, long varname_len ,long
3559
3559
  /* end Switch */
3560
3560
 
3561
3561
  if( rc == SQL_ERROR ) {
3562
- #ifdef UNICODE_SUPPORT_VERSION
3562
+ #ifdef UNICODE_SUPPORT_VERSION_H
3563
3563
  /*String in SQLWCHAR(utf16) format will contain '\0' due to which the err string will be printed wrong,
3564
3564
  * hence convert it to utf8 format
3565
3565
  */
@@ -3647,7 +3647,7 @@ VALUE ibm_db_bind_param(int argc, VALUE *argv, VALUE self)
3647
3647
  rb_scan_args(argc, argv, "35", &stmt, &r_param_no, &r_varname,
3648
3648
  &r_param_type, &r_data_type, &r_precision, &r_scale, &r_size);
3649
3649
 
3650
- #ifdef UNICODE_SUPPORT_VERSION
3650
+ #ifdef UNICODE_SUPPORT_VERSION_H
3651
3651
  varname = RSTRING_PTR(r_varname);
3652
3652
  varname_len = RSTRING_LEN(r_varname);
3653
3653
  #else
@@ -3752,7 +3752,7 @@ VALUE ibm_db_close(int argc, VALUE *argv, VALUE self)
3752
3752
  end_X_args->handleType = SQL_HANDLE_DBC;
3753
3753
  end_X_args->completionType = SQL_ROLLBACK; /*Remeber you are rolling back the transaction*/
3754
3754
 
3755
- #ifdef UNICODE_SUPPORT_VERSION
3755
+ #ifdef UNICODE_SUPPORT_VERSION_H
3756
3756
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLEndTran, end_X_args,
3757
3757
  RUBY_UBF_IO, NULL);
3758
3758
  rc = end_X_args->rc;
@@ -3771,7 +3771,7 @@ VALUE ibm_db_close(int argc, VALUE *argv, VALUE self)
3771
3771
  }
3772
3772
  }
3773
3773
 
3774
- #ifdef UNICODE_SUPPORT_VERSION
3774
+ #ifdef UNICODE_SUPPORT_VERSION_H
3775
3775
  rc = ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLDisconnect_helper, &(conn_res->hdbc),
3776
3776
  RUBY_UBF_IO, NULL);
3777
3777
  #else
@@ -3859,7 +3859,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3859
3859
  VALUE r_table_name = Qnil;
3860
3860
  VALUE r_column_name = Qnil;
3861
3861
 
3862
- #ifdef UNICODE_SUPPORT_VERSION
3862
+ #ifdef UNICODE_SUPPORT_VERSION_H
3863
3863
  VALUE r_qualifier_utf16 = Qnil;
3864
3864
  VALUE r_owner_utf16 = Qnil;
3865
3865
  VALUE r_table_name_utf16 = Qnil;
@@ -3907,7 +3907,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3907
3907
  return_value = Qfalse;
3908
3908
  } else {
3909
3909
  if (!NIL_P(r_qualifier)) {
3910
- #ifdef UNICODE_SUPPORT_VERSION
3910
+ #ifdef UNICODE_SUPPORT_VERSION_H
3911
3911
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
3912
3912
  col_privileges_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
3913
3913
  col_privileges_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -3917,7 +3917,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3917
3917
  #endif
3918
3918
  }
3919
3919
  if (!NIL_P(r_owner)) {
3920
- #ifdef UNICODE_SUPPORT_VERSION
3920
+ #ifdef UNICODE_SUPPORT_VERSION_H
3921
3921
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
3922
3922
  col_privileges_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
3923
3923
  col_privileges_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -3927,7 +3927,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3927
3927
  #endif
3928
3928
  }
3929
3929
  if (!NIL_P(r_table_name)) {
3930
- #ifdef UNICODE_SUPPORT_VERSION
3930
+ #ifdef UNICODE_SUPPORT_VERSION_H
3931
3931
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
3932
3932
  col_privileges_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
3933
3933
  col_privileges_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -3937,7 +3937,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3937
3937
  #endif
3938
3938
  }
3939
3939
  if (!NIL_P(r_column_name)) {
3940
- #ifdef UNICODE_SUPPORT_VERSION
3940
+ #ifdef UNICODE_SUPPORT_VERSION_H
3941
3941
  r_column_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_column_name );
3942
3942
  col_privileges_args->column_name = (SQLWCHAR*) RSTRING_PTR( r_column_name_utf16 );
3943
3943
  col_privileges_args->column_name_len = (SQLSMALLINT) RSTRING_LEN( r_column_name_utf16 )/sizeof(SQLWCHAR);
@@ -3947,7 +3947,7 @@ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self)
3947
3947
  #endif
3948
3948
  }
3949
3949
  col_privileges_args->stmt_res = stmt_res;
3950
- #ifdef UNICODE_SUPPORT_VERSION
3950
+ #ifdef UNICODE_SUPPORT_VERSION_H
3951
3951
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLColumnPrivileges_helper, col_privileges_args,
3952
3952
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
3953
3953
  rc = col_privileges_args->rc;
@@ -4038,7 +4038,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4038
4038
  VALUE r_owner = Qnil;
4039
4039
  VALUE r_table_name = Qnil;
4040
4040
  VALUE r_column_name = Qnil;
4041
- #ifdef UNICODE_SUPPORT_VERSION
4041
+ #ifdef UNICODE_SUPPORT_VERSION_H
4042
4042
  VALUE r_qualifier_utf16 = Qnil;
4043
4043
  VALUE r_owner_utf16 = Qnil;
4044
4044
  VALUE r_table_name_utf16 = Qnil;
@@ -4086,7 +4086,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4086
4086
  return_value = Qfalse;
4087
4087
  } else {
4088
4088
  if (!NIL_P(r_qualifier)) {
4089
- #ifdef UNICODE_SUPPORT_VERSION
4089
+ #ifdef UNICODE_SUPPORT_VERSION_H
4090
4090
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4091
4091
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4092
4092
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4096,7 +4096,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4096
4096
  #endif
4097
4097
  }
4098
4098
  if (!NIL_P(r_owner)) {
4099
- #ifdef UNICODE_SUPPORT_VERSION
4099
+ #ifdef UNICODE_SUPPORT_VERSION_H
4100
4100
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4101
4101
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4102
4102
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4106,7 +4106,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4106
4106
  #endif
4107
4107
  }
4108
4108
  if (!NIL_P(r_table_name)) {
4109
- #ifdef UNICODE_SUPPORT_VERSION
4109
+ #ifdef UNICODE_SUPPORT_VERSION_H
4110
4110
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
4111
4111
  col_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
4112
4112
  col_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -4116,7 +4116,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4116
4116
  #endif
4117
4117
  }
4118
4118
  if (!NIL_P(r_column_name)) {
4119
- #ifdef UNICODE_SUPPORT_VERSION
4119
+ #ifdef UNICODE_SUPPORT_VERSION_H
4120
4120
  r_column_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_column_name );
4121
4121
  col_metadata_args->column_name = (SQLWCHAR*) RSTRING_PTR( r_column_name_utf16 );
4122
4122
  col_metadata_args->column_name_len = (SQLSMALLINT) RSTRING_LEN( r_column_name_utf16 )/sizeof(SQLWCHAR);
@@ -4127,7 +4127,7 @@ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self)
4127
4127
  }
4128
4128
  col_metadata_args->stmt_res = stmt_res;
4129
4129
 
4130
- #ifdef UNICODE_SUPPORT_VERSION
4130
+ #ifdef UNICODE_SUPPORT_VERSION_H
4131
4131
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLColumns_helper, col_metadata_args,
4132
4132
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
4133
4133
  rc = col_metadata_args->rc;
@@ -4218,7 +4218,7 @@ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self)
4218
4218
  VALUE r_table_name = Qnil;
4219
4219
  VALUE r_is_fk_table = Qfalse;
4220
4220
 
4221
- #ifdef UNICODE_SUPPORT_VERSION
4221
+ #ifdef UNICODE_SUPPORT_VERSION_H
4222
4222
  VALUE r_qualifier_utf16 = Qnil;
4223
4223
  VALUE r_owner_utf16 = Qnil;
4224
4224
  VALUE r_table_name_utf16 = Qnil;
@@ -4267,7 +4267,7 @@ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self)
4267
4267
  return_value = Qfalse;
4268
4268
  } else {
4269
4269
  if (!NIL_P(r_qualifier)) {
4270
- #ifdef UNICODE_SUPPORT_VERSION
4270
+ #ifdef UNICODE_SUPPORT_VERSION_H
4271
4271
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4272
4272
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4273
4273
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4277,7 +4277,7 @@ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self)
4277
4277
  #endif
4278
4278
  }
4279
4279
  if (!NIL_P(r_owner)) {
4280
- #ifdef UNICODE_SUPPORT_VERSION
4280
+ #ifdef UNICODE_SUPPORT_VERSION_H
4281
4281
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4282
4282
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4283
4283
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4287,7 +4287,7 @@ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self)
4287
4287
  #endif
4288
4288
  }
4289
4289
  if (!NIL_P(r_table_name)) {
4290
- #ifdef UNICODE_SUPPORT_VERSION
4290
+ #ifdef UNICODE_SUPPORT_VERSION_H
4291
4291
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
4292
4292
  col_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
4293
4293
  col_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -4299,7 +4299,7 @@ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self)
4299
4299
 
4300
4300
  col_metadata_args->stmt_res = stmt_res;
4301
4301
 
4302
- #ifdef UNICODE_SUPPORT_VERSION
4302
+ #ifdef UNICODE_SUPPORT_VERSION_H
4303
4303
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLForeignKeys_helper, col_metadata_args,
4304
4304
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
4305
4305
  rc = col_metadata_args->rc;
@@ -4378,7 +4378,7 @@ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self)
4378
4378
  VALUE r_qualifier = Qnil;
4379
4379
  VALUE r_owner = Qnil;
4380
4380
  VALUE r_table_name = Qnil;
4381
- #ifdef UNICODE_SUPPORT_VERSION
4381
+ #ifdef UNICODE_SUPPORT_VERSION_H
4382
4382
  VALUE r_qualifier_utf16 = Qnil;
4383
4383
  VALUE r_owner_utf16 = Qnil;
4384
4384
  VALUE r_table_name_utf16 = Qnil;
@@ -4424,7 +4424,7 @@ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self)
4424
4424
  return_value = Qfalse;
4425
4425
  } else {
4426
4426
  if (!NIL_P(r_qualifier)) {
4427
- #ifdef UNICODE_SUPPORT_VERSION
4427
+ #ifdef UNICODE_SUPPORT_VERSION_H
4428
4428
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4429
4429
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4430
4430
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4434,7 +4434,7 @@ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self)
4434
4434
  #endif
4435
4435
  }
4436
4436
  if (!NIL_P(r_owner)) {
4437
- #ifdef UNICODE_SUPPORT_VERSION
4437
+ #ifdef UNICODE_SUPPORT_VERSION_H
4438
4438
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4439
4439
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4440
4440
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4444,7 +4444,7 @@ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self)
4444
4444
  #endif
4445
4445
  }
4446
4446
  if (!NIL_P(r_table_name)) {
4447
- #ifdef UNICODE_SUPPORT_VERSION
4447
+ #ifdef UNICODE_SUPPORT_VERSION_H
4448
4448
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
4449
4449
  col_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
4450
4450
  col_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -4455,7 +4455,7 @@ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self)
4455
4455
  }
4456
4456
  col_metadata_args->stmt_res = stmt_res;
4457
4457
 
4458
- #ifdef UNICODE_SUPPORT_VERSION
4458
+ #ifdef UNICODE_SUPPORT_VERSION_H
4459
4459
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLPrimaryKeys_helper, col_metadata_args,
4460
4460
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
4461
4461
  rc = col_metadata_args->rc;
@@ -4556,7 +4556,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4556
4556
  VALUE r_proc_name = Qnil;
4557
4557
  VALUE r_column_name = Qnil;
4558
4558
 
4559
- #ifdef UNICODE_SUPPORT_VERSION
4559
+ #ifdef UNICODE_SUPPORT_VERSION_H
4560
4560
  VALUE r_qualifier_utf16 = Qnil;
4561
4561
  VALUE r_owner_utf16 = Qnil;
4562
4562
  VALUE r_proc_name_utf16 = Qnil;
@@ -4605,7 +4605,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4605
4605
  return_value = Qfalse;
4606
4606
  } else {
4607
4607
  if (!NIL_P(r_qualifier)) {
4608
- #ifdef UNICODE_SUPPORT_VERSION
4608
+ #ifdef UNICODE_SUPPORT_VERSION_H
4609
4609
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4610
4610
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4611
4611
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4615,7 +4615,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4615
4615
  #endif
4616
4616
  }
4617
4617
  if (!NIL_P(r_owner)) {
4618
- #ifdef UNICODE_SUPPORT_VERSION
4618
+ #ifdef UNICODE_SUPPORT_VERSION_H
4619
4619
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4620
4620
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4621
4621
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4625,7 +4625,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4625
4625
  #endif
4626
4626
  }
4627
4627
  if (!NIL_P(r_proc_name)) {
4628
- #ifdef UNICODE_SUPPORT_VERSION
4628
+ #ifdef UNICODE_SUPPORT_VERSION_H
4629
4629
  r_proc_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_proc_name );
4630
4630
  col_metadata_args->proc_name = (SQLWCHAR*) RSTRING_PTR( r_proc_name_utf16 );
4631
4631
  col_metadata_args->proc_name_len = (SQLSMALLINT) RSTRING_LEN( r_proc_name_utf16 )/sizeof(SQLWCHAR);
@@ -4635,7 +4635,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4635
4635
  #endif
4636
4636
  }
4637
4637
  if (!NIL_P(r_column_name)) {
4638
- #ifdef UNICODE_SUPPORT_VERSION
4638
+ #ifdef UNICODE_SUPPORT_VERSION_H
4639
4639
  r_column_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_column_name );
4640
4640
  col_metadata_args->column_name = (SQLWCHAR*) RSTRING_PTR( r_column_name_utf16 );
4641
4641
  col_metadata_args->column_name_len = (SQLSMALLINT) RSTRING_LEN( r_column_name_utf16 )/sizeof(SQLWCHAR);
@@ -4646,7 +4646,7 @@ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self)
4646
4646
  }
4647
4647
  col_metadata_args->stmt_res = stmt_res;
4648
4648
 
4649
- #ifdef UNICODE_SUPPORT_VERSION
4649
+ #ifdef UNICODE_SUPPORT_VERSION_H
4650
4650
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLProcedureColumns_helper, col_metadata_args,
4651
4651
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
4652
4652
  rc = col_metadata_args->rc;
@@ -4726,7 +4726,7 @@ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self)
4726
4726
  VALUE r_owner = Qnil;
4727
4727
  VALUE r_proc_name = Qnil;
4728
4728
 
4729
- #ifdef UNICODE_SUPPORT_VERSION
4729
+ #ifdef UNICODE_SUPPORT_VERSION_H
4730
4730
  VALUE r_qualifier_utf16 = Qnil;
4731
4731
  VALUE r_owner_utf16 = Qnil;
4732
4732
  VALUE r_proc_name_utf16 = Qnil;
@@ -4772,7 +4772,7 @@ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self)
4772
4772
  return_value = Qfalse;
4773
4773
  } else {
4774
4774
  if (!NIL_P(r_qualifier)) {
4775
- #ifdef UNICODE_SUPPORT_VERSION
4775
+ #ifdef UNICODE_SUPPORT_VERSION_H
4776
4776
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4777
4777
  proc_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4778
4778
  proc_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4782,7 +4782,7 @@ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self)
4782
4782
  #endif
4783
4783
  }
4784
4784
  if (!NIL_P(r_owner)) {
4785
- #ifdef UNICODE_SUPPORT_VERSION
4785
+ #ifdef UNICODE_SUPPORT_VERSION_H
4786
4786
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4787
4787
  proc_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4788
4788
  proc_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4792,7 +4792,7 @@ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self)
4792
4792
  #endif
4793
4793
  }
4794
4794
  if (!NIL_P(r_proc_name)) {
4795
- #ifdef UNICODE_SUPPORT_VERSION
4795
+ #ifdef UNICODE_SUPPORT_VERSION_H
4796
4796
  r_proc_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_proc_name );
4797
4797
  proc_metadata_args->proc_name = (SQLWCHAR*) RSTRING_PTR( r_proc_name_utf16 );
4798
4798
  proc_metadata_args->proc_name_len = (SQLSMALLINT) RSTRING_LEN( r_proc_name_utf16 )/sizeof(SQLWCHAR);
@@ -4803,7 +4803,7 @@ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self)
4803
4803
  }
4804
4804
  proc_metadata_args->stmt_res = stmt_res;
4805
4805
 
4806
- #ifdef UNICODE_SUPPORT_VERSION
4806
+ #ifdef UNICODE_SUPPORT_VERSION_H
4807
4807
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLProcedures_helper, proc_metadata_args,
4808
4808
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res);
4809
4809
  rc = proc_metadata_args->rc;
@@ -4898,7 +4898,7 @@ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self)
4898
4898
  VALUE r_qualifier = Qnil;
4899
4899
  VALUE r_owner = Qnil;
4900
4900
  VALUE r_table_name = Qnil;
4901
- #ifdef UNICODE_SUPPORT_VERSION
4901
+ #ifdef UNICODE_SUPPORT_VERSION_H
4902
4902
  VALUE r_qualifier_utf16 = Qnil;
4903
4903
  VALUE r_owner_utf16 = Qnil;
4904
4904
  VALUE r_table_name_utf16 = Qnil;
@@ -4946,7 +4946,7 @@ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self)
4946
4946
  return_value = Qfalse;
4947
4947
  } else {
4948
4948
  if (!NIL_P(r_qualifier)) {
4949
- #ifdef UNICODE_SUPPORT_VERSION
4949
+ #ifdef UNICODE_SUPPORT_VERSION_H
4950
4950
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
4951
4951
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
4952
4952
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -4956,7 +4956,7 @@ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self)
4956
4956
  #endif
4957
4957
  }
4958
4958
  if (!NIL_P(r_owner)) {
4959
- #ifdef UNICODE_SUPPORT_VERSION
4959
+ #ifdef UNICODE_SUPPORT_VERSION_H
4960
4960
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
4961
4961
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
4962
4962
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -4966,7 +4966,7 @@ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self)
4966
4966
  #endif
4967
4967
  }
4968
4968
  if (!NIL_P(r_table_name)) {
4969
- #ifdef UNICODE_SUPPORT_VERSION
4969
+ #ifdef UNICODE_SUPPORT_VERSION_H
4970
4970
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
4971
4971
  col_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
4972
4972
  col_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -4980,7 +4980,7 @@ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self)
4980
4980
  }
4981
4981
  col_metadata_args->stmt_res = stmt_res;
4982
4982
 
4983
- #ifdef UNICODE_SUPPORT_VERSION
4983
+ #ifdef UNICODE_SUPPORT_VERSION_H
4984
4984
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLSpecialColumns_helper, col_metadata_args,
4985
4985
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
4986
4986
  rc = col_metadata_args->rc;
@@ -5096,7 +5096,7 @@ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self)
5096
5096
  VALUE r_owner = Qnil;
5097
5097
  VALUE r_table_name = Qnil;
5098
5098
  VALUE r_unique = Qnil;
5099
- #ifdef UNICODE_SUPPORT_VERSION
5099
+ #ifdef UNICODE_SUPPORT_VERSION_H
5100
5100
  VALUE r_qualifier_utf16 = Qnil;
5101
5101
  VALUE r_owner_utf16 = Qnil;
5102
5102
  VALUE r_table_name_utf16 = Qnil;
@@ -5142,7 +5142,7 @@ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self)
5142
5142
  return_value = Qfalse;
5143
5143
  } else {
5144
5144
  if (!NIL_P(r_qualifier)) {
5145
- #ifdef UNICODE_SUPPORT_VERSION
5145
+ #ifdef UNICODE_SUPPORT_VERSION_H
5146
5146
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
5147
5147
  col_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
5148
5148
  col_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -5152,7 +5152,7 @@ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self)
5152
5152
  #endif
5153
5153
  }
5154
5154
  if (!NIL_P(r_owner)) {
5155
- #ifdef UNICODE_SUPPORT_VERSION
5155
+ #ifdef UNICODE_SUPPORT_VERSION_H
5156
5156
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
5157
5157
  col_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
5158
5158
  col_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -5162,7 +5162,7 @@ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self)
5162
5162
  #endif
5163
5163
  }
5164
5164
  if (!NIL_P(r_table_name)) {
5165
- #ifdef UNICODE_SUPPORT_VERSION
5165
+ #ifdef UNICODE_SUPPORT_VERSION_H
5166
5166
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
5167
5167
  col_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
5168
5168
  col_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -5176,7 +5176,7 @@ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self)
5176
5176
  }
5177
5177
  col_metadata_args->stmt_res = stmt_res;
5178
5178
 
5179
- #ifdef UNICODE_SUPPORT_VERSION
5179
+ #ifdef UNICODE_SUPPORT_VERSION_H
5180
5180
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLStatistics_helper, col_metadata_args,
5181
5181
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5182
5182
  rc = col_metadata_args->rc;
@@ -5258,7 +5258,7 @@ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self)
5258
5258
  VALUE r_qualifier = Qnil;
5259
5259
  VALUE r_owner = Qnil;
5260
5260
  VALUE r_table_name = Qnil;
5261
- #ifdef UNICODE_SUPPORT_VERSION
5261
+ #ifdef UNICODE_SUPPORT_VERSION_H
5262
5262
  VALUE r_qualifier_utf16 = Qnil;
5263
5263
  VALUE r_owner_utf16 = Qnil;
5264
5264
  VALUE r_table_name_utf16 = Qnil;
@@ -5303,7 +5303,7 @@ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self)
5303
5303
  return_value = Qfalse;
5304
5304
  } else {
5305
5305
  if (!NIL_P(r_qualifier)) {
5306
- #ifdef UNICODE_SUPPORT_VERSION
5306
+ #ifdef UNICODE_SUPPORT_VERSION_H
5307
5307
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
5308
5308
  table_privileges_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
5309
5309
  table_privileges_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -5313,7 +5313,7 @@ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self)
5313
5313
  #endif
5314
5314
  }
5315
5315
  if (!NIL_P(r_owner)) {
5316
- #ifdef UNICODE_SUPPORT_VERSION
5316
+ #ifdef UNICODE_SUPPORT_VERSION_H
5317
5317
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
5318
5318
  table_privileges_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
5319
5319
  table_privileges_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -5323,7 +5323,7 @@ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self)
5323
5323
  #endif
5324
5324
  }
5325
5325
  if (!NIL_P(r_table_name)) {
5326
- #ifdef UNICODE_SUPPORT_VERSION
5326
+ #ifdef UNICODE_SUPPORT_VERSION_H
5327
5327
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
5328
5328
  table_privileges_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
5329
5329
  table_privileges_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -5335,7 +5335,7 @@ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self)
5335
5335
 
5336
5336
  table_privileges_args->stmt_res = stmt_res;
5337
5337
 
5338
- #ifdef UNICODE_SUPPORT_VERSION
5338
+ #ifdef UNICODE_SUPPORT_VERSION_H
5339
5339
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLTablePrivileges_helper, table_privileges_args,
5340
5340
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5341
5341
  rc = table_privileges_args->rc;
@@ -5418,7 +5418,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5418
5418
  VALUE r_owner = Qnil;
5419
5419
  VALUE r_table_name = Qnil;
5420
5420
  VALUE r_table_type = Qnil;
5421
- #ifdef UNICODE_SUPPORT_VERSION
5421
+ #ifdef UNICODE_SUPPORT_VERSION_H
5422
5422
  VALUE r_qualifier_utf16 = Qnil;
5423
5423
  VALUE r_owner_utf16 = Qnil;
5424
5424
  VALUE r_table_name_utf16 = Qnil;
@@ -5467,7 +5467,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5467
5467
  return_value = Qfalse;
5468
5468
  } else {
5469
5469
  if (!NIL_P(r_qualifier)) {
5470
- #ifdef UNICODE_SUPPORT_VERSION
5470
+ #ifdef UNICODE_SUPPORT_VERSION_H
5471
5471
  r_qualifier_utf16 = _ruby_ibm_db_export_str_to_utf16( r_qualifier );
5472
5472
  table_metadata_args->qualifier = (SQLWCHAR*) RSTRING_PTR( r_qualifier_utf16 );
5473
5473
  table_metadata_args->qualifier_len = (SQLSMALLINT) RSTRING_LEN( r_qualifier_utf16 )/sizeof(SQLWCHAR);
@@ -5477,7 +5477,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5477
5477
  #endif
5478
5478
  }
5479
5479
  if (!NIL_P(r_owner)) {
5480
- #ifdef UNICODE_SUPPORT_VERSION
5480
+ #ifdef UNICODE_SUPPORT_VERSION_H
5481
5481
  r_owner_utf16 = _ruby_ibm_db_export_str_to_utf16( r_owner );
5482
5482
  table_metadata_args->owner = (SQLWCHAR*) RSTRING_PTR( r_owner_utf16 );
5483
5483
  table_metadata_args->owner_len = (SQLSMALLINT) RSTRING_LEN( r_owner_utf16 )/sizeof(SQLWCHAR);
@@ -5487,7 +5487,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5487
5487
  #endif
5488
5488
  }
5489
5489
  if (!NIL_P(r_table_name)) {
5490
- #ifdef UNICODE_SUPPORT_VERSION
5490
+ #ifdef UNICODE_SUPPORT_VERSION_H
5491
5491
  r_table_name_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_name );
5492
5492
  table_metadata_args->table_name = (SQLWCHAR*) RSTRING_PTR( r_table_name_utf16 );
5493
5493
  table_metadata_args->table_name_len = (SQLSMALLINT) RSTRING_LEN( r_table_name_utf16 )/sizeof(SQLWCHAR);
@@ -5497,7 +5497,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5497
5497
  #endif
5498
5498
  }
5499
5499
  if (!NIL_P(r_table_type)) {
5500
- #ifdef UNICODE_SUPPORT_VERSION
5500
+ #ifdef UNICODE_SUPPORT_VERSION_H
5501
5501
  r_table_type_utf16 = _ruby_ibm_db_export_str_to_utf16( r_table_type );
5502
5502
  table_metadata_args->table_type = (SQLWCHAR*) RSTRING_PTR( r_table_type_utf16 );
5503
5503
  table_metadata_args->table_type_len = (SQLSMALLINT) RSTRING_LEN( r_table_type_utf16 )/sizeof(SQLWCHAR);
@@ -5509,7 +5509,7 @@ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self)
5509
5509
 
5510
5510
  table_metadata_args->stmt_res = stmt_res;
5511
5511
 
5512
- #ifdef UNICODE_SUPPORT_VERSION
5512
+ #ifdef UNICODE_SUPPORT_VERSION_H
5513
5513
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLTables_helper, table_metadata_args,
5514
5514
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5515
5515
  rc = table_metadata_args->rc;
@@ -5591,7 +5591,7 @@ VALUE ibm_db_commit(int argc, VALUE *argv, VALUE self)
5591
5591
  end_X_args->handleType = SQL_HANDLE_DBC;
5592
5592
  end_X_args->completionType = SQL_COMMIT; /*Remeber you are Commiting the transaction*/
5593
5593
 
5594
- #ifdef UNICODE_SUPPORT_VERSION
5594
+ #ifdef UNICODE_SUPPORT_VERSION_H
5595
5595
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLEndTran, end_X_args,
5596
5596
  RUBY_UBF_IO, NULL);
5597
5597
  rc = end_X_args->rc;
@@ -5627,7 +5627,7 @@ static int _ruby_ibm_db_do_prepare(conn_handle *conn_res, VALUE stmt, stmt_handl
5627
5627
 
5628
5628
  VALUE error = Qnil;
5629
5629
 
5630
- #ifdef UNICODE_SUPPORT_VERSION
5630
+ #ifdef UNICODE_SUPPORT_VERSION_H
5631
5631
  VALUE stmt_utf16 = Qnil;
5632
5632
  #endif
5633
5633
 
@@ -5637,7 +5637,7 @@ static int _ruby_ibm_db_do_prepare(conn_handle *conn_res, VALUE stmt, stmt_handl
5637
5637
  if ( !NIL_P(stmt) ) {
5638
5638
  prepare_args = ALLOC( exec_cum_prepare_args );
5639
5639
  memset(prepare_args,'\0',sizeof(struct _ibm_db_exec_direct_args_struct));
5640
- #ifdef UNICODE_SUPPORT_VERSION
5640
+ #ifdef UNICODE_SUPPORT_VERSION_H
5641
5641
  stmt_utf16 = _ruby_ibm_db_export_str_to_utf16(stmt);
5642
5642
  prepare_args->stmt_string = (SQLWCHAR*) RSTRING_PTR(stmt_utf16);
5643
5643
  prepare_args->stmt_string_len = RSTRING_LEN(stmt_utf16)/sizeof(SQLWCHAR);
@@ -5671,7 +5671,7 @@ static int _ruby_ibm_db_do_prepare(conn_handle *conn_res, VALUE stmt, stmt_handl
5671
5671
  prepare_args->stmt_res = stmt_res;
5672
5672
 
5673
5673
  /* Prepare the stmt. The cursor type requested has already been set in _ruby_ibm_db_assign_options */
5674
- #ifdef UNICODE_SUPPORT_VERSION
5674
+ #ifdef UNICODE_SUPPORT_VERSION_H
5675
5675
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLPrepare_helper, prepare_args,
5676
5676
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5677
5677
  rc = prepare_args->rc;
@@ -5737,7 +5737,7 @@ static int _ruby_ibm_db_do_prepare(conn_handle *conn_res, VALUE stmt, stmt_handl
5737
5737
  VALUE ibm_db_exec(int argc, VALUE *argv, VALUE self)
5738
5738
  {
5739
5739
  VALUE stmt = Qnil;
5740
- #ifdef UNICODE_SUPPORT_VERSION
5740
+ #ifdef UNICODE_SUPPORT_VERSION_H
5741
5741
  VALUE stmt_utf16 = Qnil;
5742
5742
  #endif
5743
5743
  VALUE connection = Qnil;
@@ -5769,7 +5769,7 @@ VALUE ibm_db_exec(int argc, VALUE *argv, VALUE self)
5769
5769
  exec_direct_args = ALLOC( exec_cum_prepare_args );
5770
5770
  memset(exec_direct_args,'\0',sizeof(struct _ibm_db_exec_direct_args_struct));
5771
5771
 
5772
- #ifdef UNICODE_SUPPORT_VERSION
5772
+ #ifdef UNICODE_SUPPORT_VERSION_H
5773
5773
  stmt_utf16 = _ruby_ibm_db_export_str_to_utf16(stmt);
5774
5774
  exec_direct_args->stmt_string = (SQLWCHAR*)RSTRING_PTR(stmt_utf16);
5775
5775
  exec_direct_args->stmt_string_len = RSTRING_LEN(stmt_utf16)/sizeof(SQLWCHAR); /*RSTRING_LEN returns number of bytes*/
@@ -5813,7 +5813,7 @@ VALUE ibm_db_exec(int argc, VALUE *argv, VALUE self)
5813
5813
  exec_direct_args->stmt_res = stmt_res;
5814
5814
 
5815
5815
 
5816
- #ifdef UNICODE_SUPPORT_VERSION
5816
+ #ifdef UNICODE_SUPPORT_VERSION_H
5817
5817
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLExecDirect_helper, exec_direct_args,
5818
5818
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5819
5819
  rc = exec_direct_args->rc;
@@ -5872,7 +5872,7 @@ VALUE ibm_db_free_result(int argc, VALUE *argv, VALUE self)
5872
5872
  stmt_handle *stmt_res = NULL;
5873
5873
  free_stmt_args *freeStmt_args = NULL;
5874
5874
 
5875
- #ifdef UNICODE_SUPPORT_VERSION
5875
+ #ifdef UNICODE_SUPPORT_VERSION_H
5876
5876
  char *err_str = NULL;
5877
5877
  #endif
5878
5878
 
@@ -5887,7 +5887,7 @@ VALUE ibm_db_free_result(int argc, VALUE *argv, VALUE self)
5887
5887
  freeStmt_args->stmt_res = stmt_res;
5888
5888
  freeStmt_args->option = SQL_CLOSE;
5889
5889
 
5890
- #ifdef UNICODE_SUPPORT_VERSION
5890
+ #ifdef UNICODE_SUPPORT_VERSION_H
5891
5891
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLFreeStmt_helper, freeStmt_args,
5892
5892
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
5893
5893
  rc = freeStmt_args->rc;
@@ -5900,7 +5900,7 @@ VALUE ibm_db_free_result(int argc, VALUE *argv, VALUE self)
5900
5900
 
5901
5901
  if ( rc == SQL_ERROR ) {
5902
5902
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 1 );
5903
- #ifdef UNICODE_SUPPORT_VERSION
5903
+ #ifdef UNICODE_SUPPORT_VERSION_H
5904
5904
  err_str = RSTRING_PTR(
5905
5905
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
5906
5906
  stmt_res->ruby_stmt_err_msg_len )
@@ -5978,7 +5978,7 @@ VALUE ibm_db_prepare(int argc, VALUE *argv, VALUE self)
5978
5978
  conn_handle *conn_res;
5979
5979
  stmt_handle *stmt_res;
5980
5980
 
5981
- #ifdef UNICODE_SUPPORT_VERSION
5981
+ #ifdef UNICODE_SUPPORT_VERSION_H
5982
5982
  char *err_str = NULL;
5983
5983
  #endif
5984
5984
 
@@ -6012,7 +6012,7 @@ VALUE ibm_db_prepare(int argc, VALUE *argv, VALUE self)
6012
6012
  _ruby_ibm_db_free_stmt_struct(stmt_res);
6013
6013
  stmt_res = NULL;
6014
6014
 
6015
- #ifdef UNICODE_SUPPORT_VERSION
6015
+ #ifdef UNICODE_SUPPORT_VERSION_H
6016
6016
  err_str = RSTRING_PTR( _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_msg,
6017
6017
  DB2_MAX_ERR_MSG_LEN * sizeof(SQLWCHAR) )
6018
6018
  );
@@ -6078,13 +6078,13 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6078
6078
  int rc;
6079
6079
  int origlen = 0;
6080
6080
  int is_known_type = 1;
6081
- #ifdef UNICODE_SUPPORT_VERSION
6081
+ #ifdef UNICODE_SUPPORT_VERSION_H
6082
6082
  int is_binary = 0; /*Indicates if the column is either SQL_BLOB, SQL_BINARY, SQL_VARBINARY or SQL_LONGVARBINARY*/
6083
6083
  #endif
6084
6084
 
6085
6085
  SQLPOINTER tmp_str;
6086
6086
 
6087
- #ifdef UNICODE_SUPPORT_VERSION
6087
+ #ifdef UNICODE_SUPPORT_VERSION_H
6088
6088
  VALUE bindData_utf16;
6089
6089
  VALUE tmpBuff;
6090
6090
  #endif
@@ -6106,7 +6106,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6106
6106
 
6107
6107
  switch(TYPE(*bind_data)) {
6108
6108
  case T_BIGNUM:
6109
- #ifdef UNICODE_SUPPORT_VERSION
6109
+ #ifdef UNICODE_SUPPORT_VERSION_H
6110
6110
  tmpBuff = rb_big2str(*bind_data,10);
6111
6111
  tmp_str = (SQLCHAR *) RSTRING_PTR(tmpBuff);
6112
6112
  curr->ivalue = RSTRING_LEN(tmpBuff);
@@ -6186,7 +6186,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6186
6186
  break;
6187
6187
 
6188
6188
  case T_STRING:
6189
- #ifdef UNICODE_SUPPORT_VERSION
6189
+ #ifdef UNICODE_SUPPORT_VERSION_H
6190
6190
  if( curr->data_type == SQL_BLOB || curr->data_type == SQL_LONGVARBINARY || curr->data_type == SQL_VARBINARY ||
6191
6191
  curr->data_type == SQL_BINARY || curr->data_type == SQL_XML ){
6192
6192
  is_binary = 1;
@@ -6213,7 +6213,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6213
6213
  * given then use BUFSIZ to return the string.
6214
6214
  */
6215
6215
  if ( curr->size <= 0 ) {
6216
- #ifdef UNICODE_SUPPORT_VERSION
6216
+ #ifdef UNICODE_SUPPORT_VERSION_H
6217
6217
  if( is_binary ) {
6218
6218
  if (curr->ivalue < curr->param_size ) {
6219
6219
  curr->ivalue = curr->param_size;
@@ -6237,7 +6237,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6237
6237
  #endif
6238
6238
  } else {
6239
6239
  if( curr->param_type == SQL_PARAM_INPUT_OUTPUT ) {
6240
- #ifdef UNICODE_SUPPORT_VERSION
6240
+ #ifdef UNICODE_SUPPORT_VERSION_H
6241
6241
  if( is_binary ) {
6242
6242
  if( curr->size > curr->ivalue ) {
6243
6243
  curr->ivalue = curr->size + 1;
@@ -6259,7 +6259,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6259
6259
  }
6260
6260
  #endif
6261
6261
  } else {
6262
- #ifdef UNICODE_SUPPORT_VERSION
6262
+ #ifdef UNICODE_SUPPORT_VERSION_H
6263
6263
  if( is_binary ) {
6264
6264
  curr->ivalue = curr->size + 1;
6265
6265
  } else {
@@ -6278,7 +6278,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6278
6278
  }
6279
6279
  }
6280
6280
 
6281
- #ifdef UNICODE_SUPPORT_VERSION
6281
+ #ifdef UNICODE_SUPPORT_VERSION_H
6282
6282
  if( is_binary ){
6283
6283
  curr->svalue = (SQLCHAR *) ALLOC_N(SQLCHAR, curr->ivalue);
6284
6284
  } else {
@@ -6310,7 +6310,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6310
6310
  paramValuePtr = (SQLPOINTER)&(curr);
6311
6311
  #endif
6312
6312
  }
6313
- #ifdef UNICODE_SUPPORT_VERSION
6313
+ #ifdef UNICODE_SUPPORT_VERSION_H
6314
6314
  valueType = SQL_C_WCHAR;
6315
6315
  #else
6316
6316
  valueType = SQL_C_CHAR;
@@ -6359,7 +6359,7 @@ static int _ruby_ibm_db_bind_parameter_helper(stmt_handle *stmt_res, param_node
6359
6359
  }
6360
6360
  }
6361
6361
  bindParameter_args->buff_length = curr->ivalue;
6362
- #ifdef UNICODE_SUPPORT_VERSION
6362
+ #ifdef UNICODE_SUPPORT_VERSION_H
6363
6363
  valueType = SQL_C_WCHAR;
6364
6364
  #else
6365
6365
  valueType = SQL_C_CHAR;
@@ -6421,7 +6421,7 @@ static int _ruby_ibm_db_bind_data( stmt_handle *stmt_res, param_node *curr, VALU
6421
6421
  }
6422
6422
  curr->bind_indicator = 0;
6423
6423
 
6424
- #ifdef UNICODE_SUPPORT_VERSION
6424
+ #ifdef UNICODE_SUPPORT_VERSION_H
6425
6425
  curr->svalue = (SQLCHAR *) RSTRING_PTR(*bind_data);
6426
6426
  curr->ivalue = RSTRING_LEN(*bind_data);
6427
6427
  #else
@@ -6462,7 +6462,7 @@ static int _ruby_ibm_db_bind_param_list(stmt_handle *stmt_res, VALUE *error ) {
6462
6462
 
6463
6463
  if ( rc == SQL_ERROR ) {
6464
6464
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6465
- #ifdef UNICODE_SUPPORT_VERSION
6465
+ #ifdef UNICODE_SUPPORT_VERSION_H
6466
6466
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 1: "),
6467
6467
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6468
6468
  stmt_res->ruby_stmt_err_msg_len )
@@ -6471,7 +6471,7 @@ static int _ruby_ibm_db_bind_param_list(stmt_handle *stmt_res, VALUE *error ) {
6471
6471
  *error = rb_str_cat2(rb_str_new2("Binding Error 1: "), stmt_res->ruby_stmt_err_msg );
6472
6472
  #endif
6473
6473
  } else {
6474
- #ifdef UNICODE_SUPPORT_VERSION
6474
+ #ifdef UNICODE_SUPPORT_VERSION_H
6475
6475
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 1: <error message could not be retrieved>");
6476
6476
  #else
6477
6477
  *error = rb_str_new2("Binding Error 1: <error message could not be retrieved>");
@@ -6533,7 +6533,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6533
6533
  if ( rc == SQL_ERROR ) {
6534
6534
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 0 );
6535
6535
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6536
- #ifdef UNICODE_SUPPORT_VERSION
6536
+ #ifdef UNICODE_SUPPORT_VERSION_H
6537
6537
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr( "Describe Param Failed: " ),
6538
6538
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6539
6539
  stmt_res->ruby_stmt_err_msg_len )
@@ -6542,7 +6542,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6542
6542
  *error = rb_str_cat2(rb_str_new2("Describe Param Failed: "), stmt_res->ruby_stmt_err_msg );
6543
6543
  #endif
6544
6544
  } else {
6545
- #ifdef UNICODE_SUPPORT_VERSION
6545
+ #ifdef UNICODE_SUPPORT_VERSION_H
6546
6546
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Describe Param Failed: <error message could not be retrieved>");
6547
6547
  #else
6548
6548
  *error = rb_str_new2("Describe Param Failed: <error message could not be retrieved>");
@@ -6569,7 +6569,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6569
6569
 
6570
6570
  if ( rc == SQL_ERROR ) {
6571
6571
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6572
- #ifdef UNICODE_SUPPORT_VERSION
6572
+ #ifdef UNICODE_SUPPORT_VERSION_H
6573
6573
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 2: "),
6574
6574
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6575
6575
  stmt_res->ruby_stmt_err_msg_len )
@@ -6578,7 +6578,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6578
6578
  *error = rb_str_cat2(rb_str_new2("Binding Error 2: "), stmt_res->ruby_stmt_err_msg );
6579
6579
  #endif
6580
6580
  } else {
6581
- #ifdef UNICODE_SUPPORT_VERSION
6581
+ #ifdef UNICODE_SUPPORT_VERSION_H
6582
6582
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 2: <error message could not be retrieved>");
6583
6583
  #else
6584
6584
  *error = rb_str_new2("Binding Error 2: <error message could not be retrieved>");
@@ -6599,7 +6599,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6599
6599
 
6600
6600
  if ( rc == SQL_ERROR ) {
6601
6601
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6602
- #ifdef UNICODE_SUPPORT_VERSION
6602
+ #ifdef UNICODE_SUPPORT_VERSION_H
6603
6603
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 2: "),
6604
6604
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6605
6605
  stmt_res->ruby_stmt_err_msg_len )
@@ -6608,7 +6608,7 @@ static int _ruby_ibm_db_execute_helper2(stmt_handle *stmt_res, VALUE *data, int
6608
6608
  *error = rb_str_cat2(rb_str_new2("Binding Error 2: "), stmt_res->ruby_stmt_err_msg );
6609
6609
  #endif
6610
6610
  } else {
6611
- #ifdef UNICODE_SUPPORT_VERSION
6611
+ #ifdef UNICODE_SUPPORT_VERSION_H
6612
6612
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Binding Error 2: <error message could not be retrieved>");
6613
6613
  #else
6614
6614
  *error = rb_str_new2("Binding Error 2: <error message could not be retrieved>");
@@ -6639,7 +6639,7 @@ void var_assign(char *name, VALUE value) {
6639
6639
  inspect = rb_intern("inspect");
6640
6640
  value = rb_funcall(value, inspect, 0);
6641
6641
 
6642
- #ifdef UNICODE_SUPPORT_VERSION
6642
+ #ifdef UNICODE_SUPPORT_VERSION_H
6643
6643
  expr = RSTRING_PTR(value);
6644
6644
  expr_len = RSTRING_LEN(value);
6645
6645
  #else
@@ -6677,7 +6677,7 @@ static VALUE _ruby_ibm_db_desc_and_bind_param_list(stmt_bind_array *bind_array,
6677
6677
  numOpts = bind_array->num;
6678
6678
  } else if (numOpts < bind_array->num) {
6679
6679
  /* If there are less params passed in, than are present -- Error */
6680
- #ifdef UNICODE_SUPPORT_VERSION
6680
+ #ifdef UNICODE_SUPPORT_VERSION_H
6681
6681
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Number of params passed in are less than bound parameters");
6682
6682
  #else
6683
6683
  *error = rb_str_new2("Number of params passed in are less than bound parameters");
@@ -6747,7 +6747,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6747
6747
  ruby_xfree( num_params_args );
6748
6748
  num_params_args = NULL;
6749
6749
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6750
- #ifdef UNICODE_SUPPORT_VERSION
6750
+ #ifdef UNICODE_SUPPORT_VERSION_H
6751
6751
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Execute Failed due to: "),
6752
6752
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6753
6753
  stmt_res->ruby_stmt_err_msg_len )
@@ -6756,7 +6756,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6756
6756
  *error = rb_str_cat2(rb_str_new2("Execute Failed due to: "), stmt_res->ruby_stmt_err_msg );
6757
6757
  #endif
6758
6758
  } else {
6759
- #ifdef UNICODE_SUPPORT_VERSION
6759
+ #ifdef UNICODE_SUPPORT_VERSION_H
6760
6760
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Execute Failed due to: <error message could not be retrieved>");
6761
6761
  #else
6762
6762
  *error = rb_str_new2("Execute Failed due to: <error message could not be retrieved>");
@@ -6780,7 +6780,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6780
6780
  /* Make sure IBM_DB.bind_param has been called */
6781
6781
  /* If the param list is NULL -- ERROR */
6782
6782
  if (TYPE( *(bind_array->parameters_array) ) != T_ARRAY) {
6783
- #ifdef UNICODE_SUPPORT_VERSION
6783
+ #ifdef UNICODE_SUPPORT_VERSION_H
6784
6784
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Param is not an array");
6785
6785
  #else
6786
6786
  *error = rb_str_new2("Param is not an array");
@@ -6805,7 +6805,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6805
6805
  /* No additional params passed in. Use values already bound. */
6806
6806
  if ( num > stmt_res->num_params ) {
6807
6807
  /* More parameters than we expected */
6808
- #ifdef UNICODE_SUPPORT_VERSION
6808
+ #ifdef UNICODE_SUPPORT_VERSION_H
6809
6809
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Number of params passed are more than bound parameters");
6810
6810
  #else
6811
6811
  *error = rb_str_new2("Number of params passed are more than bound parameters");
@@ -6814,7 +6814,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6814
6814
  return Qnil;
6815
6815
  } else if ( num < stmt_res->num_params ) {
6816
6816
  /* Fewer parameters than we expected */
6817
- #ifdef UNICODE_SUPPORT_VERSION
6817
+ #ifdef UNICODE_SUPPORT_VERSION_H
6818
6818
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Number of params passed are less than bound parameters");
6819
6819
  #else
6820
6820
  *error = rb_str_new2("Number of params passed are less than bound parameters");
@@ -6825,7 +6825,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6825
6825
 
6826
6826
  /* Param cache node list is empty -- No params bound */
6827
6827
  if ( stmt_res->head_cache_list == NULL ) {
6828
- #ifdef UNICODE_SUPPORT_VERSION
6828
+ #ifdef UNICODE_SUPPORT_VERSION_H
6829
6829
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Parameters not bound");
6830
6830
  #else
6831
6831
  *error = rb_str_new2("Parameters not bound");
@@ -6852,7 +6852,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6852
6852
  if ( rc == SQL_ERROR ) {
6853
6853
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 0 );
6854
6854
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6855
- #ifdef UNICODE_SUPPORT_VERSION
6855
+ #ifdef UNICODE_SUPPORT_VERSION_H
6856
6856
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Statement Execute Failed: "),
6857
6857
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6858
6858
  stmt_res->ruby_stmt_err_msg_len )
@@ -6861,7 +6861,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6861
6861
  *error = rb_str_cat2(rb_str_new2("Statement Execute Failed: "), stmt_res->ruby_stmt_err_msg );
6862
6862
  #endif
6863
6863
  } else {
6864
- #ifdef UNICODE_SUPPORT_VERSION
6864
+ #ifdef UNICODE_SUPPORT_VERSION_H
6865
6865
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Statement Execute Failed: <error message could not be retrieved>");
6866
6866
  #else
6867
6867
  *error = rb_str_new2("Statement Execute Failed: <error message could not be retrieved>");
@@ -6887,7 +6887,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6887
6887
  if ( rc == SQL_ERROR ) {
6888
6888
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 0 );
6889
6889
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6890
- #ifdef UNICODE_SUPPORT_VERSION
6890
+ #ifdef UNICODE_SUPPORT_VERSION_H
6891
6891
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr( "Sending data failed: "),
6892
6892
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6893
6893
  stmt_res->ruby_stmt_err_msg_len )
@@ -6896,7 +6896,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6896
6896
  *error = rb_str_cat2(rb_str_new2("Sending data failed: "), stmt_res->ruby_stmt_err_msg );
6897
6897
  #endif
6898
6898
  } else {
6899
- #ifdef UNICODE_SUPPORT_VERSION
6899
+ #ifdef UNICODE_SUPPORT_VERSION_H
6900
6900
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Sending data failed: <error message could not be retrieved>");
6901
6901
  #else
6902
6902
  *error = rb_str_new2("Sending data failed: <error message could not be retrieved>");
@@ -6921,7 +6921,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6921
6921
  if ( rc == SQL_ERROR ) {
6922
6922
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 0 );
6923
6923
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
6924
- #ifdef UNICODE_SUPPORT_VERSION
6924
+ #ifdef UNICODE_SUPPORT_VERSION_H
6925
6925
  *error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr( "Sending data failed: "),
6926
6926
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
6927
6927
  stmt_res->ruby_stmt_err_msg_len )
@@ -6930,7 +6930,7 @@ static VALUE _ruby_ibm_db_execute_helper(stmt_bind_array *bind_array) {
6930
6930
  *error = rb_str_cat2(rb_str_new2("Sending data failed: "), stmt_res->ruby_stmt_err_msg );
6931
6931
  #endif
6932
6932
  } else {
6933
- #ifdef UNICODE_SUPPORT_VERSION
6933
+ #ifdef UNICODE_SUPPORT_VERSION_H
6934
6934
  *error = _ruby_ibm_db_export_char_to_utf8_rstr("Sending data failed: <error message could not be retrieved>");
6935
6935
  #else
6936
6936
  *error = rb_str_new2("Sending data failed: <error message could not be retrieved>");
@@ -7005,7 +7005,7 @@ VALUE ibm_db_execute(int argc, VALUE *argv, VALUE self)
7005
7005
  bind_array->num = 0;
7006
7006
  bind_array->error = &error;
7007
7007
 
7008
- #ifdef UNICODE_SUPPORT_VERSION
7008
+ #ifdef UNICODE_SUPPORT_VERSION_H
7009
7009
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_execute_helper, bind_array,
7010
7010
  RUBY_UBF_IO, NULL );
7011
7011
  ret_value = bind_array->return_value;
@@ -7071,7 +7071,7 @@ VALUE ibm_db_execute(int argc, VALUE *argv, VALUE self)
7071
7071
  var_assign(tmp_curr->varname, rb_float_new(tmp_curr->fvalue));
7072
7072
  break;
7073
7073
  case SQL_XML:
7074
- #ifdef UNICODE_SUPPORT_VERSION
7074
+ #ifdef UNICODE_SUPPORT_VERSION_H
7075
7075
  var_assign(tmp_curr->varname,rb_str_new2((char *) "")); /*Ensure it is a string object*/
7076
7076
  if( tmp_curr-> size > 0 && tmp_curr->bind_indicator > tmp_curr->size ){
7077
7077
  rb_funcall(rb_eval_string(tmp_curr->varname), rb_intern("replace"), 1, _ruby_ibm_db_export_sqlchar_to_utf8_rstr( (SQLCHAR *) tmp_curr->svalue, tmp_curr->size ));
@@ -7093,7 +7093,7 @@ VALUE ibm_db_execute(int argc, VALUE *argv, VALUE self)
7093
7093
  }
7094
7094
  break;
7095
7095
  default:
7096
- #ifdef UNICODE_SUPPORT_VERSION
7096
+ #ifdef UNICODE_SUPPORT_VERSION_H
7097
7097
  var_assign(tmp_curr->varname,rb_str_new2((char *) "")); /*Ensure it is a string object*/
7098
7098
  if( tmp_curr-> size > 0 && tmp_curr->bind_indicator > (tmp_curr->size * sizeof(SQLWCHAR))+ 2 ){
7099
7099
  rb_funcall(rb_eval_string(tmp_curr->varname), rb_intern("replace"), 1, _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( (SQLWCHAR *) tmp_curr->svalue, (tmp_curr->size * sizeof(SQLWCHAR)) + 2 ));
@@ -7176,7 +7176,7 @@ VALUE ibm_db_conn_errormsg(int argc, VALUE *argv, VALUE self)
7176
7176
  return Qnil;
7177
7177
  }
7178
7178
 
7179
- #ifdef UNICODE_SUPPORT_VERSION
7179
+ #ifdef UNICODE_SUPPORT_VERSION_H
7180
7180
  return_str = ALLOC_N( SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
7181
7181
  memset(return_str, '\0', (DB2_MAX_ERR_MSG_LEN + 1 ) * sizeof(SQLWCHAR) );
7182
7182
  #else
@@ -7191,7 +7191,7 @@ VALUE ibm_db_conn_errormsg(int argc, VALUE *argv, VALUE self)
7191
7191
 
7192
7192
  conn_res->errormsg_recno_tracker++;
7193
7193
 
7194
- #ifdef UNICODE_SUPPORT_VERSION
7194
+ #ifdef UNICODE_SUPPORT_VERSION_H
7195
7195
  ret_val = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( (SQLWCHAR *)return_str, return_str_len );
7196
7196
  #else
7197
7197
  ret_val = rb_str_new2(return_str);
@@ -7200,7 +7200,7 @@ VALUE ibm_db_conn_errormsg(int argc, VALUE *argv, VALUE self)
7200
7200
 
7201
7201
  return ret_val;
7202
7202
  } else {
7203
- #ifdef UNICODE_SUPPORT_VERSION
7203
+ #ifdef UNICODE_SUPPORT_VERSION_H
7204
7204
  return _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( IBM_DB_G(__ruby_conn_err_msg), DB2_MAX_ERR_MSG_LEN * sizeof(SQLWCHAR) );
7205
7205
  #else
7206
7206
  return rb_str_new2(IBM_DB_G(__ruby_conn_err_msg));
@@ -7246,7 +7246,7 @@ VALUE ibm_db_stmt_errormsg(int argc, VALUE *argv, VALUE self)
7246
7246
  if (!NIL_P(stmt)) {
7247
7247
  Data_Get_Struct(stmt, stmt_handle, stmt_res);
7248
7248
 
7249
- #ifdef UNICODE_SUPPORT_VERSION
7249
+ #ifdef UNICODE_SUPPORT_VERSION_H
7250
7250
  return_str = ALLOC_N(SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
7251
7251
  memset(return_str, '\0', (DB2_MAX_ERR_MSG_LEN + 1 ) * sizeof(SQLWCHAR) );
7252
7252
  #else
@@ -7262,7 +7262,7 @@ VALUE ibm_db_stmt_errormsg(int argc, VALUE *argv, VALUE self)
7262
7262
 
7263
7263
  stmt_res->errormsg_recno_tracker++;
7264
7264
 
7265
- #ifdef UNICODE_SUPPORT_VERSION
7265
+ #ifdef UNICODE_SUPPORT_VERSION_H
7266
7266
  ret_val = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, return_str_len );
7267
7267
  #else
7268
7268
  ret_val = rb_str_new2( return_str );
@@ -7271,7 +7271,7 @@ VALUE ibm_db_stmt_errormsg(int argc, VALUE *argv, VALUE self)
7271
7271
 
7272
7272
  return ret_val;
7273
7273
  } else {
7274
- #ifdef UNICODE_SUPPORT_VERSION
7274
+ #ifdef UNICODE_SUPPORT_VERSION_H
7275
7275
  return _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( IBM_DB_G(__ruby_stmt_err_msg), DB2_MAX_ERR_MSG_LEN * sizeof(SQLWCHAR) );
7276
7276
  #else
7277
7277
  return rb_str_new2(IBM_DB_G(__ruby_stmt_err_msg));
@@ -7330,7 +7330,7 @@ VALUE ibm_db_conn_error(int argc, VALUE *argv, VALUE self)
7330
7330
  return Qnil;
7331
7331
  }
7332
7332
 
7333
- #ifdef UNICODE_SUPPORT_VERSION
7333
+ #ifdef UNICODE_SUPPORT_VERSION_H
7334
7334
  return_str = ALLOC_N(SQLWCHAR, SQL_SQLSTATE_SIZE + 1);
7335
7335
  memset(return_str, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
7336
7336
  #else
@@ -7347,7 +7347,7 @@ VALUE ibm_db_conn_error(int argc, VALUE *argv, VALUE self)
7347
7347
 
7348
7348
  conn_res->error_recno_tracker++;
7349
7349
 
7350
- #ifdef UNICODE_SUPPORT_VERSION
7350
+ #ifdef UNICODE_SUPPORT_VERSION_H
7351
7351
  ret_val = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR) );
7352
7352
  #else
7353
7353
  ret_val = rb_str_new2( return_str );
@@ -7356,7 +7356,7 @@ VALUE ibm_db_conn_error(int argc, VALUE *argv, VALUE self)
7356
7356
 
7357
7357
  return ret_val;
7358
7358
  } else {
7359
- #ifdef UNICODE_SUPPORT_VERSION
7359
+ #ifdef UNICODE_SUPPORT_VERSION_H
7360
7360
  return _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( IBM_DB_G(__ruby_conn_err_state),
7361
7361
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7362
7362
  );
@@ -7406,7 +7406,7 @@ VALUE ibm_db_stmt_error(int argc, VALUE *argv, VALUE self)
7406
7406
  if (!NIL_P(stmt)) {
7407
7407
  Data_Get_Struct(stmt, stmt_handle, stmt_res);
7408
7408
 
7409
- #ifdef UNICODE_SUPPORT_VERSION
7409
+ #ifdef UNICODE_SUPPORT_VERSION_H
7410
7410
  return_str = ALLOC_N(SQLWCHAR, SQL_SQLSTATE_SIZE + 1);
7411
7411
  memset(return_str, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
7412
7412
  #else
@@ -7423,7 +7423,7 @@ VALUE ibm_db_stmt_error(int argc, VALUE *argv, VALUE self)
7423
7423
 
7424
7424
  stmt_res->error_recno_tracker++;
7425
7425
 
7426
- #ifdef UNICODE_SUPPORT_VERSION
7426
+ #ifdef UNICODE_SUPPORT_VERSION_H
7427
7427
  ret_val = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR) );
7428
7428
  #else
7429
7429
  ret_val = rb_str_new2( return_str );
@@ -7432,7 +7432,7 @@ VALUE ibm_db_stmt_error(int argc, VALUE *argv, VALUE self)
7432
7432
 
7433
7433
  return ret_val;
7434
7434
  } else {
7435
- #ifdef UNICODE_SUPPORT_VERSION
7435
+ #ifdef UNICODE_SUPPORT_VERSION_H
7436
7436
  return _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( IBM_DB_G(__ruby_stmt_err_state),
7437
7437
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7438
7438
  );
@@ -7498,7 +7498,7 @@ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self)
7498
7498
 
7499
7499
  if( conn_res->errorType != 1 ) {
7500
7500
  if( conn_res->ruby_error_msg != NULL ) {
7501
- #ifdef UNICODE_SUPPORT_VERSION
7501
+ #ifdef UNICODE_SUPPORT_VERSION_H
7502
7502
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_msg, conn_res->ruby_error_msg_len );
7503
7503
  #else
7504
7504
  return_value = rb_str_new2( conn_res->ruby_error_msg );
@@ -7509,13 +7509,13 @@ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self)
7509
7509
  } else {
7510
7510
 
7511
7511
  if( conn_res->errormsg_recno_tracker == 1 && conn_res->ruby_error_msg != NULL ) {
7512
- #ifdef UNICODE_SUPPORT_VERSION
7512
+ #ifdef UNICODE_SUPPORT_VERSION_H
7513
7513
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_msg, conn_res->ruby_error_msg_len );
7514
7514
  #else
7515
7515
  return_value = rb_str_new2( conn_res->ruby_error_msg );
7516
7516
  #endif
7517
7517
  } else {
7518
- #ifdef UNICODE_SUPPORT_VERSION
7518
+ #ifdef UNICODE_SUPPORT_VERSION_H
7519
7519
  return_str = ALLOC_N(SQLWCHAR, DB2_MAX_ERR_MSG_LEN+1);
7520
7520
  memset(return_str, '\0', (DB2_MAX_ERR_MSG_LEN + 1) * sizeof(SQLWCHAR) );
7521
7521
  #else
@@ -7530,7 +7530,7 @@ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self)
7530
7530
  conn_res->error_recno_tracker = conn_res->errormsg_recno_tracker;
7531
7531
  }
7532
7532
 
7533
- #ifdef UNICODE_SUPPORT_VERSION
7533
+ #ifdef UNICODE_SUPPORT_VERSION_H
7534
7534
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, return_str_len );
7535
7535
  #else
7536
7536
  return_value = rb_str_new2( return_str );
@@ -7543,13 +7543,13 @@ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self)
7543
7543
  Data_Get_Struct(conn_or_stmt, stmt_handle, stmt_res);
7544
7544
 
7545
7545
  if( stmt_res->errormsg_recno_tracker == 1 && stmt_res->ruby_stmt_err_msg != NULL ) {
7546
- #ifdef UNICODE_SUPPORT_VERSION
7546
+ #ifdef UNICODE_SUPPORT_VERSION_H
7547
7547
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg, stmt_res->ruby_stmt_err_msg_len );
7548
7548
  #else
7549
7549
  return_value = rb_str_new2( stmt_res->ruby_stmt_err_msg );
7550
7550
  #endif
7551
7551
  } else {
7552
- #ifdef UNICODE_SUPPORT_VERSION
7552
+ #ifdef UNICODE_SUPPORT_VERSION_H
7553
7553
  return_str = ALLOC_N(SQLWCHAR, DB2_MAX_ERR_MSG_LEN + 1 );
7554
7554
  memset(return_str, '\0', (DB2_MAX_ERR_MSG_LEN + 1 ) * sizeof(SQLWCHAR) );
7555
7555
  #else
@@ -7564,7 +7564,7 @@ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self)
7564
7564
  stmt_res->error_recno_tracker = stmt_res->errormsg_recno_tracker;
7565
7565
  }
7566
7566
 
7567
- #ifdef UNICODE_SUPPORT_VERSION
7567
+ #ifdef UNICODE_SUPPORT_VERSION_H
7568
7568
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, return_str_len );
7569
7569
  #else
7570
7570
  return_value = rb_str_new2( return_str );
@@ -7640,7 +7640,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7640
7640
 
7641
7641
  if( conn_res->errorType != 1 ) {
7642
7642
  if( conn_res->ruby_error_state != NULL ) {
7643
- #ifdef UNICODE_SUPPORT_VERSION
7643
+ #ifdef UNICODE_SUPPORT_VERSION_H
7644
7644
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_state,
7645
7645
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7646
7646
  );
@@ -7653,7 +7653,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7653
7653
  } else {
7654
7654
 
7655
7655
  if( conn_res->error_recno_tracker == 1 && conn_res->ruby_error_state != NULL ) {
7656
- #ifdef UNICODE_SUPPORT_VERSION
7656
+ #ifdef UNICODE_SUPPORT_VERSION_H
7657
7657
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( conn_res->ruby_error_state,
7658
7658
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7659
7659
  );
@@ -7662,7 +7662,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7662
7662
  #endif
7663
7663
  } else {
7664
7664
 
7665
- #ifdef UNICODE_SUPPORT_VERSION
7665
+ #ifdef UNICODE_SUPPORT_VERSION_H
7666
7666
  return_str = ALLOC_N(SQLWCHAR, SQL_SQLSTATE_SIZE + 1 );
7667
7667
  memset(return_str, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
7668
7668
  #else
@@ -7677,7 +7677,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7677
7677
  conn_res->errormsg_recno_tracker = conn_res->error_recno_tracker;
7678
7678
  }
7679
7679
 
7680
- #ifdef UNICODE_SUPPORT_VERSION
7680
+ #ifdef UNICODE_SUPPORT_VERSION_H
7681
7681
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str, SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR) );
7682
7682
  #else
7683
7683
  return_value = rb_str_new2( return_str );
@@ -7690,7 +7690,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7690
7690
  Data_Get_Struct(conn_or_stmt, stmt_handle, stmt_res);
7691
7691
 
7692
7692
  if( stmt_res->error_recno_tracker == 1 && stmt_res->ruby_stmt_err_state != NULL ) {
7693
- #ifdef UNICODE_SUPPORT_VERSION
7693
+ #ifdef UNICODE_SUPPORT_VERSION_H
7694
7694
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_state,
7695
7695
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7696
7696
  );
@@ -7699,7 +7699,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7699
7699
  #endif
7700
7700
  } else {
7701
7701
 
7702
- #ifdef UNICODE_SUPPORT_VERSION
7702
+ #ifdef UNICODE_SUPPORT_VERSION_H
7703
7703
  return_str = ALLOC_N(SQLWCHAR, SQL_SQLSTATE_SIZE + 1 );
7704
7704
  memset(return_str, '\0', (SQL_SQLSTATE_SIZE + 1) * sizeof(SQLWCHAR) );
7705
7705
  #else
@@ -7713,7 +7713,7 @@ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self)
7713
7713
  if(stmt_res->error_recno_tracker - stmt_res->errormsg_recno_tracker >= 1) {
7714
7714
  stmt_res->errormsg_recno_tracker = stmt_res->error_recno_tracker;
7715
7715
  }
7716
- #ifdef UNICODE_SUPPORT_VERSION
7716
+ #ifdef UNICODE_SUPPORT_VERSION_H
7717
7717
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( return_str,
7718
7718
  SQL_SQLSTATE_SIZE * sizeof(SQLWCHAR)
7719
7719
  );
@@ -7791,7 +7791,7 @@ VALUE ibm_db_next_result(int argc, VALUE *argv, VALUE self)
7791
7791
  nextresultparams->stmt_res = stmt_res;
7792
7792
  nextresultparams->new_hstmt = &new_hstmt;
7793
7793
 
7794
- #ifdef UNICODE_SUPPORT_VERSION
7794
+ #ifdef UNICODE_SUPPORT_VERSION_H
7795
7795
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLNextResult_helper, nextresultparams,
7796
7796
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
7797
7797
  rc = nextresultparams->rc;
@@ -7875,7 +7875,7 @@ VALUE ibm_db_num_fields(int argc, VALUE *argv, VALUE self)
7875
7875
  stmt_handle *stmt_res;
7876
7876
  int rc = 0;
7877
7877
 
7878
- #ifdef UNICODE_SUPPORT_VERSION
7878
+ #ifdef UNICODE_SUPPORT_VERSION_H
7879
7879
  char *err_str = NULL;
7880
7880
  #endif
7881
7881
 
@@ -7892,7 +7892,7 @@ VALUE ibm_db_num_fields(int argc, VALUE *argv, VALUE self)
7892
7892
  result_cols_args->stmt_res = stmt_res;
7893
7893
  result_cols_args->count = 0;
7894
7894
 
7895
- #ifdef UNICODE_SUPPORT_VERSION
7895
+ #ifdef UNICODE_SUPPORT_VERSION_H
7896
7896
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLNumResultCols_helper, result_cols_args,
7897
7897
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
7898
7898
  rc = result_cols_args->rc;
@@ -7902,7 +7902,7 @@ VALUE ibm_db_num_fields(int argc, VALUE *argv, VALUE self)
7902
7902
 
7903
7903
  if ( rc == SQL_ERROR ) {
7904
7904
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 1 );
7905
- #ifdef UNICODE_SUPPORT_VERSION
7905
+ #ifdef UNICODE_SUPPORT_VERSION_H
7906
7906
  err_str = RSTRING_PTR( _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->ruby_stmt_err_msg,
7907
7907
  stmt_res->ruby_stmt_err_msg_len )
7908
7908
  );
@@ -7970,7 +7970,7 @@ VALUE ibm_db_num_rows(int argc, VALUE *argv, VALUE self)
7970
7970
 
7971
7971
  sql_row_count_args *row_count_args = NULL;
7972
7972
 
7973
- #ifdef UNICODE_SUPPORT_VERSION
7973
+ #ifdef UNICODE_SUPPORT_VERSION_H
7974
7974
  char *err_str = NULL;
7975
7975
  #endif
7976
7976
 
@@ -7985,7 +7985,7 @@ VALUE ibm_db_num_rows(int argc, VALUE *argv, VALUE self)
7985
7985
  row_count_args->stmt_res = stmt_res;
7986
7986
  row_count_args->count = 0;
7987
7987
 
7988
- #ifdef UNICODE_SUPPORT_VERSION
7988
+ #ifdef UNICODE_SUPPORT_VERSION_H
7989
7989
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLRowCount_helper, row_count_args,
7990
7990
  RUBY_UBF_IO, NULL );
7991
7991
  rc = row_count_args->rc;
@@ -7996,7 +7996,7 @@ VALUE ibm_db_num_rows(int argc, VALUE *argv, VALUE self)
7996
7996
  if ( rc == SQL_ERROR ) {
7997
7997
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 1 );
7998
7998
 
7999
- #ifdef UNICODE_SUPPORT_VERSION
7999
+ #ifdef UNICODE_SUPPORT_VERSION_H
8000
8000
  err_str = RSTRING_PTR( _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->ruby_stmt_err_msg,
8001
8001
  stmt_res->ruby_stmt_err_msg_len )
8002
8002
  );
@@ -8031,7 +8031,7 @@ static int _ruby_ibm_db_get_column_by_name(stmt_handle *stmt_res, VALUE column,
8031
8031
  int rc;
8032
8032
  int index;
8033
8033
 
8034
- #ifdef UNICODE_SUPPORT_VERSION
8034
+ #ifdef UNICODE_SUPPORT_VERSION_H
8035
8035
  VALUE col_name = Qnil;
8036
8036
  #else
8037
8037
  char *col_name = NULL;
@@ -8042,7 +8042,7 @@ static int _ruby_ibm_db_get_column_by_name(stmt_handle *stmt_res, VALUE column,
8042
8042
  if ( stmt_res->column_info == NULL ) {
8043
8043
  if ( release_gil == 1 ) {
8044
8044
 
8045
- #ifdef UNICODE_SUPPORT_VERSION
8045
+ #ifdef UNICODE_SUPPORT_VERSION_H
8046
8046
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_get_result_set_info, stmt_res,
8047
8047
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
8048
8048
  rc = stmt_res->rc;
@@ -8062,14 +8062,14 @@ static int _ruby_ibm_db_get_column_by_name(stmt_handle *stmt_res, VALUE column,
8062
8062
  if ( TYPE(column) == T_FIXNUM ) {
8063
8063
  col = FIX2LONG( column );
8064
8064
  } else if (RTEST( column )) {
8065
- #ifdef UNICODE_SUPPORT_VERSION
8065
+ #ifdef UNICODE_SUPPORT_VERSION_H
8066
8066
  col_name = _ruby_ibm_db_export_str_to_utf16( column );
8067
8067
  #else
8068
8068
  col_name = STR2CSTR( column );
8069
8069
  #endif
8070
8070
  }
8071
8071
 
8072
- #ifdef UNICODE_SUPPORT_VERSION
8072
+ #ifdef UNICODE_SUPPORT_VERSION_H
8073
8073
  if ( col_name == Qnil ) {
8074
8074
  #else
8075
8075
  if ( col_name == NULL ) {
@@ -8085,7 +8085,7 @@ static int _ruby_ibm_db_get_column_by_name(stmt_handle *stmt_res, VALUE column,
8085
8085
  /* should start from 0 */
8086
8086
  index = 0;
8087
8087
  while (index < stmt_res->num_columns) {
8088
- #ifdef UNICODE_SUPPORT_VERSION
8088
+ #ifdef UNICODE_SUPPORT_VERSION_H
8089
8089
  if ( rb_str_equal(_ruby_ibm_db_export_sqlwchar_to_utf16_rstr(stmt_res->column_info[index].name, stmt_res->column_info[index].name_length * sizeof(SQLWCHAR)), _ruby_ibm_db_export_str_to_utf16(col_name) ) ) {
8090
8090
  #else
8091
8091
  if (strcmp((char*)stmt_res->column_info[index].name,col_name) == 0) {
@@ -8141,7 +8141,7 @@ VALUE ibm_db_field_name(int argc, VALUE *argv, VALUE self)
8141
8141
  if ( col < 0 ) {
8142
8142
  return Qfalse;
8143
8143
  }
8144
- #ifdef UNICODE_SUPPORT_VERSION
8144
+ #ifdef UNICODE_SUPPORT_VERSION_H
8145
8145
  return _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->column_info[col].name, stmt_res->column_info[col].name_length * sizeof(SQLWCHAR));
8146
8146
  #else
8147
8147
  return rb_str_new2((char*)stmt_res->column_info[col].name);
@@ -8206,7 +8206,7 @@ VALUE ibm_db_field_display_size(int argc, VALUE *argv, VALUE self)
8206
8206
  colattr_args->col_num = col+1;
8207
8207
  colattr_args->FieldIdentifier = SQL_DESC_DISPLAY_SIZE;
8208
8208
 
8209
- #ifdef UNICODE_SUPPORT_VERSION
8209
+ #ifdef UNICODE_SUPPORT_VERSION_H
8210
8210
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLColAttributes_helper, colattr_args,
8211
8211
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
8212
8212
  rc = colattr_args->rc;
@@ -8457,7 +8457,7 @@ VALUE ibm_db_field_type(int argc, VALUE *argv, VALUE self)
8457
8457
  str_val = "string";
8458
8458
  break;
8459
8459
  }
8460
- #ifdef UNICODE_SUPPORT_VERSION
8460
+ #ifdef UNICODE_SUPPORT_VERSION_H
8461
8461
  return _ruby_ibm_db_export_char_to_utf8_rstr(str_val);
8462
8462
  #else
8463
8463
  return rb_str_new2( str_val );
@@ -8527,7 +8527,7 @@ VALUE ibm_db_field_width(int argc, VALUE *argv, VALUE self)
8527
8527
  colattr_args->col_num = col+1;
8528
8528
  colattr_args->FieldIdentifier = SQL_DESC_LENGTH;
8529
8529
 
8530
- #ifdef UNICODE_SUPPORT_VERSION
8530
+ #ifdef UNICODE_SUPPORT_VERSION_H
8531
8531
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLColAttributes_helper, colattr_args,
8532
8532
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res);
8533
8533
  rc = colattr_args->rc;
@@ -8629,7 +8629,7 @@ VALUE ibm_db_rollback(int argc, VALUE *argv, VALUE self)
8629
8629
  end_X_args->hdbc = &(conn_res->hdbc);
8630
8630
  end_X_args->handleType = SQL_HANDLE_DBC;
8631
8631
  end_X_args->completionType = SQL_ROLLBACK; /*Remeber you are Rollingback the transaction*/
8632
- #ifdef UNICODE_SUPPORT_VERSION
8632
+ #ifdef UNICODE_SUPPORT_VERSION_H
8633
8633
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_SQLEndTran, end_X_args,
8634
8634
  RUBY_UBF_IO, NULL);
8635
8635
  rc = end_X_args->rc;
@@ -8823,7 +8823,7 @@ int isNullLOB(VALUE *return_value,int i,stmt_handle *stmt_res,int op)
8823
8823
  VALUE colName;
8824
8824
  if (stmt_res->column_info[i].loc_ind == SQL_NULL_DATA) {
8825
8825
  if ( op & FETCH_ASSOC ) {
8826
- #ifdef UNICODE_SUPPORT_VERSION
8826
+ #ifdef UNICODE_SUPPORT_VERSION_H
8827
8827
  colName = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->column_info[i].name, stmt_res->column_info[i].name_length * sizeof(SQLWCHAR) );
8828
8828
  #else
8829
8829
  colName = rb_str_new2( (char*)stmt_res->column_info[i].name );
@@ -8875,7 +8875,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8875
8875
  if ( stmt_res->column_info == NULL ) {
8876
8876
  if (_ruby_ibm_db_get_result_set_info(stmt_res)<0) {
8877
8877
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
8878
- #ifdef UNICODE_SUPPORT_VERSION
8878
+ #ifdef UNICODE_SUPPORT_VERSION_H
8879
8879
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: "),
8880
8880
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
8881
8881
  stmt_res->ruby_stmt_err_msg_len)
@@ -8884,7 +8884,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8884
8884
  *(data->error) = rb_str_cat2(rb_str_new2("Column information cannot be retrieved: "), stmt_res->ruby_stmt_err_msg );
8885
8885
  #endif
8886
8886
  } else {
8887
- #ifdef UNICODE_SUPPORT_VERSION
8887
+ #ifdef UNICODE_SUPPORT_VERSION_H
8888
8888
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: <error message could not be retrieved>");
8889
8889
  #else
8890
8890
  *(data->error) = rb_str_new2("Column information cannot be retrieved: <error message could not be retrieved>");
@@ -8896,7 +8896,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8896
8896
  }
8897
8897
 
8898
8898
  if(col_num < 0 || col_num >= stmt_res->num_columns) {
8899
- #ifdef UNICODE_SUPPORT_VERSION
8899
+ #ifdef UNICODE_SUPPORT_VERSION_H
8900
8900
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Column ordinal out of range" );
8901
8901
  #else
8902
8902
  *(data->error) = rb_str_new2("Column ordinal out of range" );
@@ -8920,7 +8920,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8920
8920
  case SQL_WLONGVARCHAR:
8921
8921
  in_length = stmt_res->column_info[col_num].size + 1;
8922
8922
 
8923
- #ifdef UNICODE_SUPPORT_VERSION
8923
+ #ifdef UNICODE_SUPPORT_VERSION_H
8924
8924
  out_ptr = (SQLPOINTER)ALLOC_N(SQLWCHAR,in_length);
8925
8925
  memset(out_ptr, '\0', in_length * sizeof(SQLWCHAR) );
8926
8926
  #else
@@ -8949,7 +8949,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8949
8949
  return Qnil;
8950
8950
  }
8951
8951
 
8952
- #ifdef UNICODE_SUPPORT_VERSION
8952
+ #ifdef UNICODE_SUPPORT_VERSION_H
8953
8953
  rc = _ruby_ibm_db_get_data(stmt_res, col_num+1, SQL_C_WCHAR, out_ptr, in_length * sizeof(SQLWCHAR) , &out_length);
8954
8954
  #else
8955
8955
  rc = _ruby_ibm_db_get_data(stmt_res, col_num+1, SQL_C_CHAR, out_ptr, in_length, &out_length);
@@ -8964,7 +8964,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
8964
8964
  data->return_value = Qnil;
8965
8965
  return Qnil;
8966
8966
  } else {
8967
- #ifdef UNICODE_SUPPORT_VERSION
8967
+ #ifdef UNICODE_SUPPORT_VERSION_H
8968
8968
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(out_ptr, out_length);
8969
8969
  #else
8970
8970
  return_value = rb_str_new((char*)out_ptr, out_length);
@@ -9066,7 +9066,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
9066
9066
  return Qnil;
9067
9067
  }
9068
9068
 
9069
- #ifdef UNICODE_SUPPORT_VERSION
9069
+ #ifdef UNICODE_SUPPORT_VERSION_H
9070
9070
  out_ptr = (char*)ALLOC_N(SQLWCHAR,in_length+1);
9071
9071
  memset(out_ptr, '\0', (in_length + 1) * sizeof(SQLWCHAR) );
9072
9072
  #else
@@ -9080,7 +9080,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
9080
9080
  return Qnil;
9081
9081
  }
9082
9082
 
9083
- #ifdef UNICODE_SUPPORT_VERSION
9083
+ #ifdef UNICODE_SUPPORT_VERSION_H
9084
9084
  rc = _ruby_ibm_db_get_data2(stmt_res, col_num+1, SQL_C_WCHAR, out_ptr, in_length, (in_length + 1) * sizeof(SQLWCHAR) , &out_length);
9085
9085
  #else
9086
9086
  rc = _ruby_ibm_db_get_data2(stmt_res, col_num+1, SQL_C_CHAR, (void*)out_ptr, in_length, in_length+1, &out_length);
@@ -9091,7 +9091,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
9091
9091
  return Qfalse;
9092
9092
  }
9093
9093
 
9094
- #ifdef UNICODE_SUPPORT_VERSION
9094
+ #ifdef UNICODE_SUPPORT_VERSION_H
9095
9095
  return_value = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(out_ptr, out_length);
9096
9096
  #else
9097
9097
  return_value = rb_str_new2(out_ptr);
@@ -9191,7 +9191,7 @@ static VALUE _ruby_ibm_db_result_helper(ibm_db_result_args *data) {
9191
9191
  return Qfalse;
9192
9192
  }
9193
9193
 
9194
- #ifdef UNICODE_SUPPORT_VERSION
9194
+ #ifdef UNICODE_SUPPORT_VERSION_H
9195
9195
  return_value = _ruby_ibm_db_export_sqlchar_to_utf8_rstr(out_ptr, out_length);
9196
9196
  #else
9197
9197
  return_value = rb_str_new((char*)out_ptr,out_length);
@@ -9251,7 +9251,7 @@ VALUE ibm_db_result(int argc, VALUE *argv, VALUE self)
9251
9251
  if ( !NIL_P( stmt ) ) {
9252
9252
  Data_Get_Struct(stmt, stmt_handle, result_args->stmt_res);
9253
9253
 
9254
- #ifdef UNICODE_SUPPORT_VERSION
9254
+ #ifdef UNICODE_SUPPORT_VERSION_H
9255
9255
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_result_helper, result_args,
9256
9256
  (void *)_ruby_ibm_db_Statement_level_UBF, result_args->stmt_res );
9257
9257
  ret_val = result_args->return_value;
@@ -9315,7 +9315,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9315
9315
  if ( stmt_res->column_info == NULL ) {
9316
9316
  if (_ruby_ibm_db_get_result_set_info(stmt_res)<0) {
9317
9317
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
9318
- #ifdef UNICODE_SUPPORT_VERSION
9318
+ #ifdef UNICODE_SUPPORT_VERSION_H
9319
9319
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: "),
9320
9320
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->ruby_stmt_err_msg,
9321
9321
  stmt_res->ruby_stmt_err_msg_len)
@@ -9324,7 +9324,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9324
9324
  *(data->error) = rb_str_cat2(rb_str_new2("Column information cannot be retrieved: "), stmt_res->ruby_stmt_err_msg );
9325
9325
  #endif
9326
9326
  } else {
9327
- #ifdef UNICODE_SUPPORT_VERSION
9327
+ #ifdef UNICODE_SUPPORT_VERSION_H
9328
9328
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: <error message could not be retrieved>");
9329
9329
  #else
9330
9330
  *(data->error) = rb_str_new2("Column information cannot be retrieved: <error message could not be retrieved>");
@@ -9340,7 +9340,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9340
9340
  rc = _ruby_ibm_db_bind_column_helper(stmt_res);
9341
9341
  if ( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO ) {
9342
9342
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
9343
- #ifdef UNICODE_SUPPORT_VERSION
9343
+ #ifdef UNICODE_SUPPORT_VERSION_H
9344
9344
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Column binding cannot be done: "),
9345
9345
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->ruby_stmt_err_msg,
9346
9346
  stmt_res->ruby_stmt_err_msg_len)
@@ -9349,7 +9349,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9349
9349
  *(data->error) = rb_str_cat2(rb_str_new2("Column binding cannot be done: "), stmt_res->ruby_stmt_err_msg );
9350
9350
  #endif
9351
9351
  } else {
9352
- #ifdef UNICODE_SUPPORT_VERSION
9352
+ #ifdef UNICODE_SUPPORT_VERSION_H
9353
9353
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Column binding cannot be done: <error message could not be retrieved>");
9354
9354
  #else
9355
9355
  *(data->error) = rb_str_new2("Column binding cannot be done: <error message could not be retrieved>");
@@ -9400,7 +9400,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9400
9400
  }
9401
9401
  #endif /*PASE*/
9402
9402
  } else if (data->arg_count == 2 && row_number < 0) {
9403
- #ifdef UNICODE_SUPPORT_VERSION
9403
+ #ifdef UNICODE_SUPPORT_VERSION_H
9404
9404
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Requested row number must be a positive value");
9405
9405
  #else
9406
9406
  *(data->error) = rb_str_new2("Requested row number must be a positive value");
@@ -9429,7 +9429,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9429
9429
  } else if ( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
9430
9430
  _ruby_ibm_db_check_sql_errors( stmt_res, DB_STMT, stmt_res->hstmt, SQL_HANDLE_STMT, rc, 1, NULL, NULL, -1, 1, 0 );
9431
9431
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
9432
- #ifdef UNICODE_SUPPORT_VERSION
9432
+ #ifdef UNICODE_SUPPORT_VERSION_H
9433
9433
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Fetch Failure: "),
9434
9434
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
9435
9435
  stmt_res->ruby_stmt_err_msg_len )
@@ -9438,7 +9438,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9438
9438
  *(data->error) = rb_str_cat2(rb_str_new2("Fetch Failure: "), stmt_res->ruby_stmt_err_msg );
9439
9439
  #endif
9440
9440
  } else {
9441
- #ifdef UNICODE_SUPPORT_VERSION
9441
+ #ifdef UNICODE_SUPPORT_VERSION_H
9442
9442
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Fetch Failure: <error message could not be retrieved>");
9443
9443
  #else
9444
9444
  *(data->error) = rb_str_new2("Fetch Failure: <error message could not be retrieved>");
@@ -9461,14 +9461,14 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9461
9461
 
9462
9462
  switch(stmt_res->s_case_mode) {
9463
9463
  case CASE_LOWER:
9464
- #ifdef UNICODE_SUPPORT_VERSION
9464
+ #ifdef UNICODE_SUPPORT_VERSION_H
9465
9465
  strtolower((char*)stmt_res->column_info[i].name, stmt_res->column_info[i].name_length * sizeof(SQLWCHAR));
9466
9466
  #else
9467
9467
  strtolower((char*)stmt_res->column_info[i].name, strlen((char*)stmt_res->column_info[i].name));
9468
9468
  #endif
9469
9469
  break;
9470
9470
  case CASE_UPPER:
9471
- #ifdef UNICODE_SUPPORT_VERSION
9471
+ #ifdef UNICODE_SUPPORT_VERSION_H
9472
9472
  strtoupper((char*)stmt_res->column_info[i].name, stmt_res->column_info[i].name_length * sizeof(SQLWCHAR) );
9473
9473
  #else
9474
9474
  strtoupper((char*)stmt_res->column_info[i].name, strlen((char*)stmt_res->column_info[i].name));
@@ -9479,7 +9479,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9479
9479
  break;
9480
9480
  }
9481
9481
 
9482
- #ifdef UNICODE_SUPPORT_VERSION
9482
+ #ifdef UNICODE_SUPPORT_VERSION_H
9483
9483
  colName = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->column_info[i].name, stmt_res->column_info[i].name_length * sizeof(SQLWCHAR) );
9484
9484
  #else
9485
9485
  colName = rb_str_new2((char*)stmt_res->column_info[i].name);
@@ -9506,20 +9506,20 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9506
9506
  case SQL_LONGVARCHAR:
9507
9507
  case SQL_WLONGVARCHAR:
9508
9508
  if ( op & FETCH_ASSOC ) {
9509
- #ifdef UNICODE_SUPPORT_VERSION
9509
+ #ifdef UNICODE_SUPPORT_VERSION_H
9510
9510
  rb_hash_aset(return_value, colName, _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(row_data->str_val, out_length ));
9511
9511
  #else
9512
9512
  rb_hash_aset(return_value, colName, rb_str_new((char *)row_data->str_val, out_length));
9513
9513
  #endif
9514
9514
  }
9515
9515
  if ( op == FETCH_INDEX ) {
9516
- #ifdef UNICODE_SUPPORT_VERSION
9516
+ #ifdef UNICODE_SUPPORT_VERSION_H
9517
9517
  rb_ary_store(return_value, i, _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(row_data->str_val, out_length ));
9518
9518
  #else
9519
9519
  rb_ary_store(return_value, i, rb_str_new((char *)row_data->str_val, out_length));
9520
9520
  #endif
9521
9521
  } else if ( op == FETCH_BOTH ) {
9522
- #ifdef UNICODE_SUPPORT_VERSION
9522
+ #ifdef UNICODE_SUPPORT_VERSION_H
9523
9523
  rb_hash_aset(return_value, INT2NUM(i), _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(row_data->str_val, out_length ));
9524
9524
  #else
9525
9525
  rb_hash_aset(return_value, INT2NUM(i), rb_str_new((char *)row_data->str_val, out_length));
@@ -9762,7 +9762,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9762
9762
 
9763
9763
  if ( rc == SQL_ERROR ) {
9764
9764
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
9765
- #ifdef UNICODE_SUPPORT_VERSION
9765
+ #ifdef UNICODE_SUPPORT_VERSION_H
9766
9766
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Failed to Determine XML Size: "),
9767
9767
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
9768
9768
  stmt_res->ruby_stmt_err_msg_len)
@@ -9771,7 +9771,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9771
9771
  *(data->error) = rb_str_cat2(rb_str_new2("Failed to Determine XML Size: "), stmt_res->ruby_stmt_err_msg );
9772
9772
  #endif
9773
9773
  } else {
9774
- #ifdef UNICODE_SUPPORT_VERSION
9774
+ #ifdef UNICODE_SUPPORT_VERSION_H
9775
9775
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Failed to Determine XML Size: <error message could not be retrieved>");
9776
9776
  #else
9777
9777
  *(data->error) = rb_str_new2("Failed to Determine XML Size: <error message could not be retrieved>");
@@ -9810,20 +9810,20 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9810
9810
  }
9811
9811
 
9812
9812
  if ( op & FETCH_ASSOC ) {
9813
- #ifdef UNICODE_SUPPORT_VERSION
9813
+ #ifdef UNICODE_SUPPORT_VERSION_H
9814
9814
  rb_hash_aset(return_value, colName, _ruby_ibm_db_export_sqlchar_to_utf8_rstr( (SQLCHAR *) out_ptr, out_length));
9815
9815
  #else
9816
9816
  rb_hash_aset(return_value, colName, rb_str_new((char *)out_ptr, out_length));
9817
9817
  #endif
9818
9818
  }
9819
9819
  if ( op == FETCH_INDEX ) {
9820
- #ifdef UNICODE_SUPPORT_VERSION
9820
+ #ifdef UNICODE_SUPPORT_VERSION_H
9821
9821
  rb_ary_store(return_value, i, _ruby_ibm_db_export_sqlchar_to_utf8_rstr( (SQLCHAR *) out_ptr, out_length));
9822
9822
  #else
9823
9823
  rb_ary_store(return_value, i, rb_str_new((char *)out_ptr, out_length));
9824
9824
  #endif
9825
9825
  } else if ( op == FETCH_BOTH ) {
9826
- #ifdef UNICODE_SUPPORT_VERSION
9826
+ #ifdef UNICODE_SUPPORT_VERSION_H
9827
9827
  rb_hash_aset(return_value, INT2NUM(i), _ruby_ibm_db_export_sqlchar_to_utf8_rstr( (SQLCHAR *) out_ptr, out_length));
9828
9828
  #else
9829
9829
  rb_hash_aset(return_value, INT2NUM(i), rb_str_new((char *)out_ptr, out_length));
@@ -9856,7 +9856,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9856
9856
  }
9857
9857
  } else {
9858
9858
  if (rc == SQL_ERROR) tmp_length = 0;
9859
- #ifdef UNICODE_SUPPORT_VERSION
9859
+ #ifdef UNICODE_SUPPORT_VERSION_H
9860
9860
  out_ptr = (SQLPOINTER)ALLOC_N(SQLWCHAR, tmp_length + 1);
9861
9861
  memset(out_ptr, '\0', (tmp_length+1) * sizeof(SQLWCHAR));
9862
9862
  #else
@@ -9871,7 +9871,7 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9871
9871
  return Qnil;
9872
9872
  }
9873
9873
 
9874
- #ifdef UNICODE_SUPPORT_VERSION
9874
+ #ifdef UNICODE_SUPPORT_VERSION_H
9875
9875
  rc = _ruby_ibm_db_get_data2(stmt_res, i+1, SQL_C_WCHAR, out_ptr, tmp_length , (tmp_length + 1) * sizeof(SQLWCHAR) , &out_length);
9876
9876
  #else
9877
9877
  rc = _ruby_ibm_db_get_data2(stmt_res, i+1, SQL_C_CHAR, out_ptr, tmp_length, tmp_length+1, &out_length);
@@ -9885,20 +9885,20 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
9885
9885
  }
9886
9886
 
9887
9887
  if ( op & FETCH_ASSOC ) {
9888
- #ifdef UNICODE_SUPPORT_VERSION
9888
+ #ifdef UNICODE_SUPPORT_VERSION_H
9889
9889
  rb_hash_aset(return_value, colName, _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(out_ptr, out_length));
9890
9890
  #else
9891
9891
  rb_hash_aset(return_value, colName, rb_str_new((char*)out_ptr, out_length));
9892
9892
  #endif
9893
9893
  }
9894
9894
  if ( op == FETCH_INDEX ) {
9895
- #ifdef UNICODE_SUPPORT_VERSION
9895
+ #ifdef UNICODE_SUPPORT_VERSION_H
9896
9896
  rb_ary_store(return_value, i, _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(out_ptr, out_length));
9897
9897
  #else
9898
9898
  rb_ary_store(return_value, i, rb_str_new((char*)out_ptr, out_length));
9899
9899
  #endif
9900
9900
  } else if ( op == FETCH_BOTH ) {
9901
- #ifdef UNICODE_SUPPORT_VERSION
9901
+ #ifdef UNICODE_SUPPORT_VERSION_H
9902
9902
  rb_hash_aset(return_value, INT2NUM(i), _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(out_ptr, out_length));
9903
9903
  #else
9904
9904
  rb_hash_aset(return_value, INT2NUM(i), rb_str_new((char*)out_ptr, out_length));
@@ -9939,7 +9939,7 @@ static int _ruby_ibm_db_fetch_row_helper( ibm_db_fetch_helper_args *data) {
9939
9939
  if ( stmt_res->column_info == NULL ) {
9940
9940
  if (_ruby_ibm_db_get_result_set_info(stmt_res)<0) {
9941
9941
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
9942
- #ifdef UNICODE_SUPPORT_VERSION
9942
+ #ifdef UNICODE_SUPPORT_VERSION_H
9943
9943
  *(data->error) = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: "),
9944
9944
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr( stmt_res->ruby_stmt_err_msg,
9945
9945
  stmt_res->ruby_stmt_err_msg_len)
@@ -9948,7 +9948,7 @@ static int _ruby_ibm_db_fetch_row_helper( ibm_db_fetch_helper_args *data) {
9948
9948
  *(data->error) = rb_str_cat2(rb_str_new2("Column information cannot be retrieved: "), stmt_res->ruby_stmt_err_msg );
9949
9949
  #endif
9950
9950
  } else {
9951
- #ifdef UNICODE_SUPPORT_VERSION
9951
+ #ifdef UNICODE_SUPPORT_VERSION_H
9952
9952
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: <error message could not be retrieved>");
9953
9953
  #else
9954
9954
  *(data->error) = rb_str_new2("Column information cannot be retrieved: <error message could not be retrieved>");
@@ -9986,7 +9986,7 @@ static int _ruby_ibm_db_fetch_row_helper( ibm_db_fetch_helper_args *data) {
9986
9986
  }
9987
9987
  #endif /*PASE*/
9988
9988
  } else if (data->arg_count == 2 && row_number < 0) {
9989
- #ifdef UNICODE_SUPPORT_VERSION
9989
+ #ifdef UNICODE_SUPPORT_VERSION_H
9990
9990
  *(data->error) = _ruby_ibm_db_export_char_to_utf8_rstr("Requested row number must be a positive value");
9991
9991
  #else
9992
9992
  *(data->error) = rb_str_new2("Requested row number must be a positive value");
@@ -10072,7 +10072,7 @@ VALUE ibm_db_fetch_row(int argc, VALUE *argv, VALUE self)
10072
10072
  helper_args->arg_count = argc;
10073
10073
  helper_args->error = &error;
10074
10074
 
10075
- #ifdef UNICODE_SUPPORT_VERSION
10075
+ #ifdef UNICODE_SUPPORT_VERSION_H
10076
10076
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_fetch_row_helper, helper_args,
10077
10077
  RUBY_UBF_IO, NULL );
10078
10078
  ret_val = helper_args->return_value;
@@ -10135,7 +10135,7 @@ VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self) {
10135
10135
  if ( stmt_res->column_info == NULL ) {
10136
10136
  if (_ruby_ibm_db_get_result_set_info(stmt_res)<0) {
10137
10137
  if( stmt_res != NULL && stmt_res->ruby_stmt_err_msg != NULL ) {
10138
- #ifdef UNICODE_SUPPORT_VERSION
10138
+ #ifdef UNICODE_SUPPORT_VERSION_H
10139
10139
  error = rb_str_concat( _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: "),
10140
10140
  _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->ruby_stmt_err_msg,
10141
10141
  stmt_res->ruby_stmt_err_msg_len)
@@ -10144,7 +10144,7 @@ VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self) {
10144
10144
  error = rb_str_cat2(rb_str_new2("Column information cannot be retrieved: "), stmt_res->ruby_stmt_err_msg );
10145
10145
  #endif
10146
10146
  } else {
10147
- #ifdef UNICODE_SUPPORT_VERSION
10147
+ #ifdef UNICODE_SUPPORT_VERSION_H
10148
10148
  error = _ruby_ibm_db_export_char_to_utf8_rstr("Column information cannot be retrieved: <error message could not be retrieved>");
10149
10149
  #else
10150
10150
  error = rb_str_new2("Column information cannot be retrieved: <error message could not be retrieved>");
@@ -10159,14 +10159,14 @@ VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self) {
10159
10159
  for (index=0; index<stmt_res->num_columns; index++) {
10160
10160
  switch(stmt_res->s_case_mode) {
10161
10161
  case CASE_LOWER:
10162
- #ifdef UNICODE_SUPPORT_VERSION
10162
+ #ifdef UNICODE_SUPPORT_VERSION_H
10163
10163
  strtolower((char*)stmt_res->column_info[index].name, stmt_res->column_info[index].name_length * sizeof(SQLWCHAR));
10164
10164
  #else
10165
10165
  strtolower((char*)stmt_res->column_info[index].name, strlen((char*)stmt_res->column_info[index].name));
10166
10166
  #endif
10167
10167
  break;
10168
10168
  case CASE_UPPER:
10169
- #ifdef UNICODE_SUPPORT_VERSION
10169
+ #ifdef UNICODE_SUPPORT_VERSION_H
10170
10170
  strtoupper((char*)stmt_res->column_info[index].name, stmt_res->column_info[index].name_length * sizeof(SQLWCHAR) );
10171
10171
  #else
10172
10172
  strtoupper((char*)stmt_res->column_info[index].name, strlen((char*)stmt_res->column_info[index].name));
@@ -10176,7 +10176,7 @@ VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self) {
10176
10176
  default:
10177
10177
  break;
10178
10178
  }
10179
- #ifdef UNICODE_SUPPORT_VERSION
10179
+ #ifdef UNICODE_SUPPORT_VERSION_H
10180
10180
  colName = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(stmt_res->column_info[index].name, stmt_res->column_info[index].name_length * sizeof(SQLWCHAR) );
10181
10181
  #else
10182
10182
  colName = rb_str_new2((char*)stmt_res->column_info[index].name);
@@ -10241,7 +10241,7 @@ VALUE ibm_db_fetch_assoc(int argc, VALUE *argv, VALUE self) {
10241
10241
  helper_args->error = &error;
10242
10242
  helper_args->funcType = FETCH_ASSOC;
10243
10243
 
10244
- #ifdef UNICODE_SUPPORT_VERSION
10244
+ #ifdef UNICODE_SUPPORT_VERSION_H
10245
10245
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_bind_fetch_helper, helper_args,
10246
10246
  RUBY_UBF_IO, NULL );
10247
10247
  ret_val = helper_args->return_value;
@@ -10330,7 +10330,7 @@ VALUE ibm_db_fetch_object(int argc, VALUE *argv, VALUE self)
10330
10330
  helper_args->error = &error;
10331
10331
  helper_args->funcType = FETCH_ASSOC;
10332
10332
 
10333
- #ifdef UNICODE_SUPPORT_VERSION
10333
+ #ifdef UNICODE_SUPPORT_VERSION_H
10334
10334
  ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_bind_fetch_helper, helper_args,
10335
10335
  (void *)_ruby_ibm_db_Statement_level_UBF, stmt_res );
10336
10336
  row_res->hash = helper_args->return_value;
@@ -10414,7 +10414,7 @@ VALUE ibm_db_fetch_array(int argc, VALUE *argv, VALUE self)
10414
10414
  helper_args->funcType = FETCH_INDEX;
10415
10415
  //Call without thread API to avoid the Thread lock.
10416
10416
  ret_val = _ruby_ibm_db_bind_fetch_helper( helper_args );
10417
- //#ifdef UNICODE_SUPPORT_VERSION
10417
+ //#ifdef UNICODE_SUPPORT_VERSION_H
10418
10418
  //ibm_Ruby_Thread_Call ( (void *)_ruby_ibm_db_bind_fetch_helper, helper_args,
10419
10419
  // RUBY_UBF_IO, NULL );
10420
10420
  //ret_val = helper_args->return_value;
@@ -10592,7 +10592,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10592
10592
  int rc = 0;
10593
10593
  SQLSMALLINT out_length = 0;
10594
10594
 
10595
- #ifndef UNICODE_SUPPORT_VERSION
10595
+ #ifndef UNICODE_SUPPORT_VERSION_H
10596
10596
  char buffer11[11];
10597
10597
  char buffer255[255];
10598
10598
  char buffer3k[3072]; /*Informix server returns SQL_KEYWORDS data, which requires 2608*/
@@ -10625,7 +10625,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10625
10625
  return Qfalse;
10626
10626
  } else {
10627
10627
 
10628
- #ifdef UNICODE_SUPPORT_VERSION
10628
+ #ifdef UNICODE_SUPPORT_VERSION_H
10629
10629
  rb_iv_set(return_value, "@DBMS_NAME", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
10630
10630
  #else
10631
10631
  rb_iv_set(return_value, "@DBMS_NAME", rb_str_new2(buffer255));
@@ -10645,7 +10645,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10645
10645
  getInfo_args->return_value = Qfalse;
10646
10646
  return Qfalse;
10647
10647
  } else {
10648
- #ifdef UNICODE_SUPPORT_VERSION
10648
+ #ifdef UNICODE_SUPPORT_VERSION_H
10649
10649
  rb_iv_set(return_value, "@DBMS_VER", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer11, out_length));
10650
10650
  #else
10651
10651
  rb_iv_set(return_value, "@DBMS_VER", rb_str_new2(buffer11));
@@ -10685,7 +10685,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10685
10685
  getInfo_args->return_value = Qfalse;
10686
10686
  return Qfalse;
10687
10687
  } else {
10688
- #ifdef UNICODE_SUPPORT_VERSION
10688
+ #ifdef UNICODE_SUPPORT_VERSION_H
10689
10689
  rb_iv_set(return_value, "@DB_NAME", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
10690
10690
  #else
10691
10691
  rb_iv_set(return_value, "@DB_NAME", rb_str_new2(buffer255));
@@ -10707,7 +10707,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10707
10707
  getInfo_args->return_value = Qfalse;
10708
10708
  return Qfalse;
10709
10709
  } else {
10710
- #ifdef UNICODE_SUPPORT_VERSION
10710
+ #ifdef UNICODE_SUPPORT_VERSION_H
10711
10711
  rb_iv_set(return_value, "@INST_NAME", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
10712
10712
  #else
10713
10713
  rb_iv_set(return_value, "@INST_NAME", rb_str_new2(buffer255));
@@ -10728,7 +10728,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10728
10728
  getInfo_args->return_value = Qfalse;
10729
10729
  return Qfalse;
10730
10730
  } else {
10731
- #ifdef UNICODE_SUPPORT_VERSION
10731
+ #ifdef UNICODE_SUPPORT_VERSION_H
10732
10732
  rb_iv_set(return_value, "@SPECIAL_CHARS", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
10733
10733
  #else
10734
10734
  rb_iv_set(return_value, "@SPECIAL_CHARS", rb_str_new2(buffer255));
@@ -10751,7 +10751,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10751
10751
  return Qfalse;
10752
10752
  } else {
10753
10753
  VALUE keywordsStr, keywordsArray;
10754
- #ifdef UNICODE_SUPPORT_VERSION
10754
+ #ifdef UNICODE_SUPPORT_VERSION_H
10755
10755
  keywordsStr = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer3k, out_length);
10756
10756
  keywordsArray = rb_str_split(keywordsStr, RSTRING_PTR(_ruby_ibm_db_export_char_to_utf8_rstr(",")) );
10757
10757
  #else
@@ -10777,35 +10777,35 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10777
10777
  } else {
10778
10778
  VALUE dft_isolation = Qnil;
10779
10779
  if( bitmask & SQL_TXN_READ_UNCOMMITTED ) {
10780
- #ifdef UNICODE_SUPPORT_VERSION
10780
+ #ifdef UNICODE_SUPPORT_VERSION_H
10781
10781
  dft_isolation = _ruby_ibm_db_export_char_to_utf8_rstr("UR");
10782
10782
  #else
10783
10783
  dft_isolation = rb_str_new2("UR");
10784
10784
  #endif
10785
10785
  }
10786
10786
  if( bitmask & SQL_TXN_READ_COMMITTED ) {
10787
- #ifdef UNICODE_SUPPORT_VERSION
10787
+ #ifdef UNICODE_SUPPORT_VERSION_H
10788
10788
  dft_isolation = _ruby_ibm_db_export_char_to_utf8_rstr("CS");
10789
10789
  #else
10790
10790
  dft_isolation = rb_str_new2("CS");
10791
10791
  #endif
10792
10792
  }
10793
10793
  if( bitmask & SQL_TXN_REPEATABLE_READ ) {
10794
- #ifdef UNICODE_SUPPORT_VERSION
10794
+ #ifdef UNICODE_SUPPORT_VERSION_H
10795
10795
  dft_isolation = _ruby_ibm_db_export_char_to_utf8_rstr("RS");
10796
10796
  #else
10797
10797
  dft_isolation = rb_str_new2("RS");
10798
10798
  #endif
10799
10799
  }
10800
10800
  if( bitmask & SQL_TXN_SERIALIZABLE ) {
10801
- #ifdef UNICODE_SUPPORT_VERSION
10801
+ #ifdef UNICODE_SUPPORT_VERSION_H
10802
10802
  dft_isolation = _ruby_ibm_db_export_char_to_utf8_rstr("RR");
10803
10803
  #else
10804
10804
  dft_isolation = rb_str_new2("RR");
10805
10805
  #endif
10806
10806
  }
10807
10807
  if( bitmask & SQL_TXN_NOCOMMIT ) {
10808
- #ifdef UNICODE_SUPPORT_VERSION
10808
+ #ifdef UNICODE_SUPPORT_VERSION_H
10809
10809
  dft_isolation = _ruby_ibm_db_export_char_to_utf8_rstr("NC");
10810
10810
  #else
10811
10811
  dft_isolation = rb_str_new2("NC");
@@ -10831,35 +10831,35 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10831
10831
 
10832
10832
  array = rb_ary_new();
10833
10833
  if( bitmask & SQL_TXN_READ_UNCOMMITTED ) {
10834
- #ifdef UNICODE_SUPPORT_VERSION
10834
+ #ifdef UNICODE_SUPPORT_VERSION_H
10835
10835
  rb_ary_push(array, _ruby_ibm_db_export_char_to_utf8_rstr("UR"));
10836
10836
  #else
10837
10837
  rb_ary_push(array, rb_str_new2("UR"));
10838
10838
  #endif
10839
10839
  }
10840
10840
  if( bitmask & SQL_TXN_READ_COMMITTED ) {
10841
- #ifdef UNICODE_SUPPORT_VERSION
10841
+ #ifdef UNICODE_SUPPORT_VERSION_H
10842
10842
  rb_ary_push(array, _ruby_ibm_db_export_char_to_utf8_rstr("CS"));
10843
10843
  #else
10844
10844
  rb_ary_push(array, rb_str_new2("CS"));
10845
10845
  #endif
10846
10846
  }
10847
10847
  if( bitmask & SQL_TXN_REPEATABLE_READ ) {
10848
- #ifdef UNICODE_SUPPORT_VERSION
10848
+ #ifdef UNICODE_SUPPORT_VERSION_H
10849
10849
  rb_ary_push(array, _ruby_ibm_db_export_char_to_utf8_rstr("RS"));
10850
10850
  #else
10851
10851
  rb_ary_push(array, rb_str_new2("RS"));
10852
10852
  #endif
10853
10853
  }
10854
10854
  if( bitmask & SQL_TXN_SERIALIZABLE ) {
10855
- #ifdef UNICODE_SUPPORT_VERSION
10855
+ #ifdef UNICODE_SUPPORT_VERSION_H
10856
10856
  rb_ary_push(array, _ruby_ibm_db_export_char_to_utf8_rstr("RR"));
10857
10857
  #else
10858
10858
  rb_ary_push(array, rb_str_new2("RR"));
10859
10859
  #endif
10860
10860
  }
10861
10861
  if( bitmask & SQL_TXN_NOCOMMIT ) {
10862
- #ifdef UNICODE_SUPPORT_VERSION
10862
+ #ifdef UNICODE_SUPPORT_VERSION_H
10863
10863
  rb_ary_push(array, _ruby_ibm_db_export_char_to_utf8_rstr("NC"));
10864
10864
  #else
10865
10865
  rb_ary_push(array, rb_str_new2("NC"));
@@ -10885,28 +10885,28 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10885
10885
  VALUE conformance = Qnil;
10886
10886
  switch (bufferint32) {
10887
10887
  case SQL_SC_SQL92_ENTRY:
10888
- #ifdef UNICODE_SUPPORT_VERSION
10888
+ #ifdef UNICODE_SUPPORT_VERSION_H
10889
10889
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("ENTRY");
10890
10890
  #else
10891
10891
  conformance = rb_str_new2("ENTRY");
10892
10892
  #endif
10893
10893
  break;
10894
10894
  case SQL_SC_FIPS127_2_TRANSITIONAL:
10895
- #ifdef UNICODE_SUPPORT_VERSION
10895
+ #ifdef UNICODE_SUPPORT_VERSION_H
10896
10896
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("FIPS127");
10897
10897
  #else
10898
10898
  conformance = rb_str_new2("FIPS127");
10899
10899
  #endif
10900
10900
  break;
10901
10901
  case SQL_SC_SQL92_FULL:
10902
- #ifdef UNICODE_SUPPORT_VERSION
10902
+ #ifdef UNICODE_SUPPORT_VERSION_H
10903
10903
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("FULL");
10904
10904
  #else
10905
10905
  conformance = rb_str_new2("FULL");
10906
10906
  #endif
10907
10907
  break;
10908
10908
  case SQL_SC_SQL92_INTERMEDIATE:
10909
- #ifdef UNICODE_SUPPORT_VERSION
10909
+ #ifdef UNICODE_SUPPORT_VERSION_H
10910
10910
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("INTERMEDIATE");
10911
10911
  #else
10912
10912
  conformance = rb_str_new2("INTERMEDIATE");
@@ -10931,7 +10931,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10931
10931
  getInfo_args->return_value = Qfalse;
10932
10932
  return Qfalse;
10933
10933
  } else {
10934
- #ifdef UNICODE_SUPPORT_VERSION
10934
+ #ifdef UNICODE_SUPPORT_VERSION_H
10935
10935
  if( rb_str_equal(_ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer11, out_length), _ruby_ibm_db_export_char_to_utf8_rstr("Y")) ) {
10936
10936
  #else
10937
10937
  if( strcmp((char *)buffer11, "Y") == 0 ) {
@@ -10955,7 +10955,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10955
10955
  getInfo_args->return_value = Qfalse;
10956
10956
  return Qfalse;
10957
10957
  } else {
10958
- #ifdef UNICODE_SUPPORT_VERSION
10958
+ #ifdef UNICODE_SUPPORT_VERSION_H
10959
10959
  rb_iv_set(return_value, "@IDENTIFIER_QUOTE_CHAR", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer11, out_length));
10960
10960
  #else
10961
10961
  rb_iv_set(return_value, "@IDENTIFIER_QUOTE_CHAR", rb_str_new2(buffer11));
@@ -10976,7 +10976,7 @@ static VALUE ibm_db_server_info_helper( get_info_args *getInfo_args ) {
10976
10976
  getInfo_args->return_value = Qfalse;
10977
10977
  return Qfalse;
10978
10978
  } else {
10979
- #ifdef UNICODE_SUPPORT_VERSION
10979
+ #ifdef UNICODE_SUPPORT_VERSION_H
10980
10980
  if( rb_str_equal(_ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer11, out_length), _ruby_ibm_db_export_char_to_utf8_rstr("Y")) ) {
10981
10981
  #else
10982
10982
  if( strcmp(buffer11, "Y") == 0 ) {
@@ -11259,7 +11259,7 @@ VALUE ibm_db_server_info(int argc, VALUE *argv, VALUE self)
11259
11259
  getInfo_args->infoType = 0;
11260
11260
  getInfo_args->infoValue = NULL;
11261
11261
  getInfo_args->buff_length = 0;
11262
- #ifdef UNICODE_SUPPORT_VERSION
11262
+ #ifdef UNICODE_SUPPORT_VERSION_H
11263
11263
  // Thread.current.report_on_exception = Qfalse;
11264
11264
  ibm_Ruby_Thread_Call ( (void *)ibm_db_server_info_helper, getInfo_args,
11265
11265
  RUBY_UBF_IO, NULL);
@@ -11287,7 +11287,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11287
11287
  int rc = 0;
11288
11288
  SQLSMALLINT out_length = 0;
11289
11289
 
11290
- #ifndef UNICODE_SUPPORT_VERSION
11290
+ #ifndef UNICODE_SUPPORT_VERSION_H
11291
11291
  char buffer255[255];
11292
11292
  #else
11293
11293
  SQLWCHAR buffer255[255];
@@ -11314,7 +11314,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11314
11314
  getInfo_args->return_value = Qfalse;
11315
11315
  return Qfalse;
11316
11316
  } else {
11317
- #ifdef UNICODE_SUPPORT_VERSION
11317
+ #ifdef UNICODE_SUPPORT_VERSION_H
11318
11318
  rb_iv_set(return_value, "@DRIVER_NAME", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
11319
11319
  #else
11320
11320
  rb_iv_set(return_value, "@DRIVER_NAME", rb_str_new2(buffer255));
@@ -11335,7 +11335,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11335
11335
  getInfo_args->return_value = Qfalse;
11336
11336
  return Qfalse;
11337
11337
  } else {
11338
- #ifdef UNICODE_SUPPORT_VERSION
11338
+ #ifdef UNICODE_SUPPORT_VERSION_H
11339
11339
  rb_iv_set(return_value, "@DRIVER_VER", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
11340
11340
  #else
11341
11341
  rb_iv_set(return_value, "@DRIVER_VER", rb_str_new2(buffer255));
@@ -11356,7 +11356,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11356
11356
  getInfo_args->return_value = Qfalse;
11357
11357
  return Qfalse;
11358
11358
  } else {
11359
- #ifdef UNICODE_SUPPORT_VERSION
11359
+ #ifdef UNICODE_SUPPORT_VERSION_H
11360
11360
  rb_iv_set(return_value, "@DATA_SOURCE_NAME", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
11361
11361
  #else
11362
11362
  rb_iv_set(return_value, "@DATA_SOURCE_NAME", rb_str_new2(buffer255));
@@ -11377,7 +11377,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11377
11377
  getInfo_args->return_value = Qfalse;
11378
11378
  return Qfalse;
11379
11379
  } else {
11380
- #ifdef UNICODE_SUPPORT_VERSION
11380
+ #ifdef UNICODE_SUPPORT_VERSION_H
11381
11381
  rb_iv_set(return_value, "@DRIVER_ODBC_VER", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
11382
11382
  #else
11383
11383
  rb_iv_set(return_value, "@DRIVER_ODBC_VER", rb_str_new2(buffer255));
@@ -11399,7 +11399,7 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11399
11399
  getInfo_args->return_value = Qfalse;
11400
11400
  return Qfalse;
11401
11401
  } else {
11402
- #ifdef UNICODE_SUPPORT_VERSION
11402
+ #ifdef UNICODE_SUPPORT_VERSION_H
11403
11403
  rb_iv_set(return_value, "@ODBC_VER", _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(buffer255, out_length));
11404
11404
  #else
11405
11405
  rb_iv_set(return_value, "@ODBC_VER", rb_str_new2(buffer255));
@@ -11424,21 +11424,21 @@ static VALUE ibm_db_client_info_helper( get_info_args *getInfo_args) {
11424
11424
  VALUE conformance = Qnil;
11425
11425
  switch (bufferint16) {
11426
11426
  case SQL_OSC_MINIMUM:
11427
- #ifdef UNICODE_SUPPORT_VERSION
11427
+ #ifdef UNICODE_SUPPORT_VERSION_H
11428
11428
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("MINIMUM");
11429
11429
  #else
11430
11430
  conformance = rb_str_new2("MINIMUM");
11431
11431
  #endif
11432
11432
  break;
11433
11433
  case SQL_OSC_CORE:
11434
- #ifdef UNICODE_SUPPORT_VERSION
11434
+ #ifdef UNICODE_SUPPORT_VERSION_H
11435
11435
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("CORE");
11436
11436
  #else
11437
11437
  conformance = rb_str_new2("CORE");
11438
11438
  #endif
11439
11439
  break;
11440
11440
  case SQL_OSC_EXTENDED:
11441
- #ifdef UNICODE_SUPPORT_VERSION
11441
+ #ifdef UNICODE_SUPPORT_VERSION_H
11442
11442
  conformance = _ruby_ibm_db_export_char_to_utf8_rstr("EXTENDED");
11443
11443
  #else
11444
11444
  conformance = rb_str_new2("EXTENDED");
@@ -11557,7 +11557,7 @@ VALUE ibm_db_client_info(int argc, VALUE *argv, VALUE self)
11557
11557
  getInfo_args->infoValue = NULL;
11558
11558
  getInfo_args->buff_length = 0;
11559
11559
  // using the default unblock funtion RUBY_UBF_IO instead of defined unblock function
11560
- #ifdef UNICODE_SUPPORT_VERSION
11560
+ #ifdef UNICODE_SUPPORT_VERSION_H
11561
11561
  ibm_Ruby_Thread_Call ( (void *)ibm_db_client_info_helper, getInfo_args,
11562
11562
  RUBY_UBF_IO, NULL);
11563
11563
  return_value = getInfo_args->return_value;
@@ -11675,7 +11675,7 @@ VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self)
11675
11675
  VALUE r_type = Qnil;
11676
11676
  VALUE ret_val = Qnil;
11677
11677
 
11678
- #ifdef UNICODE_SUPPORT_VERSION
11678
+ #ifdef UNICODE_SUPPORT_VERSION_H
11679
11679
  SQLWCHAR *value = NULL;
11680
11680
  #else
11681
11681
  SQLCHAR *value = NULL;
@@ -11711,7 +11711,7 @@ VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self)
11711
11711
  if (!NIL_P(option)) {
11712
11712
  op_integer=(SQLINTEGER)FIX2INT(option);
11713
11713
  /* ACCTSTR_LEN is the largest possible length of the options to retrieve */
11714
- #ifdef UNICODE_SUPPORT_VERSION
11714
+ #ifdef UNICODE_SUPPORT_VERSION_H
11715
11715
  value = (SQLWCHAR *)ALLOC_N(SQLWCHAR, ACCTSTR_LEN + 1);
11716
11716
  memset(value,'\0', (ACCTSTR_LEN + 1)*sizeof(SQLWCHAR));
11717
11717
  #else
@@ -11724,7 +11724,7 @@ VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self)
11724
11724
  get_handleAttr_args->handle = &( conn_res->hdbc );
11725
11725
  get_handleAttr_args->attribute = op_integer;
11726
11726
  get_handleAttr_args->valuePtr = (SQLPOINTER)value;
11727
- #ifdef UNICODE_SUPPORT_VERSION
11727
+ #ifdef UNICODE_SUPPORT_VERSION_H
11728
11728
  get_handleAttr_args->buff_length = (ACCTSTR_LEN+1)*sizeof(SQLWCHAR);
11729
11729
  #else
11730
11730
  get_handleAttr_args->buff_length = (ACCTSTR_LEN+1);
@@ -11738,7 +11738,7 @@ VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self)
11738
11738
  _ruby_ibm_db_check_sql_errors( conn_res, DB_CONN, conn_res->hdbc, SQL_HANDLE_DBC, rc, 1, NULL, NULL, -1, 1, 1 );
11739
11739
  ret_val = Qfalse;
11740
11740
  } else {
11741
- #ifdef UNICODE_SUPPORT_VERSION
11741
+ #ifdef UNICODE_SUPPORT_VERSION_H
11742
11742
  ret_val = _ruby_ibm_db_export_sqlwchar_to_utf8_rstr(value, out_length);
11743
11743
  #else
11744
11744
  ret_val = rb_str_new2((char *)value);