missing #ifdef for CS_USHORT_TYPE

Skip Montanaro <[email protected]> Wed, 21 Apr 2004 09:02:43 -0500
Newsgroups gmane.comp.python.sybase
Message-ID <[email protected]>
(I'm not subscribed.  I just downloaded the sybase module today for the
first time to try it out and am passing along my findings.)

I downloaded 0.36 today to a Solaris 9/Intel system and built it.  GCC
complained:

    sybasect.c: In function `sybasect_sizeof_type':
    sybasect.c:311: error: `CS_USHORT_TYPE' undeclared (first use in this function)
    sybasect.c:311: error: (Each undeclared identifier is reported only once
    sybasect.c:311: error: for each function it appears in.)
    error: command 'gcc' failed with exit status 1

Noticing that there was an #ifdef CS_USHORT_TYPE later in the file I
#ifdef'd that usage as well.  The module build ran to completion after
that.  (I've yet to actually try it.)  A context diff for sybasect.c is
appended.

-- 
Skip Montanaro
Got gigs? http://www.musi-cal.com/submit.html
Got spam? http://www.spambayes.org/
[email protected]

*** /tmp/skipm/sybasect.c~      Wed Apr 21 08:57:28 2004
--- /tmp/skipm/sybasect.c       Wed Apr 21 08:57:28 2004
***************
*** 308,316 ****
--- 308,318 ----
      case CS_LONG_TYPE:
        size = sizeof(CS_LONG);
        break;
+ #ifdef CS_USHORT_TYPE
      case CS_USHORT_TYPE:
        size = sizeof(CS_USHORT);
        break;
+ #endif
  #ifdef CS_CLIENTMSG_TYPE
      case CS_CLIENTMSG_TYPE:
        size = sizeof(CS_CLIENTMSG);