[freetds] COMPILATION UNDER QNX 4.25

GUTIERREZ Pablo TESIS-TAMSA Tesgup at tamsa.com.mx
Sat Jul 19 17:18:00 EDT 2003


Hi James,

1) I'll send you a patch for to include <select.h> if appropriated.
2) The problem is that even when I already made 

#if defined (__QNX__) && defined (__WATCOMC__)
# define vsnprintf _vbprintf
# define  snprintf  _bprintf
#endif /* QNX */
(in ./include/tds_sysdep_private.h )

./configure says that the function vsnprintf() is not present, so
./include/config.h doesn't define HAVE_VSNPRINTF => All the code that use
vsnprintf is not compiled.
What can I do?


-----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


More information about the FreeTDS mailing list