Skip to content
Tcl Source Code History Of Ticket 3599194
Login

History Of Ticket 3599194

Artifacts Associated With Ticket 3599194

  1. Ticket change [327e61d66a] (rid 93622) by afredd on 2013-01-02 10:44:01:

    1. assignee initialized to: "mdejong"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The function freeaddrinfo() in fake-rfc2553.c should be called fake_freeaddrinfo()
      since the header file fake-rfc2553.h has:
      
      #ifndef HAVE_FREEADDRINFO
      #define freeaddrinfo(a)         (fake_freeaddrinfo(a))
      void freeaddrinfo(struct addrinfo *);
      #endif /* !HAVE_FREEADDRINFO */
      
      
      When compiled it fails to find a definition for fake_freeaddrinfo!
      
      Here is a patch diff to fix this and a couple of other issues the compiler found.
      
      
      diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c
      index 666144f..3bb2834 100644
      --- a/compat/fake-rfc2553.c
      +++ b/compat/fake-rfc2553.c
      @@ -84,7 +84,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
      
              if (host != NULL) {
                      if (flags & NI_NUMERICHOST) {
      -                       int len;
      +                       size_t len;
                              Tcl_MutexLock(&netdbMutex);
                              len = strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
                              Tcl_MutexUnlock(&netdbMutex);
      @@ -135,7 +135,7 @@ fake_gai_strerror(int err)
      
       #ifndef HAVE_FREEADDRINFO
       void
      -freeaddrinfo(struct addrinfo *ai)
      +fake_freeaddrinfo(struct addrinfo *ai)
       {
              struct addrinfo *next;
      
      @@ -199,7 +199,7 @@ fake_getaddrinfo(const char *hostname, const char *servname,
      
                      port = strtol(servname, &cp, 10);
                      if (port > 0 && port <= 65535 && *cp == '\0')
      -                       port = htons(port);
      +                       port = htons((unsigned short) port);
                      else if ((sp = getservbyname(servname, NULL)) != NULL)
                              port = sp->s_port;
                      else
      
      
      
      
      
      
    4. foundin initialized to: "current: 8.6.0"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "afredd"
    10. subsystem initialized to: "52. Portability Support"
    11. title initialized to: "compat/fake-rfc2553.c is broken"
    12. type initialized to: "Bug"
  2. Ticket change [4d29956cf9] (rid 127015) by nijtmans on 2013-01-02 18:07:56:

    1. assignee changed to: "rmax"
  3. Ticket change [435b46d01d] (rid 116544) by rmax on 2013-01-02 18:15:56:

    1. icomment:
      Thanks for your report, I'll have a look at it.
      Just out of curiosity: What platform building Tcl on that needs this fake-rfc2553 stuff?
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  4. Ticket change [46111062a3] (rid 99452) by afredd on 2013-01-02 20:14:11:

    1. icomment:
      > >Comment By: Reinhard Max (rmax)
      > Date: 2013-01-02 03:15
      > 
      > Message:
      > Thanks for your report, I'll have a look at it.
      > Just out of curiosity: What platform building Tcl on that needs this
      > fake-rfc2553 stuff?
      > 
      
      It's a 'unix' build option driven by the configured symbol NEED_FAKE_RFC2553.
      In tclUnixPort.h there's:
      
        #ifdef NEED_FAKE_RFC2553
        # include "../compat/fake-rfc2553.h"
        #endif
      
      
      However, i'm on a 32 bit Win XP machine :-)
      
      Had to make a number of, er, hacks to make a git blead copy of Tcl
      to build which included using the fake-rfc2553 stuff.
      And yes i know this is not the Right Thing To Do. But i can at least
      now play around with the code. (8.5 used to build just fine on this
      machine without any hacks).
      
      Not sure who _really_ needs this. The only way i can see how this
      ever could have worked is if HAVE_FREEADDRINFO was also defined.
      Then the (fake_)?freeaddrinfo() would not have been compiled in.
      
      
      One more thing: the (unsigned short) cast in the call to htons()
      should really be a (uint16_t) cast; however, then you should really
      add a #include of <stdint.h> and i didn't want to further muddy
      the waters.
      
      
      
    2. login: "afredd"
    3. mimetype: "text/plain"
    4. username: "afredd"
  5. Ticket change [84e5e8ab06] (rid 117641) by nijtmans on 2013-02-24 03:01:58:

    1. closedate changed to: "2013-02-23T20:01:58"
    2. closer changed to: "nijtmans"
    3. icomment:
      To me afredd's remarks all look valid. So, committed to trunk now.
      
      Please confirm that everything is OK now.
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Pending"
    8. username: "nijtmans"
  6. Ticket change [bc3d5c5bcf] (rid 134170) by dkf on 2013-09-24 12:00:08:

    1. assignee changed to: "aku"
    2. closedate changed to: "2456560.00009796"
    3. closer changed to: "dkf"
    4. comment changed to:
      The function freeaddrinfo() in fake-rfc2553.c should be called fake_freeaddrinfo()
      since the header file fake-rfc2553.h has:
      
      #ifndef HAVE_FREEADDRINFO
      #define freeaddrinfo(a)         (fake_freeaddrinfo(a))
      void freeaddrinfo(struct addrinfo *);
      #endif /* !HAVE_FREEADDRINFO */
      
      
      When compiled it fails to find a definition for fake_freeaddrinfo!
      
      Here is a patch diff to fix this and a couple of other issues the compiler found.
      
      
      diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c
      index 666144f..3bb2834 100644
      --- a/compat/fake-rfc2553.c
      +++ b/compat/fake-rfc2553.c
      @@ -84,7 +84,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
      
              if (host != NULL) {
                      if (flags & NI_NUMERICHOST) {
      -                       int len;
      +                       size_t len;
                              Tcl_MutexLock(&netdbMutex);
                              len = strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
                              Tcl_MutexUnlock(&netdbMutex);
      @@ -135,7 +135,7 @@ fake_gai_strerror(int err)
      
       #ifndef HAVE_FREEADDRINFO
       void
      -freeaddrinfo(struct addrinfo *ai)
      +fake_freeaddrinfo(struct addrinfo *ai)
       {
              struct addrinfo *next;
      
      @@ -199,7 +199,7 @@ fake_getaddrinfo(const char *hostname, const char *servname,
      
                      port = strtol(servname, &cp, 10);
                      if (port > 0 && port <= 65535 && *cp == '\0')
      -                       port = htons(port);
      +                       port = htons((unsigned short) port);
                      else if ((sp = getservbyname(servname, NULL)) != NULL)
                              port = sp->s_port;
                      else
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"
    8. status changed to: "Closed"