summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/windows/Windows.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Remove a now redundant windows specific workaroundMartin Storsjo2019-09-231-5/+0
| | | | | | | | | | | | | | | | vsnprintf(NULL, 0, ...) works for measuring the needed string size on all supported Windows variants; it's supported since at least MSVC 2015 (and LLVM requires a newer version than that), and works on both msvcrt.dll (since at least XP) and UCRT with MinGW. The previous use of ifdefs was wrong as well, as __MINGW64__ only is defined for 64 bit targets, and the define without trailing underscores is never defined automatically (neither by clang nor by gcc). Differential Revision: https://reviews.llvm.org/D67861 llvm-svn: 372591
* Remove usage of usleep in generic codePavel Labath2019-08-051-5/+0
| | | | | | | | This function is not portable, and there are only a handful of usages of it anyway. Replacing it with std::this_thread::sleep_for enables us to get rid of the compatibility code in PosixApi.h. llvm-svn: 367814
* Fix LLDB warnings when compiling with Clang 8.0Alexandre Ganea2019-05-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D62021 llvm-svn: 361295
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Replace chdir() usage with the llvm equivalent.Pavel Labath2017-01-251-9/+0
| | | | | | | This removes a hack in PosixApi.h, which tends to produce strange compile errors when it's included in the wrong order. llvm-svn: 293045
* Replace getcwd with the llvm equivalentPavel Labath2017-01-231-25/+2
| | | | | | | | | | | | | | | | | | | | | Summary: getcwd() is not available (well.. um.. deprecated?) on windows, and the way PosixApi.h is providing it causes strange compile errors when it's included in the wrong order. The best way to avoid that is to just not use chdir. This replaces all uses of getcwd in generic code. There are still a couple of more uses, but these are in platform-specific code. chdir() is causing a similar problem, but for that there is no llvm equivalent for that (yet). Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28858 llvm-svn: 292795
* Again fixing windows build breakage like in rL282862Dimitar Vlahovski2016-09-301-2/+2
| | | | llvm-svn: 282866
* Fixing windows build breakage caused by rL282822Dimitar Vlahovski2016-09-301-10/+10
| | | | | | | The breakage was because of the moving of the UTF functions to the llvm namespace llvm-svn: 282862
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-212/+189
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Delete Host/windows/win32.hZachary Turner2016-08-091-1/+1
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* Fix Windows build.Chaoren Lin2016-04-191-0/+1
| | | | llvm-svn: 266702
* Unicode support on Win32.Zachary Turner2016-03-221-51/+105
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* Inline fake snprintf to avoid linkage issues on Windows.Chaoren Lin2015-08-201-6/+5
| | | | | | | | | | | | | | Summary: dllexport doesn't work if linking against a static library with its own copy of snprintf. Reviewers: zturner Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D12206 llvm-svn: 245610
* Some fixes to get LLDB compiling with MSVC 2015.Zachary Turner2015-07-241-0/+2
| | | | llvm-svn: 243174
* Implement snprintf for MSVC with correct return value.Chaoren Lin2015-05-291-2/+27
| | | | | | | | | | Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10048 llvm-svn: 238599
* Windows: fix bug in getcwd() and add chdir().Ted Woodward2015-05-121-3/+15
| | | | | | | | | | | | | | | | | Summary: GetCurrentDirectory() returns the number of characters copied; 0 is a failure, not a success. Add implementation for chdir(). Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9300 llvm-svn: 237162
* [Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.Zachary Turner2014-07-291-19/+2
| | | | llvm-svn: 214197
* Added some missing header files.Hafiz Abid Qadeer2014-03-121-0/+1
| | | | | | They help fix mingw build. llvm-svn: 203650
* Added some MSVC required functions in Windows.cpp. Moved MSVC specific ↵Virgile Bello2013-09-071-1/+64
| | | | | | getopt code inside its own folder. llvm-svn: 190238
* Fix MinGW build after lldb-platform-work merge:Virgile Bello2013-08-271-1/+1
| | | | | | | | | - mode_t is defined in <sys/types.h> - reorganized S_* user rights into win32.h - Use Host::Kill instead of kill - Currently #ifdef functions using pread/pwrite. llvm-svn: 189364
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-0/+146
portability. llvm-svn: 189107
OpenPOWER on IntegriCloud