mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 15:38:22 +00:00
parent
8d7d00af3a
commit
29cb53881e
1 changed files with 4 additions and 6 deletions
10
third_party/sqlite3/shell.c
vendored
10
third_party/sqlite3/shell.c
vendored
|
@ -20713,6 +20713,7 @@ static char *find_home_dir(int clearFlag){
|
||||||
}
|
}
|
||||||
if( home_dir ) return home_dir;
|
if( home_dir ) return home_dir;
|
||||||
|
|
||||||
|
#if 0
|
||||||
#if !defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) \
|
#if !defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) \
|
||||||
&& !defined(__RTP__) && !defined(_WRS_KERNEL)
|
&& !defined(__RTP__) && !defined(_WRS_KERNEL)
|
||||||
{
|
{
|
||||||
|
@ -20723,6 +20724,7 @@ static char *find_home_dir(int clearFlag){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32_WCE)
|
#if defined(_WIN32_WCE)
|
||||||
/* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
|
/* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
|
||||||
|
@ -20730,18 +20732,15 @@ static char *find_home_dir(int clearFlag){
|
||||||
home_dir = "/";
|
home_dir = "/";
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(WIN32)
|
if (IsWindows() && !home_dir) {
|
||||||
if (!home_dir) {
|
|
||||||
home_dir = getenv("USERPROFILE");
|
home_dir = getenv("USERPROFILE");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!home_dir) {
|
if (!home_dir) {
|
||||||
home_dir = getenv("HOME");
|
home_dir = getenv("HOME");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(WIN32)
|
if (IsWindows() && !home_dir) {
|
||||||
if (!home_dir) {
|
|
||||||
char *zDrive, *zPath;
|
char *zDrive, *zPath;
|
||||||
int n;
|
int n;
|
||||||
zDrive = getenv("HOMEDRIVE");
|
zDrive = getenv("HOMEDRIVE");
|
||||||
|
@ -20755,7 +20754,6 @@ static char *find_home_dir(int clearFlag){
|
||||||
}
|
}
|
||||||
home_dir = "c:\\";
|
home_dir = "c:\\";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !_WIN32_WCE */
|
#endif /* !_WIN32_WCE */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue