Browse Source

Fix VERSION redefine warnings

tweaked
elbandi 8 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 @@ @@ -1,8 +1,6 @@
#ifndef API_H
#define API_H
#include "config.h"
#include "miner.h"
// BUFSIZ varies on Windows and Linux

3
config_parser.h

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

2
findnonce.c

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

1
findnonce.h

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

2
logging.c

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

1
logging.h

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

35
miner.h

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

9
ocl.h

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

5
ocl/binary_kernel.c

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

3
ocl/build_kernel.c

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

1
ocl/build_kernel.h

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

Loading…
Cancel
Save