[freetds] COMPILATION UNDER QNX 4.25

Lowden, James K LowdenJK at bernstein.com
Mon Jul 21 15:19:08 EDT 2003


> From: GUTIERREZ Pablo TESIS-TAMSA [mailto:Tesgup at tamsa.com.mx]
> Sent: July 21, 2003 12:30 PM
> 
> The ./configure script that you generated
> ran fine in my QNX machine and detected sys/select.h:
> 
> # ./configure | grep -e select
> checking sys/select.h usability... yes
> checking sys/select.h presence... yes
> checking for sys/select.h... yes
> 
> but I can't see a #define HAVE_SELECT_H 1 in include/config.h.
>
> It also detected both _vbprintf() and _bprintf functions OK 
> (the same issue in the config.h file).

That's odd, Pablo.  I'd try "rm config.* include/config.h; ./configure".  

Here's what I get:

$ grep -E 'SELECT|PRINT' build/include/config.h
#define HAVE_ASPRINTF 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_VASPRINTF 1
#define HAVE_VSNPRINTF 1
/* #undef HAVE__BPRINTF */
/* #undef HAVE__VBPRINTF */

> (I cannot see the patch that I sent in the Nightly Snapshot, 
> but I do see it if I browse the CVS copy via WWW).

Thanks for pointing that out.  Apparently, as if the SF CVS troubles we've
had lately were not enough, I can't FTP to the correct directory on ibiblio.
I'll have to mail the admin.  In the meantime, you can use:

http://www.schemamania.org/projects/snapshot/freetds-0.62.dev.20030721.tar.g
z


> It seems that src/replacements/iconv.h was recently re 
> written (yes, I known
> it for sure, since I read related messages), and one of the 
> new lines uses
> the EILSEQ errno value (line 203).
> 
> The problem is that QNX4 errno.h doesn't have that definition 

What does "man 3 iconv" say it will set errno to?  

$ man 3 iconv |col |grep EI
...
       EILSEQ An invalid multibyte sequence has been  encountered
       EINVAL An incomplete multibyte sequence has been encoun-

Does your iconv not distinguish between and invalid sequence and an
incomplete one?  

In case your answer is No, the patch, below, is a little less invasive ;-)
than your version.  

The tds.h/tdsiconv.h files need some attention.  Once we get our iconv work
sorted out, we have to address just what needs to be public and what
doesn't.  Part of the problem is that tds.h is exposed to user programs via
include/sybdb.h and others.  We shouldn't do that.  Instead, we should find
the minimum set that must be exposed, put them in a separate file, and move
the rest to tds_internal.h or similar.  

Regards, 

--jkl

$ cvs diff include/tdsiconv.h
jklowden at cvs.sourceforge.net's password:
Index: include/tdsiconv.h
===================================================================
RCS file: /cvsroot/freetds/freetds/include/tdsiconv.h,v
retrieving revision 1.18
diff -u -r1.18 tdsiconv.h
--- include/tdsiconv.h  5 Jul 2003 15:09:15 -0000       1.18
+++ include/tdsiconv.h  21 Jul 2003 18:02:23 -0000
@@ -24,7 +24,10 @@
 static void *no_unused_tds_iconv_h_warn[] = { rcsid_tds_iconv_h,
no_unused_tds_iconv_h_warn };

 #if HAVE_ICONV
-#include <iconv.h>
+# include <iconv.h>
+# ifndef EILSEQ
+#  define EILSEQ EINVAL
+# endif
 #else
 /* Define iconv_t for src/replacements/iconv.c. */
 #undef iconv_t

-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.




More information about the FreeTDS mailing list