1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 04:24:19 +00:00

Fix VERSION redefine warnings

This commit is contained in:
elbandi 2016-03-31 21:43:25 +00:00
parent d7df5db1f0
commit 7f7557b59b
11 changed files with 20 additions and 44 deletions

2
api.h
View File

@ -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

View File

@ -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 {

View File

@ -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>

View File

@ -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)

View File

@ -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;

View File

@ -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
View File

@ -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
View File

@ -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;

View File

@ -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;

View File

@ -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)
{ {

View File

@ -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>