mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 07:29:23 +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 0
|
||||
#if !defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) \
|
||||
&& !defined(__RTP__) && !defined(_WRS_KERNEL)
|
||||
{
|
||||
|
@ -20723,6 +20724,7 @@ static char *find_home_dir(int clearFlag){
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
|
||||
|
@ -20730,18 +20732,15 @@ static char *find_home_dir(int clearFlag){
|
|||
home_dir = "/";
|
||||
#else
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
if (!home_dir) {
|
||||
if (IsWindows() && !home_dir) {
|
||||
home_dir = getenv("USERPROFILE");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!home_dir) {
|
||||
home_dir = getenv("HOME");
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
if (!home_dir) {
|
||||
if (IsWindows() && !home_dir) {
|
||||
char *zDrive, *zPath;
|
||||
int n;
|
||||
zDrive = getenv("HOMEDRIVE");
|
||||
|
@ -20755,7 +20754,6 @@ static char *find_home_dir(int clearFlag){
|
|||
}
|
||||
home_dir = "c:\\";
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_WIN32_WCE */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue