1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-27 08:52:26 +03:00

Improved support for cygwin. Ticket #1165. (CVS 2407)

FossilOrigin-Name: fcb5cee440ab49e39b62b177cbb04ab0b061a477
This commit is contained in:
drh
2005-03-21 00:36:08 +00:00
parent 47fb54da2e
commit 09bf0e8d5e
3 changed files with 18 additions and 7 deletions

View File

@@ -18,6 +18,10 @@
#include <winbase.h>
#ifdef __CYGWIN__
# include <sys/cygwin.h>
#endif
/*
** Macros used to determine whether or not to use threads.
*/
@@ -703,10 +707,17 @@ char *sqlite3OsFullPathname(const char *zRelative){
char *zNotUsed;
char *zFull;
int nByte;
#ifdef __CYGWIN__
nByte = strlen(zRelative) + MAX_PATH + 1001;
zFull = sqliteMalloc( nByte );
if( zFull==0 ) return 0;
if( cygwin_conv_to_full_win32_path(zRelative, zFull) ) return 0;
#else
nByte = GetFullPathNameA(zRelative, 0, 0, &zNotUsed) + 1;
zFull = sqliteMalloc( nByte );
if( zFull==0 ) return 0;
GetFullPathNameA(zRelative, nByte, zFull, &zNotUsed);
#endif
return zFull;
}