Skip to content

Commit

Permalink
Fix VERSION redefine warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbandi committed Mar 31, 2016
1 parent d7df5db commit 7f7557b
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 44 deletions.
2 changes: 0 additions & 2 deletions api.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef API_H
#define API_H

#include "config.h"

#include "miner.h"

// BUFSIZ varies on Windows and Linux
Expand Down
3 changes: 0 additions & 3 deletions config_parser.h
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions findnonce.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* any later version. See COPYING for more details.
*/

#include "config.h"

#include <stdio.h>
#include <pthread.h>
#include <string.h>
Expand Down
1 change: 0 additions & 1 deletion findnonce.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define FINDNONCE_H

#include "miner.h"
#include "config.h"

#define MAXTHREADS (0xFFFFFFFEULL)
#define MAXBUFFERS (0x100)
Expand Down
2 changes: 1 addition & 1 deletion logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion logging.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef LOGGING_H
#define LOGGING_H

#include "config.h"
#include <stdbool.h>
#include <stdarg.h>

Expand Down
35 changes: 14 additions & 21 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
Expand Down Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions ocl.h
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
5 changes: 3 additions & 2 deletions ocl/binary_kernel.c
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion ocl/build_kernel.c
Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion ocl/build_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define BUILD_KERNEL_H

#include <stdbool.h>
#include "logging.h"

#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
Expand Down

0 comments on commit 7f7557b

Please sign in to comment.