Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Give the (U)INT2PTR / PTR2(U)INT macros .h file a more descriptive name and fully integrate them into the configure/build/dist. Remove old check for intptr types. Tidy some CPP bits to make them like the other tdbc-* modules. Fixes ticket [582ee0100c]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1c01e05187ad118b26f17c70d0d59201 |
User & Date: | stu 2017-05-26 14:36:35 |
Original Comment: | Give the (U)INT2PTR / PTR2(U)INT macros .h file a more descriptive name and fully integrate them into the configure/build/dist. Remove old check for intptr types. Tidy some CPP bits to make them like the other tdbc-* modules. |
References
2017-12-15
| ||
19:43 | • Closed ticket [582ee0100c]: pointer to integer assignment potentially unsafe plus 6 other changes artifact: cec2af0729 user: stu | |
Context
2017-05-26
| ||
22:27 | Use $(INSTALL_*) macros in the 'dist' target. Precisely setup dist files. check-in: fc724533c0 user: stu tags: trunk | |
14:36 | Give the (U)INT2PTR / PTR2(U)INT macros .h file a more descriptive name and fully integrate them into the configure/build/dist. Remove old check for intptr types. Tidy some CPP bits to make them like the other tdbc-* modules. Fixes ticket [582ee0100c]. check-in: 1c01e05187 user: stu tags: trunk | |
2017-05-25
| ||
16:30 | Install documentation. check-in: 073bf42dcf user: stu tags: trunk | |
Changes
Changes to Makefile.in.
︙ | ︙ | |||
315 316 317 318 319 320 321 | mkdir $(DIST_DIR)/doc cp -p $(srcdir)/doc/tdbc_postgres.n $(DIST_DIR)/doc/ mkdir $(DIST_DIR)/generic cp -p $(srcdir)/generic/fakepq.h $(srcdir)/generic/pqStubDefs.txt \ $(srcdir)/generic/pqStubInit.c $(srcdir)/generic/pqStubs.h \ | | > > | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | mkdir $(DIST_DIR)/doc cp -p $(srcdir)/doc/tdbc_postgres.n $(DIST_DIR)/doc/ mkdir $(DIST_DIR)/generic cp -p $(srcdir)/generic/fakepq.h $(srcdir)/generic/pqStubDefs.txt \ $(srcdir)/generic/pqStubInit.c $(srcdir)/generic/pqStubs.h \ $(srcdir)/generic/tdbcpostgres.c \ $(srcdir)/generic/int2ptr_ptr2int.h \ $(DIST_DIR)/generic/ mkdir $(DIST_DIR)/library cp -p $(srcdir)/library/tdbcpostgres.tcl $(DIST_DIR)/library/ mkdir $(DIST_DIR)/tests cp -p $(srcdir)/tests/all.tcl $(srcdir)/tests/tdbcpostgres.test \ $(DIST_DIR)/tests/ |
︙ | ︙ |
Changes to configure.
︙ | ︙ | |||
9181 9182 9183 9184 9185 9186 9187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 $as_echo "enabled $tcl_ok debugging" >&6; } fi fi #-------------------------------------------------------------------- | < | | 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 $as_echo "enabled $tcl_ok debugging" >&6; } fi fi #-------------------------------------------------------------------- # Integer pointer types used by the (U)INT2PTR / PTR2(U)INT macros. #-------------------------------------------------------------------- ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" if test "x$ac_cv_type_intptr_t" = xyes; then : $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h |
︙ | ︙ | |||
9221 9222 9223 9224 9225 9226 9227 | fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -z "$ac_type" && break done fi | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 | fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -z "$ac_type" && break done fi ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" if test "x$ac_cv_type_uintptr_t" = xyes; then : $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h else for ac_type in 'unsigned int' 'unsigned long int' \ 'unsigned long long int'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define uintptr_t $ac_type _ACEOF ac_type= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -z "$ac_type" && break done fi #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h #-------------------------------------------------------------------- # Locate the ws2_32 library; we need it for ntohs and friends #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 $as_echo_n "checking for main in -lws2_32... " >&6; } |
︙ | ︙ |
Changes to configure.ac.
︙ | ︙ | |||
168 169 170 171 172 173 174 | #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- | < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- # Integer pointer types used by the (U)INT2PTR / PTR2(U)INT macros. #-------------------------------------------------------------------- AC_TYPE_INTPTR_T AC_TYPE_UINTPTR_T #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) #-------------------------------------------------------------------- # Locate the ws2_32 library; we need it for ntohs and friends #-------------------------------------------------------------------- AC_CHECK_LIB(ws2_32,main,TEA_ADD_LIBS([-lws2_32]),[ AC_CHECK_LIB(winsock,main,TEA_ADD_LIBS([-lwinsock])) ]) |
︙ | ︙ |
Name change from generic/intptr_t.h to generic/int2ptr_ptr2int.h.
︙ | ︙ |
Changes to generic/tdbcpostgres.c.
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Please refer to the file, 'license.terms' for the conditions on * redistribution of this file and for a DISCLAIMER OF ALL WARRANTIES. * *----------------------------------------------------------------------------- */ #ifdef _MSC_VER | | > | > | > > | | | | | | | | < < < < < < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | * Please refer to the file, 'license.terms' for the conditions on * redistribution of this file and for a DISCLAIMER OF ALL WARRANTIES. * *----------------------------------------------------------------------------- */ #ifdef _MSC_VER # define _CRT_SECURE_NO_DEPRECATE #endif #include <tcl.h> #include <tclOO.h> #include <tdbc.h> #include <stdio.h> #include <string.h> #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #include "int2ptr_ptr2int.h" #ifdef USE_NATIVE_POSTGRES # include <libpq-fe.h> #else # include "fakepq.h" #endif /* Include the files needed to locate htons() and htonl() */ #ifdef _WIN32 typedef int int32_t; typedef short int16_t; # define WIN32_LEAN_AND_MEAN # include <windows.h> # include <winsock2.h> # ifdef _MSC_VER # pragma comment (lib, "ws2_32") # endif #else # include <netinet/in.h> #endif #ifdef _MSC_VER # define snprintf _snprintf #endif /* Static data contained within this file */ static Tcl_Mutex pgMutex; /* Mutex protecting per-process structures */ static int pgRefCount = 0; /* Reference count for the PG load handle */ static Tcl_LoadHandle pgLoadHandle = NULL; |
︙ | ︙ |