Browse Source

Bugfix: Add missing includes of config.h, stdbool.h, and stdint.h

Conflicts:
	driver-bfsb.c
	driver-bigpic.c
	driver-bigpic.h
	driver-bitfury.c
	driver-metabank.c
	driver-nanofury.c
	libbitfury.h
	mcp2210.h

Conflicts:
	driver-avalon.h
	driver-erupter.c
	driver-ztex.c
	miner.c
	sha2.c
	sha2.h
	util.h
Luke Dashjr 12 years ago
parent
commit
2415073479
33 changed files with 79 additions and 0 deletions
  1. 3 0
      adl.c
  2. 3 0
      adl.h
  3. 2 0
      driver-avalon.c
  4. 2 0
      driver-avalon.h
  5. 1 0
      driver-bitforce.c
  6. 5 0
      driver-cairnsmore.c
  7. 2 0
      driver-icarus.c
  8. 2 0
      driver-modminer.c
  9. 1 0
      driver-opencl.c
  10. 2 0
      driver-opencl.h
  11. 2 0
      driver-x6500.c
  12. 3 0
      driver-ztex.c
  13. 3 0
      dynclock.c
  14. 1 0
      findnonce.c
  15. 3 0
      findnonce.h
  16. 1 0
      fpgautils.c
  17. 2 0
      hexdump.c
  18. 2 0
      libztex.c
  19. 3 0
      libztex.h
  20. 1 0
      logging.c
  21. 1 0
      miner.c
  22. 2 0
      ocl.c
  23. 1 0
      scrypt.c
  24. 3 0
      scrypt.h
  25. 4 0
      sha2.c
  26. 3 0
      sha256_4way.c
  27. 3 0
      sha256_altivec_4way.c
  28. 3 0
      sha256_sse2_amd64.c
  29. 3 0
      sha256_sse2_i386.c
  30. 3 0
      sha256_sse4_amd64.c
  31. 3 0
      sha256_via.c
  32. 2 0
      util.c
  33. 4 0
      util.h

+ 3 - 0
adl.c

@@ -17,9 +17,12 @@
 #include <math.h>
 
 #ifdef HAVE_CURSES
+// Must be before stdbool, since pdcurses typedefs bool :/
 #include <curses.h>
 #endif
 
+#include <stdbool.h>
+
 #include "miner.h"
 #include "ADL/adl_sdk.h"
 #include "compat.h"

+ 3 - 0
adl.h

@@ -1,6 +1,9 @@
 #ifndef __ADL_H__
 #define __ADL_H__
 #ifdef HAVE_ADL
+
+#include <stdbool.h>
+
 bool adl_active;
 bool opt_reorder;
 const int opt_targettemp;

+ 2 - 0
driver-avalon.c

@@ -13,6 +13,8 @@
 
 #include <limits.h>
 #include <pthread.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/types.h>

+ 2 - 0
driver-avalon.h

@@ -10,6 +10,8 @@
 #ifndef AVALON_H
 #define AVALON_H
 
+#include <stdint.h>
+
 #define AVALON_TIME_FACTOR 10
 #define AVALON_RESET_FAULT_DECISECONDS 1
 #define AVALON_MINER_THREADS 1

+ 1 - 0
driver-bitforce.c

@@ -12,6 +12,7 @@
 
 #include <limits.h>
 #include <pthread.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <strings.h>

+ 5 - 0
driver-cairnsmore.c

@@ -7,6 +7,11 @@
  * any later version.  See COPYING for more details.
  */
 
+#include "config.h"
+
+#include <stdbool.h>
+#include <stdint.h>
+
 #include "compat.h"
 #include "dynclock.h"
 #include "fpgautils.h"

+ 2 - 0
driver-icarus.c

@@ -37,6 +37,8 @@
 
 #include <limits.h>
 #include <pthread.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/types.h>

+ 2 - 0
driver-modminer.c

@@ -12,6 +12,8 @@
 
 #include <limits.h>
 #include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <unistd.h>
 

+ 1 - 0
driver-opencl.c

@@ -16,6 +16,7 @@
 #endif
 
 #ifdef HAVE_CURSES
+// Must be before stdbool, since pdcurses typedefs bool :/
 #include <curses.h>
 #endif
 

+ 2 - 0
driver-opencl.h

@@ -1,6 +1,8 @@
 #ifndef __DEVICE_GPU_H__
 #define __DEVICE_GPU_H__
 
+#include <stdbool.h>
+
 #include "miner.h"
 
 

+ 2 - 0
driver-x6500.c

@@ -14,6 +14,8 @@
 #endif
 
 #include <math.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <sys/time.h>
 
 #include <libusb.h>

+ 3 - 0
driver-ztex.c

@@ -16,6 +16,9 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+#include <stdint.h>
+
 #include <unistd.h>
 #include <sha2.h>
 

+ 3 - 0
dynclock.c

@@ -10,6 +10,9 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+#include <stdint.h>
+
 #include "dynclock.h"
 #include "miner.h"
 

+ 1 - 0
findnonce.c

@@ -12,6 +12,7 @@
 #include "config.h"
 #ifdef HAVE_OPENCL
 
+#include <stdint.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <pthread.h>

+ 3 - 0
findnonce.h

@@ -1,5 +1,8 @@
 #ifndef __FINDNONCE_H__
 #define __FINDNONCE_H__
+
+#include <stdint.h>
+
 #include "miner.h"
 #include "config.h"
 

+ 1 - 0
fpgautils.c

@@ -16,6 +16,7 @@
 #endif
 
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <sys/types.h>

+ 2 - 0
hexdump.c

@@ -19,6 +19,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "logging.h"
 
 #define hex_print(p) applog(LOG_DEBUG, "%s", p)

+ 2 - 0
libztex.c

@@ -25,6 +25,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>

+ 3 - 0
libztex.h

@@ -1,6 +1,9 @@
 #ifndef __LIBZTEX_H__
 #define __LIBZTEX_H__
 
+#include <stdbool.h>
+#include <stdint.h>
+
 #include <libusb.h>
 
 #include "dynclock.h"

+ 1 - 0
logging.c

@@ -10,6 +10,7 @@
 
 #include "config.h"
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include "compat.h"

+ 1 - 0
miner.c

@@ -13,6 +13,7 @@
 #include "config.h"
 
 #ifdef HAVE_CURSES
+// Must be before stdbool, since pdcurses typedefs bool :/
 #include <curses.h>
 #endif
 

+ 2 - 0
ocl.c

@@ -12,6 +12,8 @@
 #ifdef HAVE_OPENCL
 
 #include <signal.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>

+ 1 - 0
scrypt.c

@@ -31,6 +31,7 @@
 #include "miner.h"
 
 #include <stdlib.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
 

+ 3 - 0
scrypt.h

@@ -1,6 +1,9 @@
 #ifndef SCRYPT_H
 #define SCRYPT_H
 
+#include <stdbool.h>
+#include <stdint.h>
+
 #include "miner.h"
 
 #ifdef USE_SCRYPT

+ 4 - 0
sha2.c

@@ -29,6 +29,10 @@
  *  http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
  */
 
+#include "config.h"
+
+#include <stdint.h>
+
 #include "sha2.h"
 
 #include <string.h>

+ 3 - 0
sha256_4way.c

@@ -5,10 +5,13 @@
 
 // tcatm's 4-way 128-bit SSE2 SHA-256
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
 #ifdef WANT_SSE2_4WAY
 
+#include <stdbool.h>
 #include <string.h>
 #include <assert.h>
 

+ 3 - 0
sha256_altivec_4way.c

@@ -10,10 +10,13 @@
 //
 
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
 #ifdef WANT_ALTIVEC_4WAY
 
+#include <stdbool.h>
 #include <string.h>
 #include <assert.h>
 

+ 3 - 0
sha256_sse2_amd64.c

@@ -10,10 +10,13 @@
  *
  */
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
 #ifdef WANT_X8664_SSE2
 
+#include <stdbool.h>
 #include <string.h>
 #include <assert.h>
 

+ 3 - 0
sha256_sse2_i386.c

@@ -10,10 +10,13 @@
  *
  */
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
 #ifdef WANT_X8632_SSE2
 
+#include <stdbool.h>
 #include <string.h>
 #include <assert.h>
 

+ 3 - 0
sha256_sse4_amd64.c

@@ -10,10 +10,13 @@
  *
  */
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
 #ifdef WANT_X8664_SSE4
 
+#include <stdbool.h>
 #include <string.h>
 #include <assert.h>
 

+ 3 - 0
sha256_via.c

@@ -9,8 +9,11 @@
  * any later version.  See COPYING for more details.
  */
 
+#include "config.h"
+
 #include "driver-cpu.h"
 
+#include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>

+ 2 - 0
util.c

@@ -13,6 +13,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>

+ 4 - 0
util.h

@@ -13,6 +13,10 @@
 #ifndef __UTIL_H__
 #define __UTIL_H__
 
+#include <stdbool.h>
+#include <stdint.h>
+#include <sys/time.h>
+
 #include <curl/curl.h>
 #include <jansson.h>