Commit Graph

40 Commits

Author SHA1 Message Date
Vitalii Koshura 44742026e2
Remove trailing whitespaces. Add CI script to verify in on every commit
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2023-05-05 20:08:17 +02:00
Brian Nixon a35bac6065 Remove "%z" for compatibility with MinGW-MSVCRT 2023-04-11 09:13:08 +01:00
Brian Nixon 57eb907acb Reduce source code size 2023-04-11 08:37:21 +01:00
Brian Nixon 0871f73f18 Eliminate even more warnings 2023-04-10 22:17:27 +01:00
Brian Nixon 4b6f895534 Correct return types 2023-04-10 21:18:59 +01:00
Brian Nixon 8e5054248d Improve Windows diagnostics 2023-04-10 20:58:13 +01:00
barton26 4ee2403752 fix typos I missed 2021-10-12 03:04:25 -04:00
barton26 985cecddca lib typos 2021-10-06 14:42:17 -04:00
Vitalii Koshura 3328871e22
[Windows] Build using ARM64
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2021-09-10 12:34:20 +02:00
davidpanderson e021bdf867 Windows: fix many VS2019 compile warnings. No functional changes. 2020-06-12 09:33:34 -07:00
David Anderson fad4210f7b Various files: simplify #includes.
On Windows, include boinc_win.h
No references to STDWX_H, STDAFX_H etc.

Note: .cpp files should not have a bunch of gnarly #if logic in their includes.
If such logic is needed, put it in a central place.
2020-06-04 01:24:49 -07:00
Vitalii Koshura 3d2fdc8508
lib: Move 'strlen' function outside of the loop
From PVS Studio:
V814
Decreased performance. The 'strlen' function was called multiple times inside the body of a loop.
https://www.viva64.com/en/w/V814/print

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-05-02 16:10:10 +03:00
David Anderson 8c27b8ffda Don't use names of the form _BOINCxx
Also, declare structs without a lot of noise
2017-04-14 00:44:44 -07:00
David Anderson 3aa6b289cd Merge pull request #1743 from sirzooro/cygwin-mingw-compilation-fix
Fixed compilation using MinGW from Cygwin 32 and 64 bit
2017-02-02 23:43:01 -08:00
David Anderson d626dfd8d5 client/wrappers, Win: consolidate defines for _getcwd etc in boinc_win.h
They belong here, not in .cpp files
2017-01-26 20:59:11 -08:00
Daniel Frużyński a83889ef3b Fixed compilation using MinGW from Cygwin 32 and 64 bit 2016-12-30 19:49:12 +01:00
Rom Walton 90d23b72d8 lib: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-17 18:50:28 -05:00
Rom Walton 16e51ec218 LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 17:54:13 -05:00
Rom Walton a97b15c209 LIB: Explicitly declare a termination function for handling terminate()/unhandled()/abort() CRT calls.
Call DebugBreak() to make our exception handling technology kick in.
2015-12-11 18:24:34 -05:00
Eric J Korpela 73b0a65e0e Cross compile fixes for mingw32.
Libraries now compile on the RHEL 6 standard cross compiling environment.
2014-05-02 15:40:59 -07:00
U-X1\korpela 34fbfd3297 WIN32 Cross Compile Fixes 2014-05-01 17:44:34 -07:00
U-X1\korpela c6995ce06b These files aren't modified. Git claims otherwise.
Subversion was so much better then git.  I spend all my effing time dealing
with git's issues.  What a PITA.
2014-04-29 07:59:06 -07:00
Rom Walton ba843869a7 client & MGR: Make writing trace statements to the debugger viewport something you have to opt into on Windows.
I use it a lot, but other developers using BOINC may not care to see BOINC messages while debugging their own stuff.
2014-03-25 18:23:58 -04:00
Rom Walton afb6dcc6f3 MGR & Client: Massive code clean-up. Remove as much of the LoadLibrary/GetProcAddress stuff as we can under VS 2012. 2014-03-06 18:27:54 -05:00
David Anderson 144b5052ea Fix for building XP-compatible apps with VS2012, from Jon Sonntag 2014-02-13 18:46:28 -08:00
Rom Walton 076858a729 LIB: Standardize on using windows_format_error_string and drop windows_error_string.
* Move the windows_format_error_string function to win_util.cpp, .h instead of it being scattered between util.h and str_util.cpp.
* Convert the Windows error string into UTF8 before allowing it to be used by the caller
* Remove windows_error_string from library
2013-03-04 17:39:24 +01:00
David Anderson aa289f0916 - A bunch of tweaks from Steffen Moller, e.g. using MAXPATHLEN
svn path=/trunk/boinc/; revision=26133
2012-09-21 03:52:24 +00:00
David Anderson 53782b7de4 - lib: switch include order to the way it was (general to specific).
Should fix MinGW compile


svn path=/trunk/boinc/; revision=26008
2012-08-11 05:47:18 +00:00
David Anderson 405f567c81 - code cleanup: in foo.cpp, include foo.h first
svn path=/trunk/boinc/; revision=25933
2012-08-01 20:04:05 +00:00
David Anderson 813470f08d - Bad logic in Win code:
if you have
        *pbuf = HeapAlloc(...)
    then you need
        if (*pbuf == NULL)
    not
        if (pbuf == NULL)
- various code cleanups from 
- Makefile.am: don't include clientgui/res; nothing to make there

from Steffen Moeller


svn path=/trunk/boinc/; revision=25599
2012-04-25 07:09:14 +00:00
Eric J. Korpela 459b0d5a57 Fixes for MinGW application build.
svn path=/trunk/boinc/; revision=21508
2010-05-13 17:03:29 +00:00
Rom Walton 9cb3e6ffc7 - client & lib: bring header inclusion up-to-date for the CC to begin
hunting down a memory leak.
        
    client/
        <Various Files>
    lib/
        <Various Files>

svn path=/trunk/boinc/; revision=21457
2010-05-11 19:10:29 +00:00
Rom Walton e14e1cad34 - Remove BOINC_RCSID tags from source files, we are doing branching and tagging
properly.
        
    <Various Files>

svn path=/trunk/boinc/; revision=20873
2010-03-12 16:51:57 +00:00
Rom Walton ad60b45f72 - lib: Don't allow the diagnostics threads to be suspended, if a crash happens within
the remaining thread the process will deadlock.

    lib/
        diagnostics.h
        diagnostics_win.cpp
        win_util.cpp

svn path=/trunk/boinc/; revision=20198
2010-01-19 17:22:46 +00:00
Bernd Machenschalk cdcbfc29fd api: updates for building Win32 libs & API with MinGW gcc
added Makefile.mingw used for Einstein@home in lib/ as an
_alternative_ to api/Makefile.mingw

svn path=/trunk/boinc/; revision=19583
2009-11-16 13:13:42 +00:00
Rom Walton 87ffbfcea4 - DIAG: Don't resume after the thread has been suspended, otherwise the
thread stack may be trashed after extracting the context.  This should
        still be okay though as by the time the diagnostics framework
        has gotten here it has already downloaded all the symbols it'll need.

    lib/
        diagnostics_win.cpp
        

svn path=/trunk/boinc/; revision=19244
2009-10-05 16:20:39 +00:00
Rom Walton 6d726159cf - DIAG: Suspend threads right before extracting their context and then
resume them afterwords.  Otherwise we could end up in a deadlock state
        where both the main thread and a support thread are attempting to use
        the same system resource. In the last situation it was way down in
        Winsock.
        
    lib/
        diagnostics_win.cpp

svn path=/trunk/boinc/; revision=19242
2009-10-05 15:07:59 +00:00
David Anderson 563a55f37e - client/libs/samples: remove "#define read _read" etc. from boinc_win.h
These cause problems when "read" is a member name, etc.
		Do these #defines, conditioned on _MSC_VER,
		in the files that actually need them.
	- don't include boinc_win.h from parse.h.
		principle of minimal inclusion

svn path=/trunk/boinc/; revision=18902
2009-08-22 17:00:19 +00:00
Rom Walton 28c72cab79 - WIN: First pass through the code to fix compliation errors when
building in a Unicode enabled environment.
        
        NOTE: For files that are shared between the core client and
          the manager, it was simpliar to just call the ANSI versions
          of the specific Windows API functions then to monkey with
          all of the string handling code and convert between ANSI
          and UCS-2 strings.  CreateFile becomes CreateFileA instead
          of the default of CreateFileW.
          
        Down to 11 compile time errors from over 100.

    clientgui/
        BOINCBaseFrame.cpp
        BOINCTaskBar.cpp
        browser.cpp
        browser.h
        sg_StatImageLoader.cpp
    lib/
        boinc_win.h
        diagnostics_win.cpp
        filesys.cpp
        gui_rpc_client_ops.cpp
        proc_control.cpp
        stackwalker_imports.h
        stackwalker_win.cpp
        str_util.cpp
        util.cpp
        win_util.cpp, .h

svn path=/trunk/boinc/; revision=17859
2009-04-23 03:40:49 +00:00
David Anderson 98cfb8d3b0 - rename .C files to .cpp so that Doxygen will work
svn path=/trunk/boinc/; revision=16069
2008-09-26 18:20:24 +00:00