Skip to content
Tcl Source Code History Of Ticket 64165953a0b47780
Login

History Of Ticket 64165953a0b47780

Artifacts Associated With Ticket 64165953a0b47780

  1. Ticket change [f75322599d] (rid 217384) by anonymous on 2023-08-26 15:29:17:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      In Tcl 8.7 and 9.0 the following macro is defined in tcl.h:
      #define TCL_SIZE_MAX PTRDIFF_MAX
      
      The macro PTRDIFF_MAX is defined in header file stdint.h, 
      but this header file is not included in tcl.h.
      
      I would suggest to add the following line to tcl.h:
      #include <stdint.h>
      
    5. foundin initialized to: "9.0"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "2e499ca9e0149983f6f63603feedc5b33bc05f5e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "69. Other"
    15. title initialized to:
      Compilation error of C extensions due to TCL_SIZE_MAX definition
      
    16. type initialized to: "Bug"
  2. Ticket change [e9e79e9857] (rid 217394) by jan.nijtmans on 2023-08-27 16:55:34:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460184.20526512"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [here|f9875fd78bf62318]
      
      Since INT_MAX is defined by <limits.h> and PTRDIFF_T by <stdint.h>, it would mean that the set of header files included by <tcl.h> would be different in Tcl 8.7 and 9.0. That's why it's better - just for this single usage - to #define TCL_SIZE_MAX without using INT_MAX/PTRDIFF_MAX.
      
      Thanks for your report!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  3. Ticket change [434737f391] (rid 217399) by anonymous on 2023-08-27 19:21:34:

    1. closedate changed to: "2460184.30665053"
    2. closer changed to: "anonymous"
    3. icomment:
      Hi Jan,
      
      unfortunately your change breaks the Tcl9 build.
      In file tclInt.h (function TclGetSizeIntFromObj) the line
      #if TCL_SIZE_MAX == INT_MAX
      cannot be resolved by the pre-processor anymore with the new TCL_SIZE_MAX definition.
      
      Paul
      
    4. login: "anonymous"
    5. mimetype: "text/plain"
  4. Ticket change [a0fa3cfbef] (rid 217404) by jan.nijtmans on 2023-08-27 20:27:43:

    1. closedate changed to: "2460184.35258851"
    2. closer changed to: "jan.nijtmans"
    3. icomment: "Thanks! [2e65fce4cf9d6cf4]"
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
  5. Ticket change [25b5e55bb7] (rid 217408) by apnadkarni on 2023-08-28 03:09:09:

    1. closedate changed to: "2460184.63136338"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Not that I understand why the set of header files needs to be the same between 8.7 and 9.0, but if that is the case the right fix would have been to include `stdint.h` in 8.7 as well. Particularly when we are talking about C99 standard headers.
      
      There are other types and macros in that header that Tcl should be making use of instead of rolling its own and the move should be towards using standardised headers and types, not the other way.
      
      
      /Ashok
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-markdown"