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