Commit Graph

15 Commits

Author SHA1 Message Date
David Anderson 6e5b7da699 Make the client simulator build again.
Note: any file that refers to HAVE_* symbols should include config.h
2018-01-19 20:51:40 -08:00
David Anderson 13a5b9bf3e change multiple-inclusion guard names to BOINC_FILENAME_H 2017-04-07 23:54:49 -07:00
Charlie Fenton 5192028903 Mac: Fix build break on Mac caused by commit 5df6f25. HAVE_CONFIG_H is not defined in Mac builds of most BOINC modules. 2017-03-03 05:49:53 -08:00
Yidong Ren 1d3cee5e0a Fix cross-compile from ubuntu with mingw 2017-02-16 00:08:51 -05:00
David Anderson da58a333d2 remove dependence of boinc_api.h on str_replace.h
- move strcpy2() from db_base.h to boinc_db.cpp
- don't include str_replace.h from common_defs.h
- move safe_strcpy from str_replace.h to str_util.h
2016-09-02 21:12:09 -07:00
David Anderson b3d3fc4f89 snprintf() workaround for Win
VS 2010 doesn't have snprintf().
As a temporary workaround (until we move to VS 2015)
#define snprintf as _snprintf (which doesn't null-terminate
if buffer is too small).
This is at least no worse than using sprintf(), which we were doing.
2016-02-17 23:22:49 -08:00
David Anderson d5f5918111 Replace strncpy() with strlcpy() various places.
Except for very specific cases, strncpy() should never be used.
It can result in a non-terminated string.

Also replace strncat() with strlcat(); the latter is simpler
because you don't have to calculate remaining buffer space.
2016-02-01 20:23:18 -08:00
David Anderson af97b5f9be client: bug fixes to sorting projects alphabetically
There were two problems:
1) we were sorting before parsing the client state file
   (which is where we get project names from)
2) the Win implementation of strcasecmp() wasn't right;
   it returned difference but not order.
2015-04-10 13:20:19 -05:00
David Anderson 78f7610f6e remove dependency of boinc_api.h on str_replace.h (and hence config.h)
Any files that use strlcpy() or strlcat() must directly include str_replace.h
2013-06-06 17:31:46 -07:00
Charlie Fenton 633f461d01 lib: Fix compile break on Mac
svn path=/trunk/boinc/; revision=25631
2012-04-30 23:53:57 +00:00
David Anderson e279b59913 - Updates Linux notifications to use current libnotify.
- Fix build problems on Mac OS X using autotools
- Consistently use #if HAVE_X for platform checks,
    rather than #ifdef HAVE_X or #if defined(HAVE_X)
- In Unix build, make lots of compiler checks standard
- Fix some compile warnings

From Matt Arsenault.

Note: there are now lots of compile warnings in clientgui/ on Unix,
    mostly in WxWidgets code


svn path=/trunk/boinc/; revision=24303
2011-09-27 19:45:27 +00:00
David Anderson f9adad65b6 - client: ignore case in names of "exclusive apps"
and exclusive GPU apps
	- client: fix bug that caused GPU apps to not be
		suspended or resumed immediately after
		exclusive GPU app transition
	- client: in log message, instead of saying
		"fetching tasks for GPU", say which kind of GPU

svn path=/trunk/boinc/; revision=22298
2010-08-27 18:22:59 +00:00
David Anderson 8cee2998ce - lib: gcc 4.4 fix; fixes #854
svn path=/trunk/boinc/; revision=18633
2009-07-20 21:53:56 +00:00
David Anderson 0b3ce504ff - Win: compile fixes
svn path=/trunk/boinc/; revision=18439
2009-06-16 21:58:38 +00:00
David Anderson 10f9e11ee6 - lib: created a new file for declaring "replacements"
for functions like strlcpy() etc.
    config.h is included here rather than in str_util.h


svn path=/trunk/boinc/; revision=18437
2009-06-16 20:54:44 +00:00