> I'm implementing a WinCE 4.x (Pocket PC 2003) application
> which needs to get data from a postgres database, so I
> "hacked" the 8.1.2 libpq source so I could get it working.
> Well, it seems to be working ok, but, as I don't know the
> code, have no idea if my hack is acceptable or induces other
> bugs I haven't seen yet.
# 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.
- if (getsockopt(conn->sock, SOL_SOCKET,
- (char *)
&optval, &optlen) == -1)
+ int err = getsockopt(conn->sock,
(char *) &optval, &optlen);
+ /* This was "googled" from the curl
library source */
+ /* Always returns this error, bug in CE?
+ if ( err == -1 && SOCK_ERRNO ==
+ 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.
Apart from that it looks OK to me. There definitly needs to be some
documentation on how to build it, though...
pgsql-ports by date
|Next:||From: Nuno Lucas||Date: 2006-04-13 09:41:27|
|Subject: Re: WinCE/Pocket PC port for the C client library|
|Previous:||From: Nuno Lucas||Date: 2006-04-13 08:50:13|
|Subject: WinCE/Pocket PC port for the C client library|