freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] COMPILATION UNDER QNX 4.25 - PATCH FOR FREETDS/QNX
- From: GUTIERREZ Pablo TESIS-TAMSA <Tesgup AT tamsa.com.mx>
- To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] COMPILATION UNDER QNX 4.25 - PATCH FOR FREETDS/QNX
- Date: Sat, 19 Jul 2003 17:23:32 -0500
Here is the patch for read.c/login.c/write.c that includes sys/select.h.
-----Original Message-----
From: James K. Lowden [mailto:jklowden AT schemamania.org]
Sent: Saturday, July 19, 2003 2:15 PM
To: FreeTDS Development Group
Subject: Re: [freetds] COMPILATION UNDER QNX 4.25
On Sat, 19 Jul 2003 13:18:17 -0500, GUTIERREZ Pablo TESIS-TAMSA
<Tesgup AT tamsa.com.mx> wrote:
>
> I'd like to help to make freetds easier to be built under QNX
> 4.25/WATCOM C,
Hi, Pablo. Let's see if we can help you.
> The fd_set type under QNX 4 is declared into <sys/select.h>
I added detection for sys/select.h to configure.in (generates
./configure). That should automatically notice the file. It will be in
tomorrow's snapshot. Please post a patch with:
#if HAVE_SELECT_H
# include <sys/select.h>
#endif /* HAVE_SELECT_H */
in the appropriate files.
> QNX
> int _vbprintf (char* buf, size_t count, const char* format, va_list arg
> ); int _bprintf (char* buf, size_t count, const char* format, ...);
> LINUX
> int vsnprintf(char* buf, size_t count, const char* format, va_list arg
> ); int snprintf(char *str, size_t size, const char *format, ...);
These are very nonstandard functions. I suppose the least intrusive
approach is to add something like this to include/tds_sysdep_private.h:
#if defined (__QNX__)
# define vsnprintf _vbprintf
# define snprintf _bprintf
#endif /* QNX */
If you do that and it works, please send us the patch, and I'll apply it.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
diff -ru tds/login.c tds_qnx/login.c
--- tds/login.c Sat Jul 5 09:09:19 2003
+++ tds_qnx/login.c Sat Jul 19 17:16:55 2003
@@ -73,6 +73,10 @@
#include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
+#if HAVE_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SELECT_H */
+
#include "tds.h"
#include "tdsiconv.h"
#include "tdsstring.h"
diff -ru tds/read.c tds_qnx/read.c
--- tds/read.c Fri Jul 11 09:08:11 2003
+++ tds_qnx/read.c Sat Jul 19 17:16:55 2003
@@ -54,6 +54,10 @@
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
+#if HAVE_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SELECT_H */
+
#include <assert.h>
#include "tds.h"
diff -ru tds/write.c tds_qnx/write.c
--- tds/write.c Sat Jul 5 09:09:19 2003
+++ tds_qnx/write.c Sat Jul 19 17:16:55 2003
@@ -56,6 +56,10 @@
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
+#if HAVE_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SELECT_H */
+
#include "tds.h"
#include "tdsiconv.h"
#include <signal.h> /* GW ADDED */
- RE: [freetds] COMPILATION UNDER QNX 4.25 - PATCH FOR FREETDS/QNX, GUTIERREZ Pablo TESIS-TAMSA, 07/19/2003
Archive powered by MHonArc 2.6.24.