Menu

#11 Patch to build with Sybase 12.5 on WinXP/mingw

open
nobody
None
5
2010-12-23
2010-12-23
No

Attempt to build using the mingw compiler on Windows XP using the real Sybase libs fails at link stage. Root cause is that the nasty tangle of #ifs in the Sybase csconfig.h header doesn't properly set CS_PUBLIC for this compiler, so header doesn't have the correct __stdcall attributes, causing the linker to fail (.o file has "blk_alloc", .lib has "_blk_alloc").

Attached patch fixes this.... If I understand things, this should also fix similar issues with cygwin and other non-VisualStudio compilers, and should not hurt for VisualStudio, but I have no way of testing this claim.

Patch should not affect FreeTDS users.

I also have no way of knowing inf this is a problem or of testing this patch with other Sybase versions.

Discussion

  • Gregory Bond

    Gregory Bond - 2010-12-23

    Patch for setup.py for NT/mingw for Sybase 12.5 OCS libs

     
  • Robert Boehne

    Robert Boehne - 2010-12-23

    This seems pretty harmless to me, and it is Windows-specific. I'm going to approve this and commit it.

     
  • Robert Boehne

    Robert Boehne - 2010-12-23

    Hmm, Wait a minute. When I look at "csconfig.h" in a 12.5 installation, I don't see any references to _BORLANDC_ but I see references to __BORLANDC__
    Why the mismatch?

     
  • Gregory Bond

    Gregory Bond - 2010-12-23

    Oops, you're right. I still had a hacked csconfig.h.
    Also, original solution had some warnings as a side-effect, second patch (attached) avoids those, at the cost of possibly breaking real users of Borland C (if there are any left, and which is not supported for Python modules anyway!)

     
  • Gregory Bond

    Gregory Bond - 2010-12-23
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.