Skip to Content.
Sympa Menu

freetds - RE: [freetds] COMPILATION UNDER QNX 4.25

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • 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
  • Date: Mon, 21 Jul 2003 14:19:04 -0500

For the config.h issue I should try with the snapshot you told me, but I
can't download the tar.gz since the browser reports a 500 INTERNAL ERROR.

===================
QNX4 doesn't have any iconv library, so my build uses
src/replacementes/iconv.c, and at least in that file EILSEQ is used.

$grep -n -e EINVAL src/replacements/iconv.c
205: errno = EILSEQ;

(by the way there is no 'man' command in QNX ;-) , although I wish it were)

So the final patch will be:
# ifndef EILSEQ
# define EILSEQ EINVAL
# endif

in src/replacements/iconv.c?
I didn't want to write that in the first time just in case (in some unknown
platform for me) EILSEQ wasn't a MACRO (that's why I added the __QNX__). Too
conservative? Ha ha.

Regards,
Pablo

-----Original Message-----
From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
Sent: Monday, July 21, 2003 12:19 PM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] COMPILATION UNDER QNX 4.25

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


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page