#
e9a7d4a1 |
| 21-Nov-2023 |
Viktor Szakats |
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. T
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. The agreement seems to be that `_WIN32` is the preferred practice here. Make the source code rely on that to detect we're building for Windows. Public `curl.h` was using `WIN32`, `__WIN32__` and `CURL_WIN32` for Windows detection, next to the official `_WIN32`. After this patch it only uses `_WIN32` for this. Also, make it stop defining `CURL_WIN32`. There is a slight chance these break compatibility with Windows compilers that fail to define `_WIN32`. I'm not aware of any obsolete or modern compiler affected, but in case there is one, one possible solution is to define this macro manually. grepping for `WIN32` remains useful to discover Windows-specific code. Also: - extend `checksrc` to ensure we're not using `WIN32` anymore. - apply minor formatting here and there. - delete unnecessary checks for `!MSDOS` when `_WIN32` is present. Co-authored-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #12376
show more ...
|
#
764e4f06 |
| 02-Jan-2022 |
Daniel Stenberg |
tool_findfile: check ~/.config/curlrc too ... after the initial checks for .curlrc and if XDG_CONFIG_HOME is not set, use $HOME and $CURL_HOME to check if ~/.config/curlrc is present.
tool_findfile: check ~/.config/curlrc too ... after the initial checks for .curlrc and if XDG_CONFIG_HOME is not set, use $HOME and $CURL_HOME to check if ~/.config/curlrc is present. Add test 436 to verify Reported-by: Sandro Jaeckel Fixes #8208 Closes #8213
show more ...
|
#
2be1aa61 |
| 19-Nov-2021 |
Daniel Stenberg |
tool_findfile: search for a file in the homedir The homedir() function is now renamed into findfile() and iterates over all the environment variables trying to access the file in questio
tool_findfile: search for a file in the homedir The homedir() function is now renamed into findfile() and iterates over all the environment variables trying to access the file in question until it finds it. Last resort is then getpwuid() if available. Previously it would first try to find a home directory and if that was set, insist on checking only that directory for the file. This now returns the full file name it finds. The Windows specific checks are now done differently too and in this order: 1 - %USERPROFILE% 2 - %APPDATA% 3 - %USERPROFILE%\\Application Data The windows order is modified to match how the Windows 10 ssh tool works when it searches for .ssh/known_hosts. Reported-by: jeffrson on github Co-authored-by: Jay Satiro Fixes #8033 Closes #8035
show more ...
|