Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
    - Added checks for net/*.h, arpa/*.h, netinet/*.h and code to figure out
      which of those files to include
    - Modified MAC address check to work on some non-Linux unixes.
      (mac_address.cpp)
    - Added suggested change to "already attached to project" checking.
      (ProjectInfoPage.cpp)
    - changed includes of standard c header files to their c++ equivalents
      (i.e. replaced <stdio.h> with <cstdio>) for namespace protection.
    - replaced "using namespace std;" with more explicit "using std::function" in
      several files.
    - Fixed bug in checking whether the os is OS/2 and added conditional OS_OS2
      to the build environment. (boinc_platform.m4,configure.ac)
    - Changed build environment to not use -nostandardlibs unless we are using
      G++ and static linkage is specified. (configure.ac)
    - Added makefiles and package building files for solaris CSW package manager.
    - Fixed bug with attempting to find login name using logname. (configure.ac)
    - Added ifdef HAVE_* protection around some include files commonly found in
      sys.
    - Added support for unified binary for x86_64/i686-pc-solaris.
      (cs_platforms.cpp)
    - generate_host_cpid() now uses MAC address on non-linux unix.
      (hostinfo_network.cpp)
    - Macro BOINC_SET_COMPILE_FLAGS now doesn't check gcc only flags on non-gcc
      compilers. (boinc_set_compile_flags.m4)
    - Library compiles no longer depend upon the library extension or require
      the library to be prefixed with lib.
    - More fixes for fcgi builds.
    - Added declaration of "struct ether_addr" and ether_ntoa().  Have not yet
      implemented ether_ntoa() for machines that don't have it, or where it is
      buggy.  (unix_util.h)
    - Added FCGI::perror() which calls FCGI_perror(). (boinc_fcgi.{h,cpp})
    - Fixed library Makefiles so that all required headers get installed.


svn path=/trunk/boinc/; revision=17388
  • Loading branch information
SETIguy committed Feb 26, 2009
1 parent a44e2e9 commit 8f3abcc
Show file tree
Hide file tree
Showing 116 changed files with 2,586 additions and 272 deletions.
29 changes: 20 additions & 9 deletions api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif
EXTRA_DIST = *.h

if BUILD_GRAPHICS_API
AM_CFLAGS += @GLUT_CFLAGS@
AM_CXXFLAGS += @GLUT_CFLAGS@
endif

lib_LTLIBRARIES = libboinc_api.la
Expand All @@ -51,22 +51,33 @@ pkginclude_HEADERS = \
gutil.h
endif ## INSTALL_HEADERS

# Some OSs may not prefix libraries with lib.
# For example OS2
if OS_OS2
LIBBOINC_API_STATIC=boinc_api.${LIBEXT}
LIBBOINC_GRAPHICS2_STATIC=boinc_graphics2.${LIBEXT}
else
LIBBOINC_API_STATIC=libboinc_api.${LIBEXT}
LIBBOINC_GRAPHICS2_STATIC=libboinc_graphics2.${LIBEXT}
endif


if BUILD_STATIC_LIBS
all_local = libboinc_api.a
all_local = $(LIBBOINC_API_STATIC)
if BUILD_GRAPHICS_API
all_local += libboinc_graphics2.a
all_local += $(LIBBOINC_GRAPHICS2_STATIC)
endif
endif

all-local: $(all_local)

libboinc_api.a: libboinc_api.la
rm -f libboinc_api.a
ln .libs/libboinc_api.a
$(LIBBOINC_API_STATIC): libboinc_api.la
rm -f $(LIBBOINC_API_STATIC)
ln .libs/$(LIBBOINC_API_STATIC)

libboinc_graphics2.a: libboinc_graphics2.la
rm -f libboinc_graphics2.a
ln .libs/libboinc_graphics2.a
$(LIBBOINC_GRAPHICS2_STATIC): libboinc_graphics2.la
rm -f $(LIBBOINC_GRAPHICS2_STATIC)
ln .libs/$(LIBBOINC_GRAPHICS2_STATIC)


endif ## ENABLE_LIBRARIES
Expand Down
1 change: 0 additions & 1 deletion api/boinc_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#ifndef __EMX__
#include <sched.h>
#endif
using namespace std;
#endif

#include "diagnostics.h"
Expand Down
8 changes: 4 additions & 4 deletions api/graphics2_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
// unix-specific graphics stuff
//
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
#include <cstdlib>
#include <cstdio>
#include <csetjmp>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#include <csignal>
#include <cstring>
#include "x_opengl.h"

Expand Down
15 changes: 10 additions & 5 deletions api/gutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#include "config.h"
#endif

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <csetjmp>

#ifdef _WIN32

#ifndef SANS_JPEGLIB
Expand All @@ -38,11 +44,6 @@ extern "C" {
#endif

#ifndef _WIN32
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <csetjmp>
#if defined(HAVE_MALLOC_H) || defined(_WIN32)
#include <malloc.h>
#if defined(__MINGW32__) && !defined(alloca)
Expand All @@ -56,6 +57,10 @@ extern "C" {
#undef HAVE_STDLIB_H /* Avoid compiler warning (redefined in jconfig,h) */
#endif

using std::FILE;
using std::longjmp;
using std::jmp_buf;

#ifndef SANS_JPEGLIB
extern "C"{
#include <jpeglib.h>
Expand Down
4 changes: 3 additions & 1 deletion api/gutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#ifndef GUTIL_H
#define GUTIL_H

#include <string.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>

struct COLOR {
float r;
Expand Down
14 changes: 9 additions & 5 deletions api/gutil_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
#include "config.h"
#endif

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <csetjmp>

using std::size_t;
using std::FILE;

#ifdef _WIN32
#ifdef __cplusplus
extern "C" {
Expand All @@ -36,11 +45,6 @@ extern "C" {
#endif

#ifndef _WIN32
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <csetjmp>
#ifdef __APPLE__
#undef HAVE_STDLIB_H /* Avoid compiler warning (redefined in jconfig,h) */
#endif
Expand Down
2 changes: 1 addition & 1 deletion api/make_app_icon_h.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// with api/setMacIcon() in science applications.

#include "config.h"
#include <stdio.h>
#include <cstdio>

int main(int argc, char** argv) {
int retval = 0;
Expand Down
7 changes: 0 additions & 7 deletions api/reduce_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,12 @@


#ifndef _WIN32
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <assert.h>

#include <algorithm>

#endif

#include "reduce.h"
Expand Down
30 changes: 25 additions & 5 deletions api/texfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#pragma warning (disable:4244) // disable bogus conversion warnings
#endif

#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cassert>
#include <cctype>
#include <cstdlib>
#include <cstdio>
#include <cstring>

#ifdef _WIN32
#include <windows.h>
Expand All @@ -25,6 +25,26 @@
#include <OpenGL/gl.h>
#endif

using std::tolower;
using std::toupper;
using std::isupper;
using std::islower;
using std::isprint;
using std::strcmp;
using std::strncmp;
using std::memcpy;

using std::FILE;
using std::fprintf;
using std::fopen;
using std::fclose;
using std::fread;

using std::abort;

using std::malloc;
using std::calloc;
using std::free;

#include "texfont.h"

Expand Down
19 changes: 16 additions & 3 deletions api/texture.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>

using std::malloc;
using std::free;
using std::size_t;

using std::FILE;
using std::fopen;
using std::fclose;
using std::fprintf;
using std::fread;
using std::fseek;

using std::perror;

void bwtorgba(unsigned char *b,unsigned char *l,int n) {
while(n--) {
Expand Down
2 changes: 1 addition & 1 deletion api/tgalib.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


#include <windows.h>
#include <stdio.h>
#include <cstdio>

#define TGA_RGB 2 // This tells us it's a normal RGB (really BGR) file
#define TGA_A 3 // This tells us it's a ALPHA file
Expand Down
8 changes: 4 additions & 4 deletions api/x_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
#include <cstdlib>
#include <cstdio>
#include <csetjmp>
#include <unistd.h>
#include <pthread.h>
#include <cstring>
#include <signal.h>
#include <csignal>
#include "x_opengl.h"

#include "app_ipc.h"
Expand Down
Loading

0 comments on commit 8f3abcc

Please sign in to comment.