Reading too few bytes

2006-03-21 Thread Paul J. Lucas
Here's a small test program: #include #include #include using namespace std; int main() { int fd = ::open( "ESLF", O_RDONLY ); if ( fd == -1 ) { cerr << "could not open ESLF file" << endl;

Re: fopen with UTF-8 chars in filenames

2006-03-17 Thread Paul J. Lucas
On Fri, 17 Mar 2006, Christopher Faylor wrote: > Cygwin doesn't provide _wfopen. 1. I install Cygwin. 2. It's in stdio.h that gets installed as part of the Cygwin install. Therefore, as far as I'm concerned, it's in Cygwin. > So, if you are using _wfopen you stopped using Cygwin, then, too, pos

Re: fopen with UTF-8 chars in filenames

2006-03-17 Thread Paul J. Lucas
On Thu, 16 Mar 2006, Christopher Faylor wrote: > I don't know if doing what the OP wants is possible on Cygwin ... I solved my problem by using _wfopen() and converting the path to UTF-16 first. Unless there's a way to work directly with UTF-8, I'll stick with that.

fopen with UTF-8 chars in filenames

2006-03-14 Thread Paul J. Lucas
Is this known to work (or not work)? Apparently, it doesn't. FYI: I'm writing JNI code. The strings passed from Java to C are UTF-8. A string containing a non-ASCII character, e.g., an 'e' with an accent, works fine with fopen() under Mac OS X. The same

stat(2) of a directory

2006-03-04 Thread Paul J. Lucas
Under *nix, I can use stat(2) of a directory to know when its contents have changed (file added or deleted from it). Under cygwin, this doesn't work because a directory's modification time doesn't change when its contents change. Any recommendations as to h

Missing INTERNET_CONNECTED_INFO ?

2006-02-20 Thread Paul J. Lucas
Why isn't this structure declared in wininet.h like this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internet_connected_info.asp says it is? Same goes for INTERNET_STATE_CONNECTED, INTERNET_STATE_DISCONNECTED, etc. - Paul -- Unsubscribe info: http://c

libtiff, libjpeg, cygwin compile problems

2005-12-04 Thread Paul J. Lucas
I'm trying to compile libtiff (using libjpeg) under cygwin and I'm getting all kinds of compile-time errors. FYI: I need to compile with the -mno-cygwin flag to gcc since my software as a whole can't depend on the end-user having cygwin installed. libjpeg (

windres VERSIONINFO not working

2005-11-17 Thread Paul J. Lucas
I'm trying to use gcc and windres to build a small native Windows application. When compiling, I'm using -mno-cygwin; when linking, I'm using -mwindows. To generate a .res file from a .rc file, I'm using: windres -O coff $< $@ in my makefi

Error in GetICMProfile() declaration

2005-11-11 Thread Paul J. Lucas
In /usr/include/w32api/wingdi.h, GetICMProfile() has its second argument declared as a DWORD. According to: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/icm/icm_5aed.asp it should be declared as an LPDWORD. Indeed, in order to call this function correctly, I current have to