Patch for compiling with FreeTDS current

"hopfgartner" <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <[email protected]>
The following makes 2 changes in freetds.h:

1) The definition of CS_CLEAR is removed, since it's
defined in the FreeTDS headers.

2) The prototype of ct_commant got a const qualifier.

This enables compilation for FreeTDS current, as of
November 28.

Peter
sybase.diff (application/octet-stream, 941 B)
--- sybase-0.36pre1/freetds.h	2002-11-21 07:05:29.000000000 +0100
+++ sybase-0.36pre1.my/freetds.h	2002-11-28 08:58:43.000000000 +0100
@@ -79,7 +79,7 @@
 
 /* Emulate Sybase inline error handling
  */
-#define CS_CLEAR 35
+/*#define CS_CLEAR 35 */
 #define CS_INIT 36
 #define CS_STATUS 37
 #define CS_MSGLIMIT 38
@@ -111,7 +111,7 @@
 CS_RETCODE ct_close(CS_CONNECTION *con, CS_INT option);
 CS_RETCODE ct_cmd_alloc(CS_CONNECTION *con, CS_COMMAND **cmd);
 CS_RETCODE ct_cmd_drop(CS_COMMAND *cmd);
-CS_RETCODE ct_command(CS_COMMAND *cmd, CS_INT type, CS_VOID *buffer, CS_INT buflen, CS_INT option);
+CS_RETCODE ct_command(CS_COMMAND *cmd, CS_INT type, const CS_VOID *buffer, CS_INT buflen, CS_INT option);
 CS_RETCODE ct_con_alloc(CS_CONTEXT *ctx, CS_CONNECTION **con);
 CS_RETCODE ct_con_drop(CS_CONNECTION *con);
 CS_RETCODE ct_con_props(CS_CONNECTION *con, CS_INT action, CS_INT property, CS_VOID *buffer, CS_INT buflen, CS_INT *out_len);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.