Browse Source

Fix VERSION redefine warnings

tweaked
elbandi 9 years ago
parent
commit
7f7557b59b
  1. 2
      api.h
  2. 3
      config_parser.h
  3. 2
      findnonce.c
  4. 1
      findnonce.h
  5. 2
      logging.c
  6. 1
      logging.h
  7. 35
      miner.h
  8. 9
      ocl.h
  9. 5
      ocl/binary_kernel.c
  10. 3
      ocl/build_kernel.c
  11. 1
      ocl/build_kernel.h

2
api.h

@ -1,8 +1,6 @@
#ifndef API_H #ifndef API_H
#define API_H #define API_H
#include "config.h"
#include "miner.h" #include "miner.h"
// BUFSIZ varies on Windows and Linux // BUFSIZ varies on Windows and Linux

3
config_parser.h

@ -1,11 +1,8 @@
#ifndef CONFIG_PARSER_H #ifndef CONFIG_PARSER_H
#define CONFIG_PARSER_H #define CONFIG_PARSER_H
#include "config.h"
#include "miner.h" #include "miner.h"
#include "api.h" #include "api.h"
#include "algorithm.h"
//profile structure //profile structure
struct profile { struct profile {

2
findnonce.c

@ -8,8 +8,6 @@
* any later version. See COPYING for more details. * any later version. See COPYING for more details.
*/ */
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>

1
findnonce.h

@ -2,7 +2,6 @@
#define FINDNONCE_H #define FINDNONCE_H
#include "miner.h" #include "miner.h"
#include "config.h"
#define MAXTHREADS (0xFFFFFFFEULL) #define MAXTHREADS (0xFFFFFFFEULL)
#define MAXBUFFERS (0x100) #define MAXBUFFERS (0x100)

2
logging.c

@ -12,8 +12,8 @@
#include <unistd.h> #include <unistd.h>
#include "logging.h"
#include "miner.h" #include "miner.h"
#include "logging.h"
bool opt_debug = false; bool opt_debug = false;
bool opt_debug_console = false; bool opt_debug_console = false;

1
logging.h

@ -1,7 +1,6 @@
#ifndef LOGGING_H #ifndef LOGGING_H
#define LOGGING_H #define LOGGING_H
#include "config.h"
#include <stdbool.h> #include <stdbool.h>
#include <stdarg.h> #include <stdarg.h>

35
miner.h

@ -3,24 +3,12 @@
#include "config.h" #include "config.h"
#if defined(USE_GIT_VERSION) && defined(GIT_VERSION)
#undef VERSION
#define VERSION GIT_VERSION
#endif
#ifdef BUILD_NUMBER
#define CGMINER_VERSION VERSION "-" BUILD_NUMBER
#else
#define CGMINER_VERSION VERSION
#endif
#include "algorithm.h"
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <sys/time.h> #include <sys/time.h>
#include <pthread.h> #include <pthread.h>
#include <jansson.h> #include <jansson.h>
#include <ccan/opt/opt.h>
#ifdef HAVE_LIBCURL #ifdef HAVE_LIBCURL
#include <curl/curl.h> #include <curl/curl.h>
#else #else
@ -34,22 +22,29 @@ extern char *curly;
#endif #endif
#include <sched.h> #include <sched.h>
#if defined(USE_GIT_VERSION) && defined(GIT_VERSION)
#undef VERSION
#define VERSION GIT_VERSION
#endif
#ifdef BUILD_NUMBER
#define CGMINER_VERSION VERSION "-" BUILD_NUMBER
#else
#define CGMINER_VERSION VERSION
#endif
#include "elist.h" #include "elist.h"
#include "uthash.h" #include "uthash.h"
#include "logging.h" #include "logging.h"
#include "util.h" #include "util.h"
#include "algorithm.h"
#include <sys/types.h> #include <sys/types.h>
#ifndef WIN32 #ifndef WIN32
# include <sys/socket.h> # include <sys/socket.h>
# include <netdb.h> # include <netdb.h>
#endif #endif
#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>
# include <stddef.h> # include <stddef.h>
@ -135,8 +130,6 @@ static inline int fsync (int fd)
#include "ADL_SDK/adl_sdk.h" #include "ADL_SDK/adl_sdk.h"
#endif #endif
#include <ccan/opt/opt.h>
#if (!defined(WIN32) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ #if (!defined(WIN32) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \
|| (defined(WIN32) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (defined(WIN32) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))
#ifndef bswap_16 #ifndef bswap_16

9
ocl.h

@ -1,16 +1,7 @@
#ifndef OCL_H #ifndef OCL_H
#define OCL_H #define OCL_H
#include "config.h"
#include <stdbool.h> #include <stdbool.h>
#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
#include "algorithm.h"
typedef struct __clState { typedef struct __clState {
cl_context context; cl_context context;

5
ocl/binary_kernel.c

@ -1,8 +1,9 @@
#include "binary_kernel.h"
#include "miner.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include "miner.h"
#include "binary_kernel.h"
cl_program load_opencl_binary_kernel(build_kernel_data *data) cl_program load_opencl_binary_kernel(build_kernel_data *data)
{ {
FILE *binaryfile = NULL; FILE *binaryfile = NULL;

3
ocl/build_kernel.c

@ -1,6 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include "build_kernel.h"
#include "miner.h" #include "miner.h"
#include "build_kernel.h"
static char *file_contents(const char *filename, int *length) static char *file_contents(const char *filename, int *length)
{ {

1
ocl/build_kernel.h

@ -2,7 +2,6 @@
#define BUILD_KERNEL_H #define BUILD_KERNEL_H
#include <stdbool.h> #include <stdbool.h>
#include "logging.h"
#ifdef __APPLE_CC__ #ifdef __APPLE_CC__
#include <OpenCL/opencl.h> #include <OpenCL/opencl.h>

Loading…
Cancel
Save