Problem with database engine on Cygwin

Pierre A. Humblet pierre.humblet@ieee.org
Wed Apr 9 22:16:00 GMT 2003


On Wed, Apr 09, 2003 at 01:49:50PM -0600, dmay@tvi.edu wrote:
> 
> 	fd = creat (FILENAME, (S_IWRITE|S_IREAD));
> 	if (-1 == fd)	{
> 		printf ("\n\nError creating %s:\n", FILENAME);
> 		perror(0);
> 		return -1;
> 	}
> #ifdef __CYGWIN__
> 	fd = open (FILENAME, (O_RDWR|O_BINARY), (S_IREAD|S_IWRITE));
> #endif
> #ifndef __CYGWIN__
> 	fd = open (FILENAME, O_RDWR, (S_IREAD|S_IWRITE));
> #endif

Isn't the same file opened twice and fd overwritten?

Pierre


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list