From: Nuno Lucas <ntlucas@gmail.com>
To: Magnus Hagander <mha@sollentuna.net>
Cc: pgsql-ports@postgresql.org
Subject: Re: WinCE/Pocket PC port for the C client library
Date: Thu, 13 Apr 2006 10:41:27 +0100
Message-ID: <c4f20e170604130241w58bfc8adua973f88562e43e77@mail.gmail.com> (raw)
In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCEA352A4@algol.sollentuna.se>
References: <6BCB9D8A16AC4241919521715F4D8BCEA352A4@algol.sollentuna.se>
On 4/13/06, Magnus Hagander <mha@sollentuna.net> wrote:
> # add_file "src/include/pg_config.h"
> # add_file "src/include/pg_config_paths.h"
>
> This part certainly isn't right :-) Those files are supposed to be
> auto-generated, not put in the source.
Right. It's here just for convenience and because there is no chance
of autogenerating those (no autoconf port that I know of will ever
understand a WinCE target).
Maybe they should be already generated with some other name (e.g.,
pg_config_wince.h) and some readme telling users to rename/move them
to the right place.
> As for:
> - if (getsockopt(conn->sock, SOL_SOCKET,
> SO_ERROR,
> - (char *)
> &optval, &optlen) == -1)
> + int err = getsockopt(conn->sock,
> SOL_SOCKET, SO_ERROR,
> +
> (char *) &optval, &optlen);
> +#if defined(_WIN32_WCE)
> + /* This was "googled" from the curl
> library source */
> + /* Always returns this error, bug in CE?
> */
> + if ( err == -1 && SOCK_ERRNO ==
> WSAENOPROTOOPT )
> + err=0;
> +#endif
> + if ( err == -1 )
>
>
> Does it actually *have* the option and fail to set it, or is the option
> just not there? If it doesn't exist, you should just #ifdef out the
> tryign to set the option, IMHO.
I really have no idea.
It seems it accepts the option, but always returns the error when
checking for it on WinCE.
After I tried googling for it I discovered the curl library port for
WinCE also checks for that error and ignores it (on WinCE).
I was hoping some WinCE sockets "guru" could explain that to me ;-)
A link to some curl library source I found with google is here:
http://cool.haxx.se/cvs.cgi/curl/lib/connect.c?rev=1.120&content-type=text/vnd.viewcvs-markup
Look for the verifyconnect() static function and you'll notice their use.
> Apart from that it looks OK to me. There definitly needs to be some
> documentation on how to build it, though...
Yeah, that's why I included the eVC 4 project files, which include
projects for building it as static library and as a DLL.
For those that know it's way around the eVC compiler it should be easy
enough to see what files need to be included on the project.
As I'm not an english native speaker I was hopping some interested
user would help in the documentation.
Best regards,
~Nuno Lucas
P.S.- I had an old sourceforge project when I ported SQLite for WinCE
(which is now part of the official source) and as the SQLmd is also a
SQLite utility program, I put the source there (instead of in my
bandwidth limited home server).
You can get the source here:
http://sourceforge.net/project/showfiles.php?group_id=88393&package_id=187273&release_id=409...>
> //Magnus
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-ports@postgresql.org
Cc: ntlucas@gmail.com, mha@sollentuna.net
Subject: Re: WinCE/Pocket PC port for the C client library
In-Reply-To: <c4f20e170604130241w58bfc8adua973f88562e43e77@mail.gmail.com>
References: <6BCB9D8A16AC4241919521715F4D8BCEA352A4@algol.sollentuna.se> <c4f20e170604130241w58bfc8adua973f88562e43e77@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox