├── winbuild ├── dist │ └── include │ │ ├── libgen.h │ │ ├── sys │ │ └── time.h │ │ ├── CL │ │ └── .gitignore │ │ ├── curl │ │ └── .gitignore │ │ ├── stdbool.h │ │ ├── unistd.h │ │ ├── jansson_private_config.h │ │ ├── jansson_config.h │ │ └── config.h ├── .gitignore ├── jansson │ ├── jansson_private_config.h │ └── jansson_config.h └── sgminer.sln ├── submodules ├── jansson │ ├── doc │ │ ├── .gitignore │ │ ├── changes.rst │ │ ├── README │ │ ├── Makefile.am │ │ ├── index.rst │ │ └── ext │ │ │ └── refcounting.py │ ├── test │ │ ├── suites │ │ │ ├── invalid │ │ │ │ ├── empty │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── null │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── apostrophe │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── brace-comma │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── bracket-comma │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── lone-open-brace │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── lone-open-bracket │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── bracket-one-comma │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── invalid-identifier │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── object-apostrophes │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── object-no-colon │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── object-no-value │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── real-truncated-at-e │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── unicode-identifier │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── unterminated-array │ │ │ │ │ ├── input │ │ │ │ │ ├── error.strip │ │ │ │ │ └── error.normal │ │ │ │ ├── unterminated-key │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── unterminated-string │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── ascii-unicode-identifier │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── extra-comma-in-array │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── garbage-at-the-end │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── null-byte-outside-string │ │ │ │ │ ├── input │ │ │ │ │ ├── error │ │ │ │ │ └── nostrip │ │ │ │ ├── real-garbage-after-e │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── real-truncated-at-point │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── unterminated-empty-key │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── integer-starting-with-zero │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── invalid-negative-integer │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── minus-sign-without-number │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── object-in-unterminated-array │ │ │ │ │ ├── input │ │ │ │ │ ├── error.strip │ │ │ │ │ └── error.normal │ │ │ │ ├── object-unterminated-value │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── unterminated-array-and-object │ │ │ │ │ ├── input │ │ │ │ │ ├── error.normal │ │ │ │ │ └── error.strip │ │ │ │ ├── unterminated-object-and-array │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── garbage-after-newline │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── invalid-negative-real │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── null-byte-in-object-key │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── object-garbage-at-end │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── real-negative-overflow │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── real-positive-overflow │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── invalid-escape │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── negative-integer-starting-with-zero │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── null-byte-in-string │ │ │ │ │ ├── input │ │ │ │ │ ├── error │ │ │ │ │ └── nostrip │ │ │ │ ├── tab-character-in-string │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── too-big-positive-integer │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-unicode-escape │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── lone-second-surrogate │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── null-escape-in-string │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── too-big-negative-integer │ │ │ │ │ ├── input │ │ │ │ │ └── error │ │ │ │ ├── truncated-unicode-surrogate │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── extra-comma-in-multiline-array │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-second-surrogate │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── recursion-depth │ │ │ │ │ └── error │ │ │ │ └── run │ │ │ ├── valid │ │ │ │ ├── empty-array │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── empty-object │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── false │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── null │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── true │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── empty-string │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── negative-int │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── negative-one │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── negative-zero │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-underflow │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── short-string │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── simple-int-0 │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── simple-int-1 │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── simple-int-123 │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-capital-e │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── simple-object │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── simple-real │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── complex-array │ │ │ │ │ ├── env │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── empty-object-in-array │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── real-exponent │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── real-negative-exponent │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-positive-exponent │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── one-byte-utf-8 │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-fraction-exponent │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── string-escapes │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── two-byte-utf-8 │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-capital-e-negative-exponent │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-capital-e-positive-exponent │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── three-byte-utf-8 │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── real-subnormal-number │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── utf-8-string │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── escaped-utf-control-char │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── simple-ascii-string │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── utf-surrogate-four-byte-encoding │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ └── run │ │ │ ├── encoding-flags │ │ │ │ ├── array │ │ │ │ │ ├── input │ │ │ │ │ └── output │ │ │ │ ├── compact-array │ │ │ │ │ ├── output │ │ │ │ │ ├── input │ │ │ │ │ └── env │ │ │ │ ├── indent-array │ │ │ │ │ ├── input │ │ │ │ │ ├── output │ │ │ │ │ └── env │ │ │ │ ├── object │ │ │ │ │ ├── output │ │ │ │ │ ├── input │ │ │ │ │ └── env │ │ │ │ ├── compact-object │ │ │ │ │ ├── output │ │ │ │ │ ├── input │ │ │ │ │ └── env │ │ │ │ ├── indent-compact-array │ │ │ │ │ ├── input │ │ │ │ │ ├── output │ │ │ │ │ └── env │ │ │ │ ├── indent-object │ │ │ │ │ ├── input │ │ │ │ │ ├── output │ │ │ │ │ └── env │ │ │ │ ├── real-precision │ │ │ │ │ ├── output │ │ │ │ │ ├── input │ │ │ │ │ └── env │ │ │ │ ├── indent-compact-object │ │ │ │ │ ├── input │ │ │ │ │ ├── output │ │ │ │ │ └── env │ │ │ │ ├── sort-keys │ │ │ │ │ ├── output │ │ │ │ │ ├── env │ │ │ │ │ └── input │ │ │ │ ├── ensure-ascii │ │ │ │ │ ├── env │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ ├── preserve-order │ │ │ │ │ ├── env │ │ │ │ │ ├── output │ │ │ │ │ └── input │ │ │ │ └── run │ │ │ ├── .gitattributes │ │ │ ├── Makefile.am │ │ │ ├── invalid-unicode │ │ │ │ ├── lone-invalid-utf-8 │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-array │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── truncated-utf-8 │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-int │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── not-in-unicode-range │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── restricted-utf-8 │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── encoded-surrogate-half │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-escape │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-string │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── overlong-3-byte-encoding │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── overlong-4-byte-encoding │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── overlong-ascii-encoding │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-after-backslash │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-bigger-int │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-exponent │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-identifier │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── invalid-utf-8-in-real-after-e │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ ├── lone-utf-8-continuation-byte │ │ │ │ │ ├── error │ │ │ │ │ └── input │ │ │ │ └── run │ │ │ └── api │ │ │ │ ├── check-exports │ │ │ │ ├── run │ │ │ │ ├── Makefile.am │ │ │ │ ├── test_loadb.c │ │ │ │ ├── test_dump_callback.c │ │ │ │ ├── test_load_callback.c │ │ │ │ └── test_number.c │ │ ├── bin │ │ │ └── Makefile.am │ │ ├── Makefile.am │ │ ├── .gitignore │ │ ├── scripts │ │ │ └── valgrind.sh │ │ └── run-suites │ ├── examples │ │ └── README.rst │ ├── jansson.pc.in │ ├── Makefile.am │ ├── appveyor.yml │ ├── cmake │ │ ├── JanssonConfigVersion.cmake.in │ │ ├── CheckFunctionKeywords.cmake │ │ ├── JanssonConfig.cmake.in │ │ ├── CoverallsClear.cmake │ │ ├── jansson_private_config.h.cmake │ │ └── jansson_config.h.cmake │ ├── .gitignore │ ├── src │ │ ├── Makefile.am │ │ ├── utf.h │ │ ├── strbuffer.h │ │ ├── jansson_config.h.in │ │ ├── memory.c │ │ ├── jansson.def │ │ └── error.c │ ├── Android.mk │ ├── LICENSE │ ├── .travis.yml │ ├── android │ │ └── jansson_config.h │ ├── release.sh │ ├── README.rst │ └── CleanSpec.mk └── Makefile.am ├── ADL_SDK ├── .gitignore └── readme.txt ├── API.class ├── MCast.class ├── autogen.sh ├── pool.h ├── ccan ├── Makefile.am ├── opt │ ├── test │ │ ├── compile_ok-const-arg.c │ │ ├── utils.h │ │ ├── run-no-options.c │ │ ├── run-correct-reporting.c │ │ └── run-iter.c │ ├── private.h │ └── _info ├── compiler │ ├── test │ │ ├── run-is_compile_constant.c │ │ └── compile_fail-printf.c │ └── _info └── typesafe_cb │ └── test │ ├── compile_ok-typesafe_cb-NULL.c │ ├── compile_fail-cast_if_type-promotable.c │ ├── compile_fail-typesafe_cb_cast.c │ ├── compile_fail-typesafe_cb-int.c │ ├── compile_fail-typesafe_cb_postargs.c │ ├── compile_fail-typesafe_cb_preargs.c │ ├── compile_fail-typesafe_cb_cast-multi.c │ ├── compile_fail-typesafe_cb.c │ ├── compile_ok-typesafe_cb_cast.c │ ├── compile_ok-typesafe_cb-undefined.c │ └── compile_ok-typesafe_cb-vars.c ├── sph └── Makefile.am ├── algorithm ├── bcd.h └── scrypt.h ├── ocl ├── binary_kernel.h ├── build_kernel.h └── binary_kernel.c ├── example.bat ├── tools └── update_changelog.sh ├── findnonce.h ├── lib ├── memchr.valgrind ├── dummy.c └── sig-handler.h ├── .gitignore ├── events.h ├── ocl.h ├── m4 ├── wchar_t.m4 ├── sigaction.m4 ├── 00gnulib.m4 ├── gnulib-cache.m4 ├── signalblocking.m4 ├── gnulib-tool.m4 ├── stddef_h.m4 ├── mmap-anon.m4 ├── multiarch.m4 ├── warn-on-use.m4 └── signal_h.m4 ├── mknsis.sh ├── kernel └── sm3.cl ├── adl.h ├── driver-opencl.h ├── arg-nonnull.h ├── doc ├── coding.md └── BUGS.md ├── api-example.py ├── pool.c ├── Makefile.am ├── hexdump.c ├── AUTHORS.md ├── example.conf ├── sha2.h ├── logging.h └── api-example.php /winbuild/dist/include/libgen.h: -------------------------------------------------------------------------------- 1 | #pragma once -------------------------------------------------------------------------------- /submodules/jansson/doc/.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | -------------------------------------------------------------------------------- /winbuild/dist/include/sys/time.h: -------------------------------------------------------------------------------- 1 | #pragma once -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/empty/input: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /submodules/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = jansson 3 | 4 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null/input: -------------------------------------------------------------------------------- 1 | null 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-array/output: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-object/output: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/false/output: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/null/input: -------------------------------------------------------------------------------- 1 | [null] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/null/output: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/true/input: -------------------------------------------------------------------------------- 1 | [true] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/true/output: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /winbuild/dist/include/CL/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/apostrophe/input: -------------------------------------------------------------------------------- 1 | [' 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/brace-comma/input: -------------------------------------------------------------------------------- 1 | {, 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-array/input: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-object/input: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-string/output: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/false/input: -------------------------------------------------------------------------------- 1 | [false] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-int/output: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-one/output: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-zero/output: -------------------------------------------------------------------------------- 1 | [0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-underflow/output: -------------------------------------------------------------------------------- 1 | [0.0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/short-string/output: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-0/input: -------------------------------------------------------------------------------- 1 | [0] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-0/output: -------------------------------------------------------------------------------- 1 | [0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-1/input: -------------------------------------------------------------------------------- 1 | [1] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-1/output: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-123/output: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /winbuild/dist/include/curl/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/array/input: -------------------------------------------------------------------------------- 1 | [1, 2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/array/output: -------------------------------------------------------------------------------- 1 | [1, 2] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/bracket-comma/input: -------------------------------------------------------------------------------- 1 | [, 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-brace/input: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-bracket/input: -------------------------------------------------------------------------------- 1 | [ 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-string/input: -------------------------------------------------------------------------------- 1 | [""] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-int/input: -------------------------------------------------------------------------------- 1 | [-123] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-one/input: -------------------------------------------------------------------------------- 1 | [-1] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/negative-zero/input: -------------------------------------------------------------------------------- 1 | [-0] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e/input: -------------------------------------------------------------------------------- 1 | [1E22] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e/output: -------------------------------------------------------------------------------- 1 | [1e22] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/short-string/input: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-int-123/input: -------------------------------------------------------------------------------- 1 | [123] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-object/output: -------------------------------------------------------------------------------- 1 | {"a": []} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-real/output: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /ADL_SDK/.gitignore: -------------------------------------------------------------------------------- 1 | adl_defines.h 2 | adl_sdk.h 3 | adl_structures.h 4 | -------------------------------------------------------------------------------- /API.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/API.class -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-array/output: -------------------------------------------------------------------------------- 1 | [1,2] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/bracket-one-comma/input: -------------------------------------------------------------------------------- 1 | [1, 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-identifier/input: -------------------------------------------------------------------------------- 1 | [troo 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-apostrophes/input: -------------------------------------------------------------------------------- 1 | {'a' 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-colon/input: -------------------------------------------------------------------------------- 1 | {"a" 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-value/input: -------------------------------------------------------------------------------- 1 | {"a": 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-truncated-at-e/input: -------------------------------------------------------------------------------- 1 | [1e] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unicode-identifier/input: -------------------------------------------------------------------------------- 1 | å 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array/input: -------------------------------------------------------------------------------- 1 | ["a" 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-key/input: -------------------------------------------------------------------------------- 1 | {"a 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-string/input: -------------------------------------------------------------------------------- 1 | ["a 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/complex-array/env: -------------------------------------------------------------------------------- 1 | JSON_SORT_KEYS=1 -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-object-in-array/input: -------------------------------------------------------------------------------- 1 | [{}] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/empty-object-in-array/output: -------------------------------------------------------------------------------- 1 | [{}] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-exponent/input: -------------------------------------------------------------------------------- 1 | [123e45] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-negative-exponent/output: -------------------------------------------------------------------------------- 1 | [0.01] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-positive-exponent/output: -------------------------------------------------------------------------------- 1 | [100.0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-object/input: -------------------------------------------------------------------------------- 1 | {"a":[]} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-real/input: -------------------------------------------------------------------------------- 1 | [123.456789] 2 | -------------------------------------------------------------------------------- /MCast.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/MCast.class -------------------------------------------------------------------------------- /submodules/jansson/test/suites/.gitattributes: -------------------------------------------------------------------------------- 1 | api/ text=auto 2 | * text eol=lf -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-array/input: -------------------------------------------------------------------------------- 1 | [1, 2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-array/input: -------------------------------------------------------------------------------- 1 | [1, 2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/object/output: -------------------------------------------------------------------------------- 1 | {"a": 1, "b": 2} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/ascii-unicode-identifier/input: -------------------------------------------------------------------------------- 1 | aå 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/extra-comma-in-array/input: -------------------------------------------------------------------------------- 1 | [1,] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/garbage-at-the-end/input: -------------------------------------------------------------------------------- 1 | [1,2,3]foo 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-outside-string/input: -------------------------------------------------------------------------------- 1 | [ 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-garbage-after-e/input: -------------------------------------------------------------------------------- 1 | [1ea] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-truncated-at-point/input: -------------------------------------------------------------------------------- 1 | [1.] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-empty-key/input: -------------------------------------------------------------------------------- 1 | {" 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/one-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | [", one-byte UTF-8"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-fraction-exponent/output: -------------------------------------------------------------------------------- 1 | [1.23456e80] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-negative-exponent/input: -------------------------------------------------------------------------------- 1 | [1e-2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-positive-exponent/input: -------------------------------------------------------------------------------- 1 | [1e+2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-underflow/input: -------------------------------------------------------------------------------- 1 | [123e-10000000] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/string-escapes/output: -------------------------------------------------------------------------------- 1 | ["\"\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/two-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | ["ģ two-byte UTF-8"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-object/output: -------------------------------------------------------------------------------- 1 | {"a":1,"b":2} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-array/input: -------------------------------------------------------------------------------- 1 | [1, 2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/object/input: -------------------------------------------------------------------------------- 1 | {"a": 1, "b": 2} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/integer-starting-with-zero/input: -------------------------------------------------------------------------------- 1 | [012] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-negative-integer/input: -------------------------------------------------------------------------------- 1 | [-123foo] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/minus-sign-without-number/input: -------------------------------------------------------------------------------- 1 | [-foo] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-in-unterminated-array/input: -------------------------------------------------------------------------------- 1 | [{} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-unterminated-value/input: -------------------------------------------------------------------------------- 1 | {"a":"a 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array-and-object/input: -------------------------------------------------------------------------------- 1 | [{ 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-object-and-array/input: -------------------------------------------------------------------------------- 1 | {[ 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e-negative-exponent/output: -------------------------------------------------------------------------------- 1 | [0.01] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e-positive-exponent/output: -------------------------------------------------------------------------------- 1 | [100.0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-exponent/output: -------------------------------------------------------------------------------- 1 | [1.2299999999999999e47] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-fraction-exponent/input: -------------------------------------------------------------------------------- 1 | [123.456e78] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/string-escapes/input: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/three-byte-utf-8/output: -------------------------------------------------------------------------------- 1 | ["ࠡ three-byte UTF-8"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-object/input: -------------------------------------------------------------------------------- 1 | {"a": 1, "b": 2} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-object/input: -------------------------------------------------------------------------------- 1 | {"a": 1, "b": 2} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/real-precision/output: -------------------------------------------------------------------------------- 1 | [1.235, 1.0, 1.0] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/garbage-after-newline/input: -------------------------------------------------------------------------------- 1 | [1,2,3] 2 | foo 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-negative-real/input: -------------------------------------------------------------------------------- 1 | [-123.123foo] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-in-object-key/input: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-garbage-at-end/input: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-negative-overflow/input: -------------------------------------------------------------------------------- 1 | [-123123e100000] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-positive-overflow/input: -------------------------------------------------------------------------------- 1 | [123123e100000] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/one-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u002c one-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e-negative-exponent/input: -------------------------------------------------------------------------------- 1 | [1E-2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-capital-e-positive-exponent/input: -------------------------------------------------------------------------------- 1 | [1E+2] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/two-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u0123 two-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-array/output: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2 4 | ] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/object/env: -------------------------------------------------------------------------------- 1 | HASHSEED=1 2 | export HASHSEED 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/apostrophe/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near ''' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-escape/input: -------------------------------------------------------------------------------- 1 | ["\a <-- invalid escape"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/negative-integer-starting-with-zero/input: -------------------------------------------------------------------------------- 1 | [-012] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-subnormal-number/output: -------------------------------------------------------------------------------- 1 | [1.8011670033376514e-308] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/three-byte-utf-8/input: -------------------------------------------------------------------------------- 1 | ["\u0821 three-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/utf-8-string/input: -------------------------------------------------------------------------------- 1 | ["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/utf-8-string/output: -------------------------------------------------------------------------------- 1 | ["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-object/input: -------------------------------------------------------------------------------- 1 | {"a": 1, "b": 2} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/bracket-comma/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unexpected token near ',' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-in-string/input: -------------------------------------------------------------------------------- 1 | ["null byte not allowed"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | '[' or '{' expected near 'null' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/tab-character-in-string/input: -------------------------------------------------------------------------------- 1 | [" <-- tab character"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/real-subnormal-number/input: -------------------------------------------------------------------------------- 1 | [1.8011670033376514e-308] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-array/env: -------------------------------------------------------------------------------- 1 | JSON_INDENT=4 2 | export JSON_INDENT 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-array/output: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2 4 | ] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/sort-keys/output: -------------------------------------------------------------------------------- 1 | {"bar": 2, "baz": 3, "foo": 1, "quux": 4} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/brace-comma/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near ',' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/empty/error: -------------------------------------------------------------------------------- 1 | 1 0 0 2 | '[' or '{' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-escape/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | invalid escape near '"\a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-identifier/error: -------------------------------------------------------------------------------- 1 | 1 5 5 2 | invalid token near 'troo' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-garbage-after-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1e' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-truncated-at-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1e' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/too-big-positive-integer/error: -------------------------------------------------------------------------------- 1 | 1 31 31 2 | too big integer 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = api 2 | EXTRA_DIST = invalid invalid-unicode valid 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-array/env: -------------------------------------------------------------------------------- 1 | JSON_COMPACT=1 2 | export JSON_COMPACT 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-object/output: -------------------------------------------------------------------------------- 1 | { 2 | "a": 1, 3 | "b": 2 4 | } -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/real-precision/input: -------------------------------------------------------------------------------- 1 | [1.23456789, 1.0, 1.0000000000000002] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/sort-keys/env: -------------------------------------------------------------------------------- 1 | JSON_SORT_KEYS=1 2 | export JSON_SORT_KEYS 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/sort-keys/input: -------------------------------------------------------------------------------- 1 | {"foo": 1, "bar": 2, "baz": 3, "quux": 4} 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/extra-comma-in-array/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unexpected token near ']' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/integer-starting-with-zero/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near '0' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-negative-integer/error: -------------------------------------------------------------------------------- 1 | 1 8 8 2 | ']' expected near 'foo' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-negative-real/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | ']' expected near 'foo' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-unicode-escape/error: -------------------------------------------------------------------------------- 1 | 1 5 5 2 | invalid escape near '"\uq' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-second-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 40 40 2 | invalid Unicode '\uDFAA' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/minus-sign-without-number/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near '-' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-escape-in-string/input: -------------------------------------------------------------------------------- 1 | ["null escape \u0000 not allowed"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-garbage-at-end/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | '}' expected near '123' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-truncated-at-point/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '1.' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/too-big-negative-integer/input: -------------------------------------------------------------------------------- 1 | [-123123123123123123123123123123] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/too-big-positive-integer/input: -------------------------------------------------------------------------------- 1 | [123123123123123123123123123123] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unicode-identifier/error: -------------------------------------------------------------------------------- 1 | 1 1 2 2 | '[' or '{' expected near 'å' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/escaped-utf-control-char/input: -------------------------------------------------------------------------------- 1 | ["\u0012 escaped control character"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/escaped-utf-control-char/output: -------------------------------------------------------------------------------- 1 | ["\u0012 escaped control character"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-ascii-string/input: -------------------------------------------------------------------------------- 1 | ["abcdefghijklmnopqrstuvwxyz1234567890 "] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/simple-ascii-string/output: -------------------------------------------------------------------------------- 1 | ["abcdefghijklmnopqrstuvwxyz1234567890 "] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-object/output: -------------------------------------------------------------------------------- 1 | { 2 | "a":1, 3 | "b":2 4 | } -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/lone-invalid-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 0 0 2 | unable to decode byte 0xe5 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/ascii-unicode-identifier/error: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | '[' or '{' expected near 'a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/bracket-one-comma/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/bracket-one-comma/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/garbage-after-newline/error: -------------------------------------------------------------------------------- 1 | 2 3 11 2 | end of file expected near 'foo' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/garbage-at-the-end/error: -------------------------------------------------------------------------------- 1 | 1 10 10 2 | end of file expected near 'foo' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-unicode-escape/input: -------------------------------------------------------------------------------- 1 | ["\uqqqq <-- invalid unicode escape"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-bracket/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 2 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-bracket/error.strip: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-second-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uDFAA (second surrogate on it's own)"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-apostrophes/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near ''' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-colon/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 5 2 | ':' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-colon/error.strip: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | ':' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/tab-character-in-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | control character 0x9 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/too-big-negative-integer/error: -------------------------------------------------------------------------------- 1 | 1 32 32 2 | too big negative integer 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/truncated-unicode-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 46 46 2 | invalid Unicode '\uDADA' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array/error.strip: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-key/error.normal: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/output: -------------------------------------------------------------------------------- 1 | ["𝄞 surrogate, four-byte UTF-8"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/ensure-ascii/env: -------------------------------------------------------------------------------- 1 | JSON_ENSURE_ASCII=1 2 | export JSON_ENSURE_ASCII 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-array/error: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | unable to decode byte 0xe5 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/truncated-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe0 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/extra-comma-in-multiline-array/error: -------------------------------------------------------------------------------- 1 | 6 1 17 2 | unexpected token near ']' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/extra-comma-in-multiline-array/input: -------------------------------------------------------------------------------- 1 | [1, 2 | 2, 3 | 3, 4 | 4, 5 | 5, 6 | ] 7 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-second-surrogate/error: -------------------------------------------------------------------------------- 1 | 1 62 62 2 | invalid Unicode '\uD888\u3210' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/negative-integer-starting-with-zero/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | invalid token near '-0' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-outside-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | invalid token near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-value/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 6 2 | unexpected token near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-no-value/error.strip: -------------------------------------------------------------------------------- 1 | 1 5 5 2 | unexpected token near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 5 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-empty-key/error.normal: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unexpected newline near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-key/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-string/error.normal: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-string/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/preserve-order/env: -------------------------------------------------------------------------------- 1 | JSON_PRESERVE_ORDER=1 2 | export JSON_PRESERVE_ORDER 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/real-precision/env: -------------------------------------------------------------------------------- 1 | JSON_REAL_PRECISION=4 2 | export JSON_REAL_PRECISION 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-int/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near '0' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/not-in-unicode-range/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xf4 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/restricted-utf-8/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xfd near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-brace/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 2 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/lone-open-brace/error.strip: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-in-string/error: -------------------------------------------------------------------------------- 1 | 1 12 12 2 | control character 0x0 near '"null byte ' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-in-unterminated-array/error.strip: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-unterminated-value/error.normal: -------------------------------------------------------------------------------- 1 | 1 7 7 2 | unexpected newline near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-unterminated-value/error.strip: -------------------------------------------------------------------------------- 1 | 1 7 7 2 | premature end of input near '"a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/recursion-depth/error: -------------------------------------------------------------------------------- 1 | 1 2049 2049 2 | maximum parsing depth reached near '[' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-empty-key/error.strip: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | premature end of input near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-object-and-array/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near '[' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/input: -------------------------------------------------------------------------------- 1 | ["\uD834\uDD1E surrogate, four-byte UTF-8"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-object/env: -------------------------------------------------------------------------------- 1 | JSON_INDENT=4 2 | HASHSEED=1 3 | export JSON_INDENT HASHSEED 4 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/encoded-surrogate-half/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xed near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-escape/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '"\u' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-string/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-3-byte-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe0 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-4-byte-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xf0 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-ascii-encoding/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xc1 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-escape-in-string/error: -------------------------------------------------------------------------------- 1 | 1 33 33 2 | \u0000 is not allowed without JSON_ALLOW_NUL 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/object-in-unterminated-array/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 4 2 | ']' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-negative-overflow/error: -------------------------------------------------------------------------------- 1 | 1 15 15 2 | real number overflow near '-123123e100000' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/real-positive-overflow/error: -------------------------------------------------------------------------------- 1 | 1 14 14 2 | real number overflow near '123123e100000' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/truncated-unicode-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uDADA (first surrogate without the second)"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/compact-object/env: -------------------------------------------------------------------------------- 1 | JSON_COMPACT=1 2 | HASHSEED=1 3 | export JSON_COMPACT HASHSEED 4 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-after-backslash/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unable to decode byte 0xe5 near '"\' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '123' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-exponent/error: -------------------------------------------------------------------------------- 1 | 1 4 4 2 | unable to decode byte 0xe5 near '1e1' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-identifier/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0xe5 near 'a' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/error: -------------------------------------------------------------------------------- 1 | 1 3 3 2 | unable to decode byte 0xe5 near '1e' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/lone-utf-8-continuation-byte/error: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | unable to decode byte 0x81 near '"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/doc/changes.rst: -------------------------------------------------------------------------------- 1 | ****************** 2 | Changes in Jansson 3 | ****************** 4 | 5 | .. include:: ../CHANGES 6 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/invalid-second-surrogate/input: -------------------------------------------------------------------------------- 1 | ["\uD888\u3210 (first surrogate and invalid second surrogate)"] 2 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array-and-object/error.normal: -------------------------------------------------------------------------------- 1 | 2 0 3 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/unterminated-array-and-object/error.strip: -------------------------------------------------------------------------------- 1 | 1 2 2 2 | string or '}' expected near end of file 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-array/env: -------------------------------------------------------------------------------- 1 | JSON_INDENT=4 2 | JSON_COMPACT=1 3 | export JSON_INDENT JSON_COMPACT 4 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/preserve-order/output: -------------------------------------------------------------------------------- 1 | {"foo": 1, "bar": 2, "asdf": 3, "deadbeef": 4, "badc0ffee": 5, "qwerty": 6} -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-in-object-key/error: -------------------------------------------------------------------------------- 1 | 1 15 15 2 | NUL byte in object key not supported near '"foo\u0000bar"' 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/preserve-order/input: -------------------------------------------------------------------------------- 1 | {"foo": 1, "bar": 2, "asdf": 3, "deadbeef": 4, "badc0ffee": 5, "qwerty": 6} 2 | -------------------------------------------------------------------------------- /submodules/jansson/doc/README: -------------------------------------------------------------------------------- 1 | To build the documentation, invoke 2 | 3 | make html 4 | 5 | Then point your browser to _build/html/index.html. 6 | -------------------------------------------------------------------------------- /submodules/jansson/examples/README.rst: -------------------------------------------------------------------------------- 1 | Jansson examples 2 | ================ 3 | 4 | This directory contains simple example programs that use Jansson. 5 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/complex-array/output: -------------------------------------------------------------------------------- 1 | [1, 2, 3, 4, "a", "b", "c", {"core": "dump", "foo": "bar"}, true, false, true, true, null, false] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/indent-compact-object/env: -------------------------------------------------------------------------------- 1 | JSON_INDENT=4 2 | JSON_COMPACT=1 3 | HASHSEED=1 4 | export JSON_INDENT JSON_COMPACT HASHSEED 5 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/complex-array/input: -------------------------------------------------------------------------------- 1 | [1,2,3,4, 2 | "a", "b", "c", 3 | {"foo": "bar", "core": "dump"}, 4 | true, false, true, true, null, false 5 | ] 6 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/ensure-ascii/output: -------------------------------------------------------------------------------- 1 | ["foo", "\u00E5 \u00E4 \u00F6", "foo \u00E5\u00E4", "\u00E5\u00E4 foo", "\u00E5 foo \u00E4", "clef g: \uD834\uDD1E"] -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-in-string/nostrip: -------------------------------------------------------------------------------- 1 | The embedded NULL byte breaks json_loads(), which is used instead of 2 | json_loadf() in the stripped tests. 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/ensure-ascii/input: -------------------------------------------------------------------------------- 1 | [ 2 | "foo", 3 | "å ä ö", 4 | "foo åä", 5 | "åä foo", 6 | "å foo ä", 7 | "clef g: 𝄞" 8 | ] 9 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/null-byte-outside-string/nostrip: -------------------------------------------------------------------------------- 1 | The embedded NULL byte breaks json_loads(), which is used instead of 2 | json_loadf() in the stripped tests. 3 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/restricted-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/restricted-utf-8/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/truncated-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/truncated-utf-8/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/lone-invalid-utf-8/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/lone-invalid-utf-8/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/encoded-surrogate-half/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/encoded-surrogate-half/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-array/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-array/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-int/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-int/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/not-in-unicode-range/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/not-in-unicode-range/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-escape/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-escape/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-string/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-string/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-3-byte-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/overlong-3-byte-encoding/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-4-byte-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/overlong-4-byte-encoding/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/overlong-ascii-encoding/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/overlong-ascii-encoding/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input -------------------------------------------------------------------------------- /ADL_SDK/readme.txt: -------------------------------------------------------------------------------- 1 | Please insert AMD ADL files adl_defines.h adl_sdk.h adl_structures.h here. 2 | 3 | They can be found at 4 | http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/ 5 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bs_dir="$(dirname $(readlink -f $0))" 3 | 4 | #Some versions of libtoolize don't like there being no ltmain.sh file already 5 | touch "${bs_dir}"/ltmain.sh 6 | autoreconf -fi "${bs_dir}" 7 | -------------------------------------------------------------------------------- /pool.h: -------------------------------------------------------------------------------- 1 | #ifndef POOL_H 2 | #define POOL_H 3 | 4 | #include "miner.h" 5 | 6 | extern char* get_pool_name(struct pool *pool); 7 | extern char* get_pool_user(struct pool *pool); 8 | 9 | #endif /* POOL_H */ 10 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eveybcd/gpu-miner/HEAD/submodules/jansson/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input -------------------------------------------------------------------------------- /submodules/jansson/test/bin/Makefile.am: -------------------------------------------------------------------------------- 1 | check_PROGRAMS = json_process 2 | 3 | AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src 4 | LDFLAGS = -static # for speed and Valgrind 5 | LDADD = $(top_builddir)/src/libjansson.la 6 | -------------------------------------------------------------------------------- /ccan/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LIBRARIES = libccan.a 2 | 3 | libccan_a_SOURCES = compiler/compiler.h opt/helpers.c opt/opt.c opt/opt.h opt/parse.c opt/private.h opt/usage.c typesafe_cb/typesafe_cb.h 4 | libccan_a_CPPFLAGS = -I$(top_srcdir) 5 | -------------------------------------------------------------------------------- /sph/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LIBRARIES = libsph.a 2 | 3 | libsph_a_SOURCES = bmw.c echo.c jh.c luffa.c gost.c simd.c blake.c cubehash.c groestl.c keccak.c shavite.c skein.c sha2.c sha2big.c fugue.c hamsi.c panama.c shabal.c whirlpool.c sha256_Y.c ripemd.c sm3.c 4 | -------------------------------------------------------------------------------- /submodules/jansson/test/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = bin suites 2 | EXTRA_DIST = scripts run-suites 3 | 4 | TESTS = run-suites 5 | TESTS_ENVIRONMENT = \ 6 | top_srcdir=$(top_srcdir) \ 7 | top_builddir=$(top_builddir) 8 | 9 | clean-local: 10 | rm -rf logs 11 | -------------------------------------------------------------------------------- /algorithm/bcd.h: -------------------------------------------------------------------------------- 1 | #ifndef BCD_H 2 | #define BCD_H 3 | 4 | #include "miner.h" 5 | 6 | extern int bcd_test(unsigned char *pdata, const unsigned char *ptarget, 7 | uint32_t nonce); 8 | extern void bcd_regenhash(struct work *work); 9 | 10 | #endif /* BCD_H */ 11 | -------------------------------------------------------------------------------- /algorithm/scrypt.h: -------------------------------------------------------------------------------- 1 | #ifndef SCRYPT_H 2 | #define SCRYPT_H 3 | 4 | #include "miner.h" 5 | 6 | /* extern int scrypt_test(unsigned char *pdata, const unsigned char *ptarget, */ 7 | /* uint32_t nonce); */ 8 | extern void scrypt_regenhash(struct work *work); 9 | 10 | #endif /* SCRYPT_H */ 11 | -------------------------------------------------------------------------------- /submodules/jansson/jansson.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: Jansson 7 | Description: Library for encoding, decoding and manipulating JSON data 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -ljansson 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /ocl/binary_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef BINARY_KERNEL_H 2 | #define BINARY_KERNEL_H 3 | 4 | #ifdef __APPLE_CC__ 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include "build_kernel.h" 11 | 12 | cl_program load_opencl_binary_kernel(build_kernel_data *data); 13 | 14 | #endif /* BINARY_KERNEL_H */ 15 | -------------------------------------------------------------------------------- /example.bat: -------------------------------------------------------------------------------- 1 | setx GPU_FORCE_64BIT_PTR 0 2 | 3 | setx GPU_MAX_HEAP_SIZE 100 4 | 5 | setx GPU_USE_SYNC_OBJECTS 1 6 | 7 | setx GPU_MAX_ALLOC_PERCENT 100 8 | 9 | del *.bin 10 | 11 | 12 | sgminer.exe --no-submit-stale --kernel Lyra2RE -o stratum+tcp://92.27.201.170:9174 -u m -p 1 --gpu-platform 2 -I 19 --shaders 2816 -w 64 -g 2 13 | 14 | pause -------------------------------------------------------------------------------- /tools/update_changelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | FILE="$(dirname "$0")/../ChangeLog" 4 | UPDATECMD="git log --oneline --decorate" 5 | 6 | echo "Updated on `date`." > $FILE 7 | echo "If working with git, use \`$UPDATECMD\` for latest change log." >> $FILE 8 | echo "------------------------------------------------------------------------" >> $FILE 9 | $UPDATECMD >> $FILE 10 | -------------------------------------------------------------------------------- /submodules/jansson/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = CHANGES LICENSE README.rst CMakeLists.txt cmake android examples 2 | SUBDIRS = doc src test 3 | 4 | # "make distcheck" builds the dvi target, so use it to check that the 5 | # documentation is built correctly. 6 | dvi: 7 | $(MAKE) SPHINXOPTS_EXTRA=-W html 8 | 9 | pkgconfigdir = $(libdir)/pkgconfig 10 | pkgconfig_DATA = jansson.pc 11 | -------------------------------------------------------------------------------- /ccan/opt/test/compile_ok-const-arg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main(int argc, char *argv[]) 8 | { 9 | opt_register_noarg("-v", opt_version_and_exit, 10 | (const char *)"1.2.3", 11 | (const char *)"Print version"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /submodules/jansson/appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - VS: Visual Studio 9 2008 4 | - VS: Visual Studio 10 2010 5 | - VS: Visual Studio 11 2012 6 | - VS: Visual Studio 12 2013 7 | - VS: Visual Studio 14 2015 8 | 9 | build_script: 10 | - md build 11 | - cd build 12 | - cmake -G "%VS%" .. 13 | - cmake --build . --config Release 14 | - ctest --output-on-failure 15 | -------------------------------------------------------------------------------- /ccan/compiler/test/run-is_compile_constant.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | plan_tests(2); 7 | 8 | ok1(!IS_COMPILE_CONSTANT(argc)); 9 | #if HAVE_BUILTIN_CONSTANT_P 10 | ok1(IS_COMPILE_CONSTANT(7)); 11 | #else 12 | pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false"); 13 | #endif 14 | return exit_status(); 15 | } 16 | -------------------------------------------------------------------------------- /findnonce.h: -------------------------------------------------------------------------------- 1 | #ifndef FINDNONCE_H 2 | #define FINDNONCE_H 3 | 4 | #include "miner.h" 5 | 6 | #define MAXTHREADS (0xFFFFFFFEULL) 7 | #define MAXBUFFERS (0x100) 8 | #define BUFFERSIZE (sizeof(uint32_t) * MAXBUFFERS) 9 | 10 | extern void precalc_hash(dev_blk_ctx *blk, uint32_t *state, uint32_t *data); 11 | extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res); 12 | 13 | #endif /*FINDNONCE_H*/ 14 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/JanssonConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@JANSSON_DISPLAY_VERSION@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /ccan/compiler/test/compile_fail-printf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void PRINTF_FMT(2,3) my_printf(int x, const char *fmt, ...) 4 | { 5 | } 6 | 7 | int main(int argc, char *argv[]) 8 | { 9 | unsigned int i = 0; 10 | 11 | my_printf(1, "Not a pointer " 12 | #ifdef FAIL 13 | "%p", 14 | #if !HAVE_ATTRIBUTE_PRINTF 15 | #error "Unfortunately we don't fail if !HAVE_ATTRIBUTE_PRINTF." 16 | #endif 17 | #else 18 | "%i", 19 | #endif 20 | i); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /lib/memchr.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress a valgrind message about use of uninitialized memory in memchr(). 2 | # POSIX states that when the character is found, memchr must not read extra 3 | # bytes in an overestimated length (for example, where memchr is used to 4 | # implement strnlen). However, we use a safe word read to provide a speedup. 5 | { 6 | memchr-value4 7 | Memcheck:Value4 8 | fun:rpl_memchr 9 | } 10 | { 11 | memchr-value8 12 | Memcheck:Value8 13 | fun:rpl_memchr 14 | } 15 | -------------------------------------------------------------------------------- /winbuild/dist/include/stdbool.h: -------------------------------------------------------------------------------- 1 | /* stdbool.h standard header */ 2 | 3 | #ifndef _STDBOOL 4 | #define _STDBOOL 5 | 6 | #define __bool_true_false_are_defined 1 7 | 8 | #ifndef __cplusplus 9 | 10 | #define bool _Bool 11 | #define false 0 12 | #define true 1 13 | 14 | #endif /* __cplusplus */ 15 | 16 | #endif /* _STDBOOL */ 17 | 18 | /* 19 | * Copyright (c) 1992-2010 by P.J. Plauger. ALL RIGHTS RESERVED. 20 | * Consult your license regarding permissions and restrictions. 21 | V5.30:0009 */ 22 | -------------------------------------------------------------------------------- /submodules/jansson/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.o 3 | *.a 4 | .libs 5 | .deps 6 | Makefile 7 | Makefile.in 8 | aclocal.m4 9 | autom4te.cache 10 | config.guess 11 | config.h 12 | config.h.in 13 | config.log 14 | config.status 15 | config.sub 16 | configure 17 | depcomp 18 | install-sh 19 | libtool 20 | ltmain.sh 21 | missing 22 | compile 23 | test-driver 24 | *.lo 25 | *.la 26 | stamp-h1 27 | *.pyc 28 | *.pc 29 | /src/jansson_config.h 30 | /jansson_private_config.h.in 31 | /jansson_private_config.h 32 | /build 33 | *.exe 34 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* NULL args for callback function should be OK for normal and _def. */ 5 | 6 | static void _register_callback(void (*cb)(const void *arg), const void *arg) 7 | { 8 | } 9 | 10 | #define register_callback(cb, arg) \ 11 | _register_callback(typesafe_cb(void, const void *, (cb), (arg)), (arg)) 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | register_callback(NULL, "hello world"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /submodules/jansson/test/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | bin/json_process 3 | suites/api/test_array 4 | suites/api/test_copy 5 | suites/api/test_cpp 6 | suites/api/test_dump 7 | suites/api/test_dump_callback 8 | suites/api/test_equal 9 | suites/api/test_load 10 | suites/api/test_loadb 11 | suites/api/test_memory_funcs 12 | suites/api/test_number 13 | suites/api/test_object 14 | suites/api/test_pack 15 | suites/api/test_simple 16 | suites/api/test_unpack 17 | suites/api/test_load_callback 18 | run-suites.log 19 | run-suites.trs 20 | test-suite.log 21 | 22 | -------------------------------------------------------------------------------- /submodules/jansson/src/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = jansson.def 2 | 3 | include_HEADERS = jansson.h 4 | nodist_include_HEADERS = jansson_config.h 5 | 6 | lib_LTLIBRARIES = libjansson.la 7 | libjansson_la_SOURCES = \ 8 | dump.c \ 9 | error.c \ 10 | hashtable.c \ 11 | hashtable.h \ 12 | hashtable_seed.c \ 13 | jansson_private.h \ 14 | load.c \ 15 | lookup3.h \ 16 | memory.c \ 17 | pack_unpack.c \ 18 | strbuffer.c \ 19 | strbuffer.h \ 20 | strconv.c \ 21 | utf.c \ 22 | utf.h \ 23 | value.c 24 | libjansson_la_LDFLAGS = \ 25 | -no-undefined \ 26 | -export-symbols-regex '^json_' \ 27 | -version-info 14:0:10 28 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void _set_some_value(void *val) 5 | { 6 | } 7 | 8 | #define set_some_value(expr) \ 9 | _set_some_value(typesafe_cb_cast(void *, long, (expr))) 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | #ifdef FAIL 14 | bool x = 0; 15 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 16 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 17 | #endif 18 | #else 19 | long x = 0; 20 | #endif 21 | set_some_value(x); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /submodules/jansson/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = conf.py apiref.rst changes.rst conformance.rst \ 2 | gettingstarted.rst github_commits.c index.rst portability.rst \ 3 | tutorial.rst upgrading.rst ext/refcounting.py 4 | 5 | SPHINXBUILD = sphinx-build 6 | SPHINXOPTS = -d _build/doctrees $(SPHINXOPTS_EXTRA) 7 | 8 | html-local: 9 | $(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html 10 | 11 | install-html-local: html 12 | mkdir -p $(DESTDIR)$(htmldir) 13 | cp -r _build/html $(DESTDIR)$(htmldir) 14 | 15 | uninstall-local: 16 | rm -rf $(DESTDIR)$(htmldir) 17 | 18 | clean-local: 19 | rm -rf _build 20 | rm -f ext/refcounting.pyc 21 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void _set_some_value(void *val); 4 | 5 | void _set_some_value(void *val) 6 | { 7 | } 8 | 9 | #define set_some_value(expr) \ 10 | _set_some_value(typesafe_cb_cast(void *, unsigned long, (expr))) 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | #ifdef FAIL 15 | int x = 0; 16 | set_some_value(x); 17 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 18 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 19 | #endif 20 | #else 21 | void *p = 0; 22 | set_some_value(p); 23 | #endif 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/CheckFunctionKeywords.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCSourceCompiles) 2 | 3 | macro(check_function_keywords _wordlist) 4 | set(${_result} "") 5 | foreach(flag ${_wordlist}) 6 | string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}") 7 | string(TOUPPER "${flagname}" flagname) 8 | set(have_flag "HAVE_${flagname}") 9 | check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag}) 10 | if(${have_flag} AND NOT ${_result}) 11 | set(${_result} "${flag}") 12 | # break() 13 | endif(${have_flag} AND NOT ${_result}) 14 | endforeach(flag) 15 | endmacro(check_function_keywords) 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /ccan/opt/test/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef CCAN_OPT_TEST_UTILS_H 2 | #define CCAN_OPT_TEST_UTILS_H 3 | #include 4 | #include 5 | 6 | bool parse_args(int *argc, char ***argv, ...); 7 | extern char *err_output; 8 | void save_err_output(const char *fmt, ...); 9 | 10 | extern unsigned int test_cb_called; 11 | char *test_noarg(void *arg); 12 | char *test_arg(const char *optarg, const char *arg); 13 | void show_arg(char buf[OPT_SHOW_LEN], const char *arg); 14 | 15 | extern struct opt_table short_table[]; 16 | extern struct opt_table long_table[]; 17 | extern struct opt_table long_and_short_table[]; 18 | extern struct opt_table subtables[]; 19 | #endif /* CCAN_OPT_TEST_UTILS_H */ 20 | -------------------------------------------------------------------------------- /ccan/opt/private.h: -------------------------------------------------------------------------------- 1 | #ifndef CCAN_OPT_PRIVATE_H 2 | #define CCAN_OPT_PRIVATE_H 3 | 4 | extern struct opt_table *opt_table; 5 | extern unsigned int opt_count, opt_num_short, opt_num_short_arg, opt_num_long; 6 | 7 | extern const char *opt_argv0; 8 | 9 | #define subtable_of(entry) ((struct opt_table *)((entry)->names)) 10 | 11 | const char *first_sopt(unsigned *i); 12 | const char *next_sopt(const char *names, unsigned *i); 13 | const char *first_lopt(unsigned *i, unsigned *len); 14 | const char *next_lopt(const char *p, unsigned *i, unsigned *len); 15 | 16 | int parse_one(int *argc, char *argv[], unsigned *offset, 17 | void (*errlog)(const char *fmt, ...)); 18 | 19 | #endif /* CCAN_OPT_PRIVATE_H */ 20 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/JanssonConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the jansson package 2 | # It defines the following variables 3 | # JANSSON_INCLUDE_DIRS - include directories for FooBar 4 | # JANSSON_LIBRARIES - libraries to link against 5 | 6 | # Get the path of the current file. 7 | get_filename_component(JANSSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 8 | 9 | # Set the include directories. 10 | set(JANSSON_INCLUDE_DIRS "@JANSSON__INCLUDE_DIRS@") 11 | 12 | # Include the project Targets file, this contains definitions for IMPORTED targets. 13 | include(${JANSSON_CMAKE_DIR}/JanssonTargets.cmake) 14 | 15 | # IMPORTED targets from JanssonTargets.cmake 16 | set(JANSSON_LIBRARIES jansson) 17 | 18 | -------------------------------------------------------------------------------- /events.h: -------------------------------------------------------------------------------- 1 | #ifndef EVENTS_H 2 | #define EVENTS_H 3 | 4 | typedef struct event { 5 | unsigned int id; 6 | const char *event_type; 7 | const char *runcmd; 8 | bool reboot; 9 | unsigned int reboot_delay; 10 | bool quit; 11 | const char *quit_msg; 12 | struct event *prev, *next; 13 | } event_t; 14 | 15 | extern char *set_event_type(const char *event_type); 16 | extern char *set_event_runcmd(const char *cmd); 17 | extern char *set_event_reboot(const char *arg); 18 | extern char *set_event_reboot_delay(const char *delay); 19 | extern char *set_event_quit(const char *arg); 20 | extern char *set_event_quit_message(const char *msg); 21 | extern void event_notify(const char *event_type); 22 | 23 | #endif /* EVENTS_H */ -------------------------------------------------------------------------------- /submodules/jansson/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_ARM_MODE := arm 5 | 6 | LOCAL_SRC_FILES := \ 7 | src/dump.c \ 8 | src/error.c \ 9 | src/hashtable.c \ 10 | src/hashtable_seed.c \ 11 | src/load.c \ 12 | src/memory.c \ 13 | src/pack_unpack.c \ 14 | src/strbuffer.c \ 15 | src/strconv.c \ 16 | src/utf.c \ 17 | src/value.c 18 | 19 | LOCAL_C_INCLUDES += \ 20 | $(LOCAL_PATH) \ 21 | $(LOCAL_PATH)/android \ 22 | $(LOCAL_PATH)/src 23 | 24 | LOCAL_MODULE_TAGS := optional 25 | LOCAL_SHARED_LIBRARIES := libc 26 | LOCAL_CFLAGS += -O3 -DHAVE_STDINT_H=1 27 | 28 | LOCAL_MODULE:= libjansson 29 | 30 | include $(BUILD_SHARED_LIBRARY) 31 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void _callback(void (*fn)(void *arg), void *arg); 5 | void _callback(void (*fn)(void *arg), void *arg) 6 | { 7 | fn(arg); 8 | } 9 | 10 | /* Callback is set up to warn if arg isn't a pointer (since it won't 11 | * pass cleanly to _callback's second arg. */ 12 | #define callback(fn, arg) \ 13 | _callback(typesafe_cb(void, (fn), (arg)), (arg)) 14 | 15 | void my_callback(int something); 16 | void my_callback(int something) 17 | { 18 | } 19 | 20 | int main(int argc, char *argv[]) 21 | { 22 | #ifdef FAIL 23 | /* This fails due to arg, not due to cast. */ 24 | callback(my_callback, 100); 25 | #endif 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void _register_callback(void (*cb)(void *arg, int x), void *arg) 5 | { 6 | } 7 | #define register_callback(cb, arg) \ 8 | _register_callback(typesafe_cb_postargs(void, void *, (cb), (arg), int), (arg)) 9 | 10 | static void my_callback(char *p, int x) 11 | { 12 | } 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | #ifdef FAIL 17 | int *p; 18 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 19 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 20 | #endif 21 | #else 22 | char *p; 23 | #endif 24 | p = NULL; 25 | register_callback(my_callback, p); 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void _register_callback(void (*cb)(int x, void *arg), void *arg) 5 | { 6 | } 7 | 8 | #define register_callback(cb, arg) \ 9 | _register_callback(typesafe_cb_preargs(void, void *, (cb), (arg), int), (arg)) 10 | 11 | static void my_callback(int x, char *p) 12 | { 13 | } 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | #ifdef FAIL 18 | int *p; 19 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 20 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 21 | #endif 22 | #else 23 | char *p; 24 | #endif 25 | p = NULL; 26 | register_callback(my_callback, p); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /ocl.h: -------------------------------------------------------------------------------- 1 | #ifndef OCL_H 2 | #define OCL_H 3 | 4 | #include 5 | 6 | typedef struct __clState { 7 | cl_context context; 8 | cl_kernel kernel; 9 | cl_kernel *extra_kernels; 10 | size_t n_extra_kernels; 11 | cl_command_queue commandQueue; 12 | cl_program program; 13 | cl_mem outputBuffer; 14 | cl_mem CLbuffer0; 15 | cl_mem MidstateBuf; 16 | cl_mem padbuffer8; 17 | cl_mem buffer1; 18 | cl_mem buffer2; 19 | cl_mem buffer3; 20 | unsigned char cldata[256]; 21 | bool goffset; 22 | cl_uint vwidth; 23 | size_t max_work_size; 24 | size_t wsize; 25 | size_t compute_shaders; 26 | } _clState; 27 | 28 | extern int clDevicesNum(void); 29 | extern _clState *initCl(unsigned int gpu, char *name, size_t nameSize, algorithm_t *algorithm); 30 | 31 | #endif /* OCL_H */ 32 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid-unicode/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2016 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | test -d $test_path 10 | } 11 | 12 | run_test() { 13 | $json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr 14 | valgrind_check $test_log/stderr || return 1 15 | cmp -s $test_path/error $test_log/stderr 16 | } 17 | 18 | show_error() { 19 | valgrind_show_error && return 20 | 21 | echo "EXPECTED ERROR:" 22 | nl -bn $test_path/error 23 | echo "ACTUAL ERROR:" 24 | nl -bn $test_log/stderr 25 | } 26 | 27 | . $top_srcdir/test/scripts/run-tests.sh 28 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/check-exports: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This test checks that libjansson.so exports the correct symbols. 4 | # 5 | 6 | SOFILE="../src/.libs/libjansson.so" 7 | 8 | # The list of symbols, which the shared object should export, is read 9 | # from the def file, which is used in Windows builds 10 | grep 'json_' $top_srcdir/src/jansson.def \ 11 | | sed -e 's/ //g' \ 12 | | sort \ 13 | >$test_log/exports 14 | 15 | nm -D $SOFILE >/dev/null >$test_log/symbols 2>/dev/null \ 16 | || exit 77 # Skip if "nm -D" doesn't seem to work 17 | 18 | grep ' [DT] ' $test_log/symbols | cut -d' ' -f3 | grep -v '^_' | sort >$test_log/output 19 | 20 | if ! cmp -s $test_log/exports $test_log/output; then 21 | diff -u $test_log/exports $test_log/output >&2 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /submodules/jansson/src/utf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #ifndef UTF_H 9 | #define UTF_H 10 | 11 | #ifdef HAVE_CONFIG_H 12 | #include 13 | #endif 14 | 15 | #ifdef HAVE_STDINT_H 16 | #include 17 | #endif 18 | 19 | int utf8_encode(int32_t codepoint, char *buffer, size_t *size); 20 | 21 | size_t utf8_check_first(char byte); 22 | size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint); 23 | const char *utf8_iterate(const char *buffer, size_t size, int32_t *codepoint); 24 | 25 | int utf8_check_string(const char *string, size_t length); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct foo { 5 | int x; 6 | }; 7 | 8 | struct bar { 9 | int x; 10 | }; 11 | 12 | struct baz { 13 | int x; 14 | }; 15 | 16 | struct any { 17 | int x; 18 | }; 19 | 20 | struct other { 21 | int x; 22 | }; 23 | 24 | static void take_any(struct any *any) 25 | { 26 | } 27 | 28 | int main(int argc, char *argv[]) 29 | { 30 | #ifdef FAIL 31 | struct other 32 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 33 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 34 | #endif 35 | #else 36 | struct foo 37 | #endif 38 | *arg = NULL; 39 | take_any(typesafe_cb_cast3(struct any *, 40 | struct foo *, struct bar *, struct baz *, 41 | arg)); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /ocl/build_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef BUILD_KERNEL_H 2 | #define BUILD_KERNEL_H 3 | 4 | #include 5 | 6 | #ifdef __APPLE_CC__ 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | typedef struct _build_kernel_data { 13 | char source_filename[255]; 14 | char binary_filename[255]; 15 | char compiler_options[512]; 16 | 17 | cl_context context; 18 | cl_device_id *device; 19 | 20 | // for compiler options 21 | char platform[64]; 22 | char sgminer_path[255]; 23 | const char *kernel_path; 24 | size_t work_size; 25 | float opencl_version; 26 | } build_kernel_data; 27 | 28 | cl_program build_opencl_kernel(build_kernel_data *data, const char *filename); 29 | bool save_opencl_kernel(build_kernel_data *data, cl_program program); 30 | void set_base_compiler_options(build_kernel_data *data); 31 | 32 | #endif /* BUILD_KERNEL_H */ 33 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_fail-typesafe_cb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void _register_callback(void (*cb)(void *arg), void *arg) 5 | { 6 | } 7 | 8 | #define register_callback(cb, arg) \ 9 | _register_callback(typesafe_cb(void, void *, (cb), (arg)), (arg)) 10 | 11 | static void my_callback(char *p) 12 | { 13 | } 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | char str[] = "hello world"; 18 | #ifdef FAIL 19 | int *p; 20 | #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P 21 | #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." 22 | #endif 23 | #else 24 | char *p; 25 | #endif 26 | p = NULL; 27 | 28 | /* This should work always. */ 29 | register_callback(my_callback, str); 30 | 31 | /* This will fail with FAIL defined */ 32 | register_callback(my_callback, p); 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /ccan/opt/test/run-no-options.c: -------------------------------------------------------------------------------- 1 | /* Make sure we still work with no options registered */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "utils.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | const char *myname = argv[0]; 13 | 14 | plan_tests(7); 15 | 16 | /* Simple short arg.*/ 17 | ok1(!parse_args(&argc, &argv, "-a", NULL)); 18 | /* Simple long arg.*/ 19 | ok1(!parse_args(&argc, &argv, "--aaa", NULL)); 20 | 21 | /* Extra arguments preserved. */ 22 | ok1(parse_args(&argc, &argv, "extra", "args", NULL)); 23 | ok1(argc == 3); 24 | ok1(argv[0] == myname); 25 | ok1(strcmp(argv[1], "extra") == 0); 26 | ok1(strcmp(argv[2], "args") == 0); 27 | 28 | /* parse_args allocates argv */ 29 | free(argv); 30 | 31 | return exit_status(); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/encoding-flags/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2016 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | test -d $test_path 10 | } 11 | 12 | run_test() { 13 | ( 14 | if [ -f $test_path/env ]; then 15 | . $test_path/env 16 | fi 17 | $json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr 18 | ) 19 | valgrind_check $test_log/stderr || return 1 20 | cmp -s $test_path/output $test_log/stdout 21 | } 22 | 23 | show_error() { 24 | valgrind_show_error && return 25 | 26 | echo "EXPECTED OUTPUT:" 27 | nl -bn $test_path/output 28 | echo "ACTUAL OUTPUT:" 29 | nl -bn $test_log/stdout 30 | } 31 | 32 | . $top_srcdir/test/scripts/run-tests.sh 33 | -------------------------------------------------------------------------------- /winbuild/dist/include/unistd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* Values for the second argument to access. 4 | These may be OR'd together. */ 5 | #define R_OK 4 /* Test for read permission. */ 6 | #define W_OK 2 /* Test for write permission. */ 7 | #define F_OK 0 /* Test for existence. */ 8 | 9 | // POSIX open,read,write... deprecated as of VC++ 2005. 10 | // Use ISO conformant _open,_read,_write instead. 11 | #define access _access 12 | #define dup2 _dup2 13 | #define execve _execve 14 | #define ftruncate _chsize 15 | #define unlink _unlink 16 | #define fileno _fileno 17 | #define getcwd _getcwd 18 | #define chdir _chdir 19 | #define isatty _isatty 20 | #define lseek _lseek 21 | #define open _open 22 | #define write _write 23 | #define close _close 24 | #define read _read 25 | #define snprintf _snprintf 26 | 27 | #define STDIN_FILENO 0 28 | #define STDOUT_FILENO 1 29 | #define STDERR_FILENO 2 -------------------------------------------------------------------------------- /m4/wchar_t.m4: -------------------------------------------------------------------------------- 1 | # wchar_t.m4 serial 4 (gettext-0.18.2) 2 | dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | dnl Test whether has the 'wchar_t' type. 9 | dnl Prerequisite: AC_PROG_CC 10 | 11 | AC_DEFUN([gt_TYPE_WCHAR_T], 12 | [ 13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_PROGRAM( 16 | [[#include 17 | wchar_t foo = (wchar_t)'\0';]], 18 | [[]])], 19 | [gt_cv_c_wchar_t=yes], 20 | [gt_cv_c_wchar_t=no])]) 21 | if test $gt_cv_c_wchar_t = yes; then 22 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) 23 | fi 24 | ]) 25 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct foo { 5 | int x; 6 | }; 7 | 8 | struct bar { 9 | int x; 10 | }; 11 | 12 | struct baz { 13 | int x; 14 | }; 15 | 16 | struct any { 17 | int x; 18 | }; 19 | 20 | static void take_any(struct any *any) 21 | { 22 | } 23 | 24 | int main(int argc, char *argv[]) 25 | { 26 | /* Otherwise we get unused warnings for these. */ 27 | struct foo *foo = NULL; 28 | struct bar *bar = NULL; 29 | struct baz *baz = NULL; 30 | 31 | take_any(typesafe_cb_cast3(struct any *, 32 | struct foo *, struct bar *, struct baz *, 33 | foo)); 34 | take_any(typesafe_cb_cast3(struct any *, 35 | struct foo *, struct bar *, struct baz *, 36 | bar)); 37 | take_any(typesafe_cb_cast3(struct any *, 38 | struct foo *, struct bar *, struct baz *, 39 | baz)); 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /mknsis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MINGW_PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin 4 | 5 | OUT_BASE="cpuminer-installer" 6 | OUT_EXE="$OUT_BASE.exe" 7 | 8 | PATH=$PATH:$MINGW_PATH \ 9 | nsiswrapper --run \ 10 | --name "CPU miner" \ 11 | --outfile "$OUT_EXE" \ 12 | minerd.exe \ 13 | $MINGW_PATH/libcurl-4.dll=libcurl-4.dll \ 14 | $MINGW_PATH/pthreadgc2.dll=pthreadgc2.dll \ 15 | $MINGW_PATH/libidn-11.dll=libidn-11.dll \ 16 | $MINGW_PATH/libssh2-1.dll=libssh2-1.dll \ 17 | $MINGW_PATH/libssl-10.dll=libssl-10.dll \ 18 | $MINGW_PATH/zlib1.dll=zlib1.dll \ 19 | $MINGW_PATH/libcrypto-10.dll=libcrypto-10.dll \ 20 | $MINGW_PATH/libiconv-2.dll=libiconv-2.dll \ 21 | $MINGW_PATH/libintl-8.dll=libintl-8.dll 22 | 23 | chmod 0755 "$OUT_EXE" 24 | zip -9 "$OUT_BASE" "$OUT_EXE" 25 | rm -f "$OUT_EXE" 26 | 27 | chmod 0644 "$OUT_BASE.zip" 28 | 29 | echo -n "SHA1: " 30 | sha1sum "$OUT_BASE.zip" 31 | 32 | echo -n "MD5: " 33 | md5sum "$OUT_BASE.zip" 34 | 35 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2016 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | case "$test_name" in 10 | *.c|check-exports) 11 | return 0 12 | ;; 13 | *) 14 | return 1 15 | ;; 16 | esac 17 | } 18 | 19 | run_test() { 20 | if [ "$test_name" = "check-exports" ]; then 21 | test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr 22 | else 23 | $test_runner $suite_builddir/${test_name%.c} \ 24 | >$test_log/stdout \ 25 | 2>$test_log/stderr \ 26 | || return 1 27 | valgrind_check $test_log/stderr || return 1 28 | fi 29 | } 30 | 31 | show_error() { 32 | valgrind_show_error && return 33 | cat $test_log/stderr 34 | } 35 | 36 | . $top_srcdir/test/scripts/run-tests.sh 37 | -------------------------------------------------------------------------------- /kernel/sm3.cl: -------------------------------------------------------------------------------- 1 | #if 0 2 | 3 | #define cpu_to_be16(v) (v) 4 | #define cpu_to_be32(v) (v) 5 | #define be16_to_cpu(v) (v) 6 | #define be32_to_cpu(v) (v) 7 | 8 | #else 9 | 10 | #define cpu_to_be16(v) (((v)<< 8) | ((v)>>8)) 11 | #define cpu_to_be32(v) (((v)>>24) | (((v)>>8)&0xff00) | (((v)<<8)&0xff0000) | ((v)<<24)) 12 | #define be16_to_cpu(v) cpu_to_be16(v) 13 | #define be32_to_cpu(v) cpu_to_be32(v) 14 | 15 | #endif 16 | 17 | #define SM3_ROTATELEFT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) 18 | 19 | #define SM3_P0(x) ((x) ^ SM3_ROTATELEFT((x),9) ^ SM3_ROTATELEFT((x),17)) 20 | #define SM3_P1(x) ((x) ^ SM3_ROTATELEFT((x),15) ^ SM3_ROTATELEFT((x),23)) 21 | 22 | #define SM3_FF0(x,y,z) ( (x) ^ (y) ^ (z)) 23 | #define SM3_FF1(x,y,z) (((x) & (y)) | ( (x) & (z)) | ( (y) & (z))) 24 | 25 | #define SM3_GG0(x,y,z) ( (x) ^ (y) ^ (z)) 26 | #define SM3_GG1(x,y,z) (((x) & (y)) | ( (~(x)) & (z)) ) 27 | 28 | 29 | #define SM3_DIGEST_LENGTH 32 30 | #define SM3_BLOCK_SIZE 64 31 | #define SM3_CBLOCK (SM3_BLOCK_SIZE) 32 | #define SM3_HMAC_SIZE (SM3_DIGEST_LENGTH) -------------------------------------------------------------------------------- /submodules/jansson/src/strbuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #ifndef STRBUFFER_H 9 | #define STRBUFFER_H 10 | 11 | #include 12 | 13 | typedef struct { 14 | char *value; 15 | size_t length; /* bytes used */ 16 | size_t size; /* bytes allocated */ 17 | } strbuffer_t; 18 | 19 | int strbuffer_init(strbuffer_t *strbuff); 20 | void strbuffer_close(strbuffer_t *strbuff); 21 | 22 | void strbuffer_clear(strbuffer_t *strbuff); 23 | 24 | const char *strbuffer_value(const strbuffer_t *strbuff); 25 | 26 | /* Steal the value and close the strbuffer */ 27 | char *strbuffer_steal_value(strbuffer_t *strbuff); 28 | 29 | int strbuffer_append_byte(strbuffer_t *strbuff, char byte); 30 | int strbuffer_append_bytes(strbuffer_t *strbuff, const char *data, size_t size); 31 | 32 | char strbuffer_pop(strbuffer_t *strbuff); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = run check-exports 2 | 3 | check_PROGRAMS = \ 4 | test_array \ 5 | test_copy \ 6 | test_dump \ 7 | test_dump_callback \ 8 | test_equal \ 9 | test_load \ 10 | test_loadb \ 11 | test_load_callback \ 12 | test_memory_funcs \ 13 | test_number \ 14 | test_object \ 15 | test_pack \ 16 | test_simple \ 17 | test_unpack 18 | 19 | test_array_SOURCES = test_array.c util.h 20 | test_copy_SOURCES = test_copy.c util.h 21 | test_dump_SOURCES = test_dump.c util.h 22 | test_dump_callback_SOURCES = test_dump_callback.c util.h 23 | test_load_SOURCES = test_load.c util.h 24 | test_loadb_SOURCES = test_loadb.c util.h 25 | test_memory_funcs_SOURCES = test_memory_funcs.c util.h 26 | test_number_SOURCES = test_number.c util.h 27 | test_object_SOURCES = test_object.c util.h 28 | test_pack_SOURCES = test_pack.c util.h 29 | test_simple_SOURCES = test_simple.c util.h 30 | test_unpack_SOURCES = test_unpack.c util.h 31 | 32 | AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src 33 | LDFLAGS = -static # for speed and Valgrind 34 | LDADD = $(top_builddir)/src/libjansson.la 35 | -------------------------------------------------------------------------------- /adl.h: -------------------------------------------------------------------------------- 1 | #ifndef ADL_H 2 | #define ADL_H 3 | 4 | #ifdef HAVE_ADL 5 | extern bool adl_active; 6 | extern bool opt_reorder; 7 | extern int opt_hysteresis; 8 | extern int opt_targettemp; 9 | extern int opt_overheattemp; 10 | void init_adl(int nDevs); 11 | float gpu_temp(int gpu); 12 | int gpu_engineclock(int gpu); 13 | int gpu_memclock(int gpu); 14 | float gpu_vddc(int gpu); 15 | int gpu_activity(int gpu); 16 | int gpu_fanspeed(int gpu); 17 | int gpu_fanpercent(int gpu); 18 | extern int set_powertune(int gpu, int iPercentage); 19 | bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vddc, 20 | int *activity, int *fanspeed, int *fanpercent, int *powertune); 21 | void change_gpusettings(int gpu); 22 | void gpu_autotune(int gpu, enum dev_enable *denable); 23 | void clear_adl(int nDevs); 24 | 25 | #else /* HAVE_ADL */ 26 | 27 | #define adl_active (0) 28 | static inline void init_adl(__maybe_unused int nDevs) {} 29 | static inline void change_gpusettings(__maybe_unused int gpu) { } 30 | static inline void clear_adl(__maybe_unused int nDevs) {} 31 | 32 | #endif /* HAVE_ADL */ 33 | 34 | #endif /* ADL_H */ 35 | -------------------------------------------------------------------------------- /winbuild/.gitignore: -------------------------------------------------------------------------------- 1 | #OS junk files 2 | [Tt]humbs.db 3 | *.DS_Store 4 | 5 | #Visual Studio files 6 | *.[Oo]bj 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *.vssscc 12 | *_i.c 13 | *_p.c 14 | *.ncb 15 | *.suo 16 | *.tlb 17 | *.tlh 18 | *.bak 19 | *.[Cc]ache 20 | *.ilk 21 | *.log 22 | *.lib 23 | *.sbr 24 | *.sdf 25 | *.opensdf 26 | *.unsuccessfulbuild 27 | ipch/ 28 | [Oo]bj/ 29 | [Bb]in 30 | [Dd]ebug*/ 31 | [Rr]elease*/ 32 | Ankh.NoLoad 33 | 34 | #MonoDevelop 35 | *.pidb 36 | *.userprefs 37 | 38 | #Tooling 39 | _ReSharper*/ 40 | *.resharper 41 | [Tt]est[Rr]esult* 42 | *.sass-cache 43 | 44 | #Project files 45 | [Bb]uild/ 46 | 47 | #Subversion files 48 | .svn 49 | 50 | # Office Temp Files 51 | ~$* 52 | 53 | # vim Temp Files 54 | *~ 55 | 56 | #NuGet 57 | packages/ 58 | *.nupkg 59 | 60 | #ncrunch 61 | *ncrunch* 62 | *crunch*.local.xml 63 | 64 | # visual studio database projects 65 | *.dbmdl 66 | 67 | #Test files 68 | *.testsettings 69 | 70 | #Config 71 | !dist/include/config.h 72 | 73 | #Library archives 74 | *.zip 75 | *.rar 76 | 77 | #Library binaries 78 | *.dll 79 | *.a 80 | 81 | #Git version file 82 | gitversion.h 83 | 84 | -------------------------------------------------------------------------------- /submodules/jansson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2016 Petri Lehtinen 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /submodules/jansson/test/scripts/valgrind.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009-2016 Petri Lehtinen 2 | # 3 | # Jansson is free software; you can redistribute it and/or modify 4 | # it under the terms of the MIT license. See LICENSE for details. 5 | 6 | [ -z "$VALGRIND" ] && VALGRIND=0 7 | 8 | VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q" 9 | 10 | if [ $VALGRIND -eq 1 ]; then 11 | test_runner="$VALGRIND_CMDLINE" 12 | json_process="$VALGRIND_CMDLINE $json_process" 13 | else 14 | test_runner="" 15 | fi 16 | 17 | valgrind_check() { 18 | if [ $VALGRIND -eq 1 ]; then 19 | # Check for Valgrind error output. The valgrind option 20 | # --error-exitcode is not enough because Valgrind doesn't 21 | # think unfreed allocs are errors. 22 | if grep -E -q '^==[0-9]+== ' $1; then 23 | touch $test_log/valgrind_error 24 | return 1 25 | fi 26 | fi 27 | } 28 | 29 | valgrind_show_error() { 30 | if [ $VALGRIND -eq 1 -a -f $test_log/valgrind_error ]; then 31 | echo "valgrind detected an error" 32 | return 0 33 | fi 34 | return 1 35 | } 36 | -------------------------------------------------------------------------------- /driver-opencl.h: -------------------------------------------------------------------------------- 1 | #ifndef DEVICE_GPU_H 2 | #define DEVICE_GPU_H 3 | 4 | #include "miner.h" 5 | 6 | 7 | extern void print_ndevs(int *ndevs); 8 | extern void *reinit_gpu(void *userdata); 9 | extern char *set_gpu_map(char *arg); 10 | extern char *set_gpu_threads(const char *arg); 11 | extern char *set_gpu_engine(const char *arg); 12 | extern char *set_gpu_fan(const char *arg); 13 | extern char *set_gpu_memclock(const char *arg); 14 | extern char *set_gpu_memdiff(char *arg); 15 | extern char *set_gpu_powertune(char *arg); 16 | extern char *set_gpu_vddc(char *arg); 17 | extern char *set_temp_overheat(char *arg); 18 | extern char *set_temp_target(char *arg); 19 | extern char *set_intensity(const char *arg); 20 | extern char *set_xintensity(const char *arg); 21 | extern char *set_rawintensity(const char *arg); 22 | extern char *set_vector(char *arg); 23 | extern char *set_worksize(const char *arg); 24 | extern char *set_shaders(char *arg); 25 | extern char *set_lookup_gap(char *arg); 26 | extern char *set_thread_concurrency(const char *arg); 27 | void manage_gpu(void); 28 | extern void pause_dynamic_threads(int gpu); 29 | 30 | extern int opt_platform_id; 31 | 32 | extern struct device_drv opencl_drv; 33 | 34 | #endif /* DEVICE_GPU_H */ 35 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/test_loadb.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include "util.h" 11 | 12 | static void run_tests() 13 | { 14 | json_t *json; 15 | json_error_t error; 16 | const char str[] = "[\"A\", {\"B\": \"C\"}, 1, 2, 3]garbage"; 17 | size_t len = strlen(str) - strlen("garbage"); 18 | 19 | json = json_loadb(str, len, 0, &error); 20 | if(!json) { 21 | fail("json_loadb failed on a valid JSON buffer"); 22 | } 23 | json_decref(json); 24 | 25 | json = json_loadb(str, len - 1, 0, &error); 26 | if (json) { 27 | json_decref(json); 28 | fail("json_loadb should have failed on an incomplete buffer, but it didn't"); 29 | } 30 | if(error.line != 1) { 31 | fail("json_loadb returned an invalid line number on fail"); 32 | } 33 | if(strcmp(error.text, "']' expected near end of file") != 0) { 34 | fail("json_loadb returned an invalid error message for an unclosed top-level array"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /submodules/jansson/test/run-suites: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while [ -n "$1" ]; do 4 | suite=$1 5 | if [ -x $top_srcdir/test/suites/$suite/run ]; then 6 | SUITES="$SUITES $suite" 7 | else 8 | echo "No such suite: $suite" 9 | exit 1 10 | fi 11 | shift 12 | done 13 | 14 | if [ -z "$SUITES" ]; then 15 | suitedirs=$top_srcdir/test/suites/* 16 | for suitedir in $suitedirs; do 17 | if [ -d $suitedir ]; then 18 | SUITES="$SUITES `basename $suitedir`" 19 | fi 20 | done 21 | fi 22 | 23 | [ -z "$STOP" ] && STOP=0 24 | 25 | suites_srcdir=$top_srcdir/test/suites 26 | suites_builddir=suites 27 | scriptdir=$top_srcdir/test/scripts 28 | logdir=logs 29 | bindir=bin 30 | export suites_srcdir suites_builddir scriptdir logdir bindir 31 | 32 | passed=0 33 | failed=0 34 | for suite in $SUITES; do 35 | echo "Suite: $suite" 36 | if $suites_srcdir/$suite/run $suite; then 37 | passed=`expr $passed + 1` 38 | else 39 | failed=`expr $failed + 1` 40 | [ $STOP -eq 1 ] && break 41 | fi 42 | done 43 | 44 | if [ $failed -gt 0 ]; then 45 | echo "$failed of `expr $passed + $failed` test suites failed" 46 | exit 1 47 | else 48 | echo "$passed test suites passed" 49 | rm -rf $logdir 50 | fi 51 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/CoverallsClear.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Permission is hereby granted, free of charge, to any person obtaining a copy 3 | # of this software and associated documentation files (the "Software"), to deal 4 | # in the Software without restriction, including without limitation the rights 5 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | # copies of the Software, and to permit persons to whom the Software is 7 | # furnished to do so, subject to the following conditions: 8 | # 9 | # The above copyright notice and this permission notice shall be included in all 10 | # copies or substantial portions of the Software. 11 | # 12 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | # SOFTWARE. 19 | # 20 | # Copyright (C) 2014 Joakim Söderberg 21 | # 22 | 23 | file(REMOVE_RECURSE ${PROJECT_BINARY_DIR}/*.gcda) 24 | 25 | -------------------------------------------------------------------------------- /arg-nonnull.h: -------------------------------------------------------------------------------- 1 | /* A C macro for declaring that specific arguments must not be NULL. 2 | Copyright (C) 2009-2011 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify it 5 | under the terms of the GNU General Public License as published 6 | by the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools 18 | that the values passed as arguments n, ..., m must be non-NULL pointers. 19 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ 20 | #ifndef _GL_ARG_NONNULL 21 | # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 22 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 23 | # else 24 | # define _GL_ARG_NONNULL(params) 25 | # endif 26 | #endif 27 | -------------------------------------------------------------------------------- /submodules/jansson/doc/index.rst: -------------------------------------------------------------------------------- 1 | Jansson Documentation 2 | ===================== 3 | 4 | This is the documentation for Jansson_ |release|, last updated |today|. 5 | 6 | Introduction 7 | ------------ 8 | 9 | Jansson_ is a C library for encoding, decoding and manipulating JSON 10 | data. Its main features and design principles are: 11 | 12 | - Simple and intuitive API and data model 13 | 14 | - Comprehensive documentation 15 | 16 | - No dependencies on other libraries 17 | 18 | - Full Unicode support (UTF-8) 19 | 20 | - Extensive test suite 21 | 22 | Jansson is licensed under the `MIT license`_; see LICENSE in the 23 | source distribution for details. 24 | 25 | Jansson is used in production and its API is stable. It works on 26 | numerous platforms, including numerous Unix like systems and Windows. 27 | It's suitable for use on any system, including desktop, server, and 28 | small embedded systems. 29 | 30 | 31 | .. _`MIT license`: http://www.opensource.org/licenses/mit-license.php 32 | .. _Jansson: http://www.digip.org/jansson/ 33 | 34 | Contents 35 | -------- 36 | 37 | .. toctree:: 38 | :maxdepth: 2 39 | 40 | gettingstarted 41 | upgrading 42 | tutorial 43 | conformance 44 | portability 45 | apiref 46 | changes 47 | 48 | 49 | Indices and Tables 50 | ================== 51 | 52 | * :ref:`genindex` 53 | * :ref:`search` 54 | -------------------------------------------------------------------------------- /doc/coding.md: -------------------------------------------------------------------------------- 1 | Coding style 2 | ==================== 3 | 4 | - K&R Stroustrup variant 5 | - 2 space indenting, no tabs 6 | - Each function has its opening brace at the next line on the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. The blocks inside a function, however, have their opening braces at the same line as their respective control statements; closing braces remain in a line of their own. 7 | - Else is on the same indentation level as its accompanying ```if``` statement at a line of its own. 8 | - Curly brackets even for one-line blocks 9 | - No extra spaces inside parenthesis; please don't do ```( this )``` 10 | - No space after function names, one space after ```if```, ```for``` and ```while``` 11 | 12 | ```c++ 13 | int main(int argc, char *argv[]) 14 | { 15 | ... 16 | while (x == y) { 17 | something(); 18 | somethingelse(); 19 | 20 | if (some_error) { 21 | do_correct(); 22 | } 23 | else { 24 | continue_as_usual(); 25 | return false; 26 | } 27 | } 28 | 29 | finalthing(); 30 | ... 31 | } 32 | ``` 33 | 34 | A-Style example command line: 35 | ``` 36 | --style=stroustrup --indent=spaces=2 --break-closing-brackets --add-brackets --convert-tabs --mode=c 37 | ``` 38 | -------------------------------------------------------------------------------- /winbuild/jansson/jansson_private_config.h: -------------------------------------------------------------------------------- 1 | /* #undef HAVE_ENDIAN_H */ 2 | #define HAVE_FCNTL_H 1 3 | /* #undef HAVE_SCHED_H */ 4 | /* #undef HAVE_UNISTD_H */ 5 | /* #undef HAVE_SYS_PARAM_H */ 6 | #define HAVE_SYS_STAT_H 1 7 | /* #undef HAVE_SYS_TIME_H */ 8 | /* #undef HAVE_SYS_TYPES_H */ 9 | #define HAVE_STDINT_H 1 10 | 11 | #define HAVE_CLOSE 1 12 | #define HAVE_GETPID 1 13 | /* #undef HAVE_GETTIMEOFDAY */ 14 | #define HAVE_OPEN 1 15 | #define HAVE_READ 1 16 | /* #undef HAVE_SCHED_YIELD */ 17 | 18 | /* #undef HAVE_SYNC_BUILTINS */ 19 | /* #undef HAVE_ATOMIC_BUILTINS */ 20 | 21 | #define HAVE_LOCALE_H 1 22 | /* #undef HAVE_SETLOCALE */ 23 | 24 | #define HAVE_INT32_T 1 25 | #ifndef HAVE_INT32_T 26 | # define int32_t int32_t 27 | #endif 28 | 29 | #define HAVE_UINT32_T 1 30 | #ifndef HAVE_UINT32_T 31 | # define uint32_t uint32_t 32 | #endif 33 | 34 | #define HAVE_UINT16_T 1 35 | #ifndef HAVE_UINT16_T 36 | # define uint16_t uint16_t 37 | #endif 38 | 39 | #define HAVE_UINT8_T 1 40 | #ifndef HAVE_UINT8_T 41 | # define uint8_t uint8_t 42 | #endif 43 | 44 | /* #undef HAVE_SSIZE_T */ 45 | 46 | #ifndef HAVE_SSIZE_T 47 | # define ssize_t int 48 | #endif 49 | 50 | /* #undef HAVE_SNPRINTF */ 51 | 52 | #ifndef HAVE_SNPRINTF 53 | # define snprintf _snprintf 54 | #endif 55 | 56 | /* #undef HAVE_VSNPRINTF */ 57 | 58 | #define USE_URANDOM 1 59 | #define USE_WINDOWS_CRYPTOAPI 1 60 | -------------------------------------------------------------------------------- /winbuild/dist/include/jansson_private_config.h: -------------------------------------------------------------------------------- 1 | /* #undef HAVE_ENDIAN_H */ 2 | #define HAVE_FCNTL_H 1 3 | /* #undef HAVE_SCHED_H */ 4 | /* #undef HAVE_UNISTD_H */ 5 | /* #undef HAVE_SYS_PARAM_H */ 6 | #define HAVE_SYS_STAT_H 1 7 | /* #undef HAVE_SYS_TIME_H */ 8 | /* #undef HAVE_SYS_TYPES_H */ 9 | #define HAVE_STDINT_H 1 10 | 11 | #define HAVE_CLOSE 1 12 | #define HAVE_GETPID 1 13 | /* #undef HAVE_GETTIMEOFDAY */ 14 | #define HAVE_OPEN 1 15 | #define HAVE_READ 1 16 | /* #undef HAVE_SCHED_YIELD */ 17 | 18 | /* #undef HAVE_SYNC_BUILTINS */ 19 | /* #undef HAVE_ATOMIC_BUILTINS */ 20 | 21 | #define HAVE_LOCALE_H 1 22 | /* #undef HAVE_SETLOCALE */ 23 | 24 | #define HAVE_INT32_T 1 25 | #ifndef HAVE_INT32_T 26 | # define int32_t int32_t 27 | #endif 28 | 29 | #define HAVE_UINT32_T 1 30 | #ifndef HAVE_UINT32_T 31 | # define uint32_t uint32_t 32 | #endif 33 | 34 | #define HAVE_UINT16_T 1 35 | #ifndef HAVE_UINT16_T 36 | # define uint16_t uint16_t 37 | #endif 38 | 39 | #define HAVE_UINT8_T 1 40 | #ifndef HAVE_UINT8_T 41 | # define uint8_t uint8_t 42 | #endif 43 | 44 | /* #undef HAVE_SSIZE_T */ 45 | 46 | #ifndef HAVE_SSIZE_T 47 | # define ssize_t int 48 | #endif 49 | 50 | /* #undef HAVE_SNPRINTF */ 51 | 52 | #ifndef HAVE_SNPRINTF 53 | # define snprintf _snprintf 54 | #endif 55 | 56 | /* #undef HAVE_VSNPRINTF */ 57 | 58 | #define USE_URANDOM 1 59 | #define USE_WINDOWS_CRYPTOAPI 1 60 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* const args in callbacks should be OK. */ 5 | 6 | static void _register_callback(void (*cb)(void *arg), void *arg) 7 | { 8 | } 9 | 10 | #define register_callback(cb, arg) \ 11 | _register_callback(typesafe_cb(void, void *, (cb), (arg)), (arg)) 12 | 13 | static void _register_callback_pre(void (*cb)(int x, void *arg), void *arg) 14 | { 15 | } 16 | 17 | #define register_callback_pre(cb, arg) \ 18 | _register_callback_pre(typesafe_cb_preargs(void, void *, (cb), (arg), int), (arg)) 19 | 20 | static void _register_callback_post(void (*cb)(void *arg, int x), void *arg) 21 | { 22 | } 23 | 24 | #define register_callback_post(cb, arg) \ 25 | _register_callback_post(typesafe_cb_postargs(void, void *, (cb), (arg), int), (arg)) 26 | 27 | struct undefined; 28 | 29 | static void my_callback(struct undefined *undef) 30 | { 31 | } 32 | 33 | static void my_callback_pre(int x, struct undefined *undef) 34 | { 35 | } 36 | 37 | static void my_callback_post(struct undefined *undef, int x) 38 | { 39 | } 40 | 41 | int main(int argc, char *argv[]) 42 | { 43 | struct undefined *handle = NULL; 44 | 45 | register_callback(my_callback, handle); 46 | register_callback_pre(my_callback_pre, handle); 47 | register_callback_post(my_callback_post, handle); 48 | return 0; 49 | } 50 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/valid/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2016 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | JSON_SORT_KEYS=1 9 | export JSON_SORT_KEYS 10 | 11 | is_test() { 12 | test -d $test_path 13 | } 14 | 15 | do_run() { 16 | variant=$1 17 | s=".$1" 18 | 19 | strip=0 20 | [ "$variant" = "strip" ] && strip=1 21 | 22 | STRIP=$strip $json_process --env \ 23 | <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s 24 | valgrind_check $test_log/stderr$s || return 1 25 | 26 | ref=output 27 | [ -f $test_path/output$s ] && ref=output$s 28 | 29 | if ! cmp -s $test_path/$ref $test_log/stdout$s; then 30 | echo $variant > $test_log/variant 31 | return 1 32 | fi 33 | } 34 | 35 | run_test() { 36 | do_run normal && do_run strip 37 | } 38 | 39 | show_error() { 40 | valgrind_show_error && return 41 | 42 | read variant < $test_log/variant 43 | s=".$variant" 44 | 45 | echo "VARIANT: $variant" 46 | 47 | echo "EXPECTED OUTPUT:" 48 | ref=output 49 | [ -f $test_path/output$s ] && ref=output$s 50 | nl -bn $test_path/$ref 51 | 52 | echo "ACTUAL OUTPUT:" 53 | nl -bn $test_log/stdout$s 54 | } 55 | 56 | . $top_srcdir/test/scripts/run-tests.sh 57 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/jansson_private_config.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine HAVE_ENDIAN_H 1 2 | #cmakedefine HAVE_FCNTL_H 1 3 | #cmakedefine HAVE_SCHED_H 1 4 | #cmakedefine HAVE_UNISTD_H 1 5 | #cmakedefine HAVE_SYS_PARAM_H 1 6 | #cmakedefine HAVE_SYS_STAT_H 1 7 | #cmakedefine HAVE_SYS_TIME_H 1 8 | #cmakedefine HAVE_SYS_TYPES_H 1 9 | #cmakedefine HAVE_STDINT_H 1 10 | 11 | #cmakedefine HAVE_CLOSE 1 12 | #cmakedefine HAVE_GETPID 1 13 | #cmakedefine HAVE_GETTIMEOFDAY 1 14 | #cmakedefine HAVE_OPEN 1 15 | #cmakedefine HAVE_READ 1 16 | #cmakedefine HAVE_SCHED_YIELD 1 17 | 18 | #cmakedefine HAVE_SYNC_BUILTINS 1 19 | #cmakedefine HAVE_ATOMIC_BUILTINS 1 20 | 21 | #cmakedefine HAVE_LOCALE_H 1 22 | #cmakedefine HAVE_SETLOCALE 1 23 | 24 | #cmakedefine HAVE_INT32_T 1 25 | #ifndef HAVE_INT32_T 26 | # define int32_t @JSON_INT32@ 27 | #endif 28 | 29 | #cmakedefine HAVE_UINT32_T 1 30 | #ifndef HAVE_UINT32_T 31 | # define uint32_t @JSON_UINT32@ 32 | #endif 33 | 34 | #cmakedefine HAVE_UINT16_T 1 35 | #ifndef HAVE_UINT16_T 36 | # define uint16_t @JSON_UINT16@ 37 | #endif 38 | 39 | #cmakedefine HAVE_UINT8_T 1 40 | #ifndef HAVE_UINT8_T 41 | # define uint8_t @JSON_UINT8@ 42 | #endif 43 | 44 | #cmakedefine HAVE_SSIZE_T 1 45 | 46 | #ifndef HAVE_SSIZE_T 47 | # define ssize_t @JSON_SSIZE@ 48 | #endif 49 | 50 | #cmakedefine USE_URANDOM 1 51 | #cmakedefine USE_WINDOWS_CRYPTOAPI 1 52 | 53 | #define INITIAL_HASHTABLE_ORDER @JANSSON_INITIAL_HASHTABLE_ORDER@ 54 | -------------------------------------------------------------------------------- /submodules/jansson/.travis.yml: -------------------------------------------------------------------------------- 1 | env: 2 | matrix: 3 | - JANSSON_BUILD_METHOD=cmake JANSSON_CMAKE_OPTIONS="-DJANSSON_TEST_WITH_VALGRIND=ON" JANSSON_EXTRA_INSTALL="valgrind" 4 | - JANSSON_BUILD_METHOD=autotools 5 | - JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" 6 | language: c 7 | compiler: 8 | - gcc 9 | - clang 10 | matrix: 11 | exclude: 12 | - compiler: clang 13 | env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" 14 | allow_failures: 15 | - env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" 16 | install: 17 | - sudo apt-get update -qq 18 | - sudo apt-get install -y -qq cmake $JANSSON_EXTRA_INSTALL 19 | script: 20 | - if [ "$JANSSON_BUILD_METHOD" = "autotools" ]; then autoreconf -f -i && CFLAGS=-Werror ./configure && make check; fi 21 | - if [ "$JANSSON_BUILD_METHOD" = "cmake" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && ctest --output-on-failure; fi 22 | - if [ "$JANSSON_BUILD_METHOD" = "coverage" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && cmake --build . --target coveralls; fi 23 | -------------------------------------------------------------------------------- /m4/sigaction.m4: -------------------------------------------------------------------------------- 1 | # sigaction.m4 serial 6 2 | dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Determine if sigaction interface is present. 8 | AC_DEFUN([gl_SIGACTION], 9 | [ 10 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 11 | AC_CHECK_FUNCS_ONCE([sigaction]) 12 | if test $ac_cv_func_sigaction = yes; then 13 | AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , 14 | [[#include ]]) 15 | if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then 16 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 17 | fi 18 | else 19 | HAVE_SIGACTION=0 20 | fi 21 | ]) 22 | 23 | # Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. 24 | AC_DEFUN([gl_PREREQ_SIGACTION], 25 | [ 26 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 27 | AC_REQUIRE([AC_C_RESTRICT]) 28 | AC_REQUIRE([AC_TYPE_UID_T]) 29 | AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) 30 | AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) 31 | AC_CHECK_TYPES([siginfo_t], [], [], [[ 32 | #include 33 | ]]) 34 | if test $ac_cv_type_siginfo_t = no; then 35 | HAVE_SIGINFO_T=0 36 | fi 37 | ]) 38 | 39 | # Prerequisites of lib/sig-handler.h. 40 | AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], 41 | [ 42 | AC_REQUIRE([AC_C_INLINE]) 43 | ]) 44 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/invalid/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2009-2016 Petri Lehtinen 4 | # 5 | # Jansson is free software; you can redistribute it and/or modify 6 | # it under the terms of the MIT license. See LICENSE for details. 7 | 8 | is_test() { 9 | test -d $test_path 10 | } 11 | 12 | do_run() { 13 | variant=$1 14 | s=".$1" 15 | 16 | strip=0 17 | if [ "$variant" = "strip" ]; then 18 | # This test should not be stripped 19 | [ -f $test_path/nostrip ] && return 20 | strip=1 21 | fi 22 | 23 | STRIP=$strip $json_process --env \ 24 | <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s 25 | valgrind_check $test_log/stderr$s || return 1 26 | 27 | ref=error 28 | [ -f $test_path/error$s ] && ref=error$s 29 | 30 | if ! cmp -s $test_path/$ref $test_log/stderr$s; then 31 | echo $variant > $test_log/variant 32 | return 1 33 | fi 34 | } 35 | 36 | run_test() { 37 | do_run normal && do_run strip 38 | } 39 | 40 | show_error() { 41 | valgrind_show_error && return 42 | 43 | read variant < $test_log/variant 44 | s=".$variant" 45 | 46 | echo "VARIANT: $variant" 47 | 48 | echo "EXPECTED ERROR:" 49 | ref=error 50 | [ -f $test_path/error$s ] && ref=error$s 51 | nl -bn $test_path/$ref 52 | 53 | echo "ACTUAL ERROR:" 54 | nl -bn $test_log/stderr$s 55 | } 56 | 57 | . $top_srcdir/test/scripts/run-tests.sh 58 | -------------------------------------------------------------------------------- /m4/00gnulib.m4: -------------------------------------------------------------------------------- 1 | # 00gnulib.m4 serial 2 2 | dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl This file must be named something that sorts before all other 8 | dnl gnulib-provided .m4 files. It is needed until such time as we can 9 | dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. 10 | 11 | # AC_DEFUN_ONCE([NAME], VALUE) 12 | # ---------------------------- 13 | # Define NAME to expand to VALUE on the first use (whether by direct 14 | # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. 15 | # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This 16 | # definition is slower than the version in Autoconf 2.64, because it 17 | # can only use interfaces that existed since 2.59; but it achieves the 18 | # same effect. Quoting is necessary to avoid confusing Automake. 19 | m4_version_prereq([2.63.263], [], 20 | [m4_define([AC][_DEFUN_ONCE], 21 | [AC][_DEFUN([$1], 22 | [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], 23 | [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl 24 | [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) 25 | 26 | # gl_00GNULIB 27 | # ----------- 28 | # Witness macro that this file has been included. Needed to force 29 | # Automake to include this file prior to all other gnulib .m4 files. 30 | AC_DEFUN([gl_00GNULIB]) 31 | -------------------------------------------------------------------------------- /m4/gnulib-cache.m4: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2002-2011 Free Software Foundation, Inc. 2 | # 3 | # This file is free software, distributed under the terms of the GNU 4 | # General Public License. As a special exception to the GNU General 5 | # Public License, this file may be distributed as part of a program 6 | # that contains a configuration script generated by Autoconf, under 7 | # the same distribution terms as the rest of that program. 8 | # 9 | # Generated by gnulib-tool. 10 | # 11 | # This file represents the specification of how gnulib-tool is used. 12 | # It acts as a cache: It is written and read by gnulib-tool. 13 | # In projects that use version control, this file is meant to be put under 14 | # version control, like the configure.ac and various Makefile.am files. 15 | 16 | 17 | # Specification in the form of a command-line invocation: 18 | # gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files memmem sigaction signal 19 | 20 | # Specification in the form of a few gnulib-tool.m4 macro invocations: 21 | gl_LOCAL_DIR([]) 22 | gl_MODULES([ 23 | memmem 24 | sigaction 25 | signal 26 | ]) 27 | gl_AVOID([]) 28 | gl_SOURCE_BASE([lib]) 29 | gl_M4_BASE([m4]) 30 | gl_PO_BASE([]) 31 | gl_DOC_BASE([doc]) 32 | gl_TESTS_BASE([tests]) 33 | gl_LIB([libgnu]) 34 | gl_MAKEFILE_NAME([]) 35 | gl_MACRO_PREFIX([gl]) 36 | gl_PO_DOMAIN([]) 37 | gl_WITNESS_C_DOMAIN([]) 38 | gl_VC_FILES([false]) 39 | -------------------------------------------------------------------------------- /ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* const args in callbacks should be OK. */ 5 | 6 | static void _register_callback(void (*cb)(void *arg), void *arg) 7 | { 8 | } 9 | 10 | #define register_callback(cb, arg) \ 11 | _register_callback(typesafe_cb(void, void *, (cb), (arg)), (arg)) 12 | 13 | static void _register_callback_pre(void (*cb)(int x, void *arg), void *arg) 14 | { 15 | } 16 | 17 | #define register_callback_pre(cb, arg) \ 18 | _register_callback_pre(typesafe_cb_preargs(void, void *, (cb), (arg), int), (arg)) 19 | 20 | static void _register_callback_post(void (*cb)(void *arg, int x), void *arg) 21 | { 22 | } 23 | 24 | #define register_callback_post(cb, arg) \ 25 | _register_callback_post(typesafe_cb_postargs(void, void *, (cb), (arg), int), (arg)) 26 | 27 | struct undefined; 28 | 29 | static void my_callback(struct undefined *undef) 30 | { 31 | } 32 | 33 | static void my_callback_pre(int x, struct undefined *undef) 34 | { 35 | } 36 | 37 | static void my_callback_post(struct undefined *undef, int x) 38 | { 39 | } 40 | 41 | int main(int argc, char *argv[]) 42 | { 43 | struct undefined *handle = NULL; 44 | void (*cb)(struct undefined *undef) = my_callback; 45 | void (*pre)(int x, struct undefined *undef) = my_callback_pre; 46 | void (*post)(struct undefined *undef, int x) = my_callback_post; 47 | 48 | register_callback(cb, handle); 49 | register_callback_pre(pre, handle); 50 | register_callback_post(post, handle); 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /submodules/jansson/android/jansson_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The configure script copies this file to jansson_config.h and 13 | * replaces @var@ substitutions by values that fit your system. If you 14 | * cannot run the configure script, you can do the value substitution 15 | * by hand. 16 | */ 17 | 18 | #ifndef JANSSON_CONFIG_H 19 | #define JANSSON_CONFIG_H 20 | 21 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 22 | defined to `inline', otherwise empty. In C++, the inline is always 23 | supported. */ 24 | #ifdef __cplusplus 25 | #define JSON_INLINE inline 26 | #else 27 | #define JSON_INLINE inline 28 | #endif 29 | 30 | /* If your compiler supports the `long long` type and the strtoll() 31 | library function, JSON_INTEGER_IS_LONG_LONG is defined to 1, 32 | otherwise to 0. */ 33 | #define JSON_INTEGER_IS_LONG_LONG 1 34 | 35 | /* If locale.h and localeconv() are available, define to 1, 36 | otherwise to 0. */ 37 | #define JSON_HAVE_LOCALECONV 0 38 | 39 | /* Maximum recursion depth for parsing JSON input. 40 | This limits the depth of e.g. array-within-array constructions. */ 41 | #define JSON_PARSER_MAX_DEPTH 2048 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /api-example.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright 2013 Setkeh Mkfr 4 | # 5 | # This program is free software; you can redistribute it and/or modify it under 6 | # the terms of the GNU General Public License as published by the Free Software 7 | # Foundation; either version 3 of the License, or (at your option) any later 8 | # version. See COPYING for more details. 9 | 10 | #Short Python Example for connecting to The sgminer API 11 | #Written By: setkeh 12 | #Thanks to Jezzz for all his Support. 13 | #NOTE: When adding a param with a pipe | in bash or ZSH you must wrap the arg in quotes 14 | #E.G "pga|0" 15 | 16 | import socket 17 | import json 18 | import sys 19 | 20 | def linesplit(socket): 21 | buffer = socket.recv(4096) 22 | done = False 23 | while not done: 24 | more = socket.recv(4096) 25 | if not more: 26 | done = True 27 | else: 28 | buffer = buffer+more 29 | if buffer: 30 | return buffer 31 | 32 | api_command = sys.argv[1].split('|') 33 | 34 | if len(sys.argv) < 3: 35 | api_ip = '127.0.0.1' 36 | api_port = 4028 37 | else: 38 | api_ip = sys.argv[2] 39 | api_port = sys.argv[3] 40 | 41 | s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 42 | s.connect((api_ip,int(api_port))) 43 | if len(api_command) == 2: 44 | s.send(json.dumps({"command":api_command[0],"parameter":api_command[1]})) 45 | else: 46 | s.send(json.dumps({"command":api_command[0]})) 47 | 48 | response = linesplit(s) 49 | response = response.replace('\x00','') 50 | response = json.loads(response) 51 | print response 52 | s.close() 53 | -------------------------------------------------------------------------------- /doc/BUGS.md: -------------------------------------------------------------------------------- 1 | # Bug reporting 2 | 3 | First and foremost, see `README.md` and other documentation in `doc`. 4 | Although the documentation might be outdated, a lot of it is still 5 | relevant. 6 | 7 | The [issue tracker](https://github.com/veox/sgminer/issues) is there 8 | specifically for reporting bugs, issues and proposed improvements. Other 9 | communication channels are not necessarily monitored. 10 | 11 | Search the issue list to see if it has already been reported. 12 | 13 | Make the title of your report informative. 14 | 15 | Information that may be relevant, depending on the nature of your issue: 16 | 17 | * OS version; 18 | * Catalyst driver version; 19 | * AMD APP SDK version; 20 | * AMD ADL version; 21 | * GPUs used (`sgminer --ndevs`); 22 | * whether you're using a pre-compiled binary or built from source; 23 | * `sgminer` version (`sgminer --version` and/or `git describe`); 24 | * contents of the configuration file and pool connection info; 25 | * launch procedure (manual or via script); 26 | * steps to repeat; 27 | * expected result; 28 | * actual result; 29 | * debug output (`sgminer --text-only --debug --verbose`). 30 | 31 | Be careful when posting the contents of your configuration file: although 32 | pool connection and protocol information is relevant in a certain sub-class 33 | of issues, login credentials (username and password) are most often not. Run 34 | with `--incognito` if possible. 35 | 36 | If there is a need to provide more than a screenfull of log 37 | data, it is preferred that a link is given instead. Try 38 | [gist](https://gist.github.com). 39 | -------------------------------------------------------------------------------- /submodules/jansson/src/jansson_config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The configure script copies this file to jansson_config.h and 13 | * replaces @var@ substitutions by values that fit your system. If you 14 | * cannot run the configure script, you can do the value substitution 15 | * by hand. 16 | */ 17 | 18 | #ifndef JANSSON_CONFIG_H 19 | #define JANSSON_CONFIG_H 20 | 21 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 22 | defined to `inline', otherwise empty. In C++, the inline is always 23 | supported. */ 24 | #ifdef __cplusplus 25 | #define JSON_INLINE inline 26 | #else 27 | #define JSON_INLINE @json_inline@ 28 | #endif 29 | 30 | /* If your compiler supports the `long long` type and the strtoll() 31 | library function, JSON_INTEGER_IS_LONG_LONG is defined to 1, 32 | otherwise to 0. */ 33 | #define JSON_INTEGER_IS_LONG_LONG @json_have_long_long@ 34 | 35 | /* If locale.h and localeconv() are available, define to 1, 36 | otherwise to 0. */ 37 | #define JSON_HAVE_LOCALECONV @json_have_localeconv@ 38 | 39 | /* Maximum recursion depth for parsing JSON input. 40 | This limits the depth of e.g. array-within-array constructions. */ 41 | #define JSON_PARSER_MAX_DEPTH 2048 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /m4/signalblocking.m4: -------------------------------------------------------------------------------- 1 | # signalblocking.m4 serial 11 2 | dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Determine available signal blocking primitives. Three different APIs exist: 8 | # 1) POSIX: sigemptyset, sigaddset, sigprocmask 9 | # 2) SYSV: sighold, sigrelse 10 | # 3) BSD: sigblock, sigsetmask 11 | # For simplicity, here we check only for the POSIX signal blocking. 12 | AC_DEFUN([gl_SIGNALBLOCKING], 13 | [ 14 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 15 | signals_not_posix= 16 | AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1]) 17 | if test -z "$signals_not_posix"; then 18 | AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) 19 | fi 20 | if test -z "$gl_cv_func_sigprocmask"; then 21 | HAVE_POSIX_SIGNALBLOCKING=0 22 | fi 23 | ]) 24 | 25 | # Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c. 26 | AC_DEFUN([gl_PREREQ_SIGPROCMASK], 27 | [ 28 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 29 | AC_CHECK_TYPES([sigset_t], 30 | [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], 31 | [#include 32 | /* Mingw defines sigset_t not in , but in . */ 33 | #include ]) 34 | if test $gl_cv_type_sigset_t != yes; then 35 | HAVE_SIGSET_T=0 36 | fi 37 | dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has 38 | dnl the sigset_t type. 39 | AC_SUBST([HAVE_SIGSET_T]) 40 | ]) 41 | -------------------------------------------------------------------------------- /ccan/opt/test/run-correct-reporting.c: -------------------------------------------------------------------------------- 1 | /* Make sure when multiple equivalent options, correct one is used for errors */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "utils.h" 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | plan_tests(12); 14 | 15 | /* --aaa without args. */ 16 | opt_register_arg("-a|--aaa", test_arg, NULL, "aaa", ""); 17 | ok1(!parse_args(&argc, &argv, "--aaa", NULL)); 18 | ok1(strstr(err_output, ": --aaa: requires an argument")); 19 | free(err_output); 20 | err_output = NULL; 21 | ok1(!parse_args(&argc, &argv, "-a", NULL)); 22 | ok1(strstr(err_output, ": -a: requires an argument")); 23 | free(err_output); 24 | err_output = NULL; 25 | 26 | /* Multiple */ 27 | opt_register_arg("--bbb|-b|-c|--ccc", test_arg, NULL, "aaa", ""); 28 | ok1(!parse_args(&argc, &argv, "--bbb", NULL)); 29 | ok1(strstr(err_output, ": --bbb: requires an argument")); 30 | free(err_output); 31 | err_output = NULL; 32 | ok1(!parse_args(&argc, &argv, "-b", NULL)); 33 | ok1(strstr(err_output, ": -b: requires an argument")); 34 | free(err_output); 35 | err_output = NULL; 36 | ok1(!parse_args(&argc, &argv, "-c", NULL)); 37 | ok1(strstr(err_output, ": -c: requires an argument")); 38 | free(err_output); 39 | err_output = NULL; 40 | ok1(!parse_args(&argc, &argv, "--ccc", NULL)); 41 | ok1(strstr(err_output, ": --ccc: requires an argument")); 42 | free(err_output); 43 | err_output = NULL; 44 | 45 | /* parse_args allocates argv */ 46 | free(argv); 47 | return exit_status(); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /submodules/jansson/src/memory.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * Copyright (c) 2011-2012 Basile Starynkevitch 4 | * 5 | * Jansson is free software; you can redistribute it and/or modify it 6 | * under the terms of the MIT license. See LICENSE for details. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | #include "jansson.h" 13 | #include "jansson_private.h" 14 | 15 | /* C89 allows these to be macros */ 16 | #undef malloc 17 | #undef free 18 | 19 | /* memory function pointers */ 20 | static json_malloc_t do_malloc = malloc; 21 | static json_free_t do_free = free; 22 | 23 | void *jsonp_malloc(size_t size) 24 | { 25 | if(!size) 26 | return NULL; 27 | 28 | return (*do_malloc)(size); 29 | } 30 | 31 | void jsonp_free(void *ptr) 32 | { 33 | if(!ptr) 34 | return; 35 | 36 | (*do_free)(ptr); 37 | } 38 | 39 | char *jsonp_strdup(const char *str) 40 | { 41 | return jsonp_strndup(str, strlen(str)); 42 | } 43 | 44 | char *jsonp_strndup(const char *str, size_t len) 45 | { 46 | char *new_str; 47 | 48 | new_str = jsonp_malloc(len + 1); 49 | if(!new_str) 50 | return NULL; 51 | 52 | memcpy(new_str, str, len); 53 | new_str[len] = '\0'; 54 | return new_str; 55 | } 56 | 57 | void json_set_alloc_funcs(json_malloc_t malloc_fn, json_free_t free_fn) 58 | { 59 | do_malloc = malloc_fn; 60 | do_free = free_fn; 61 | } 62 | 63 | void json_get_alloc_funcs(json_malloc_t *malloc_fn, json_free_t *free_fn) 64 | { 65 | if (malloc_fn) 66 | *malloc_fn = do_malloc; 67 | if (free_fn) 68 | *free_fn = do_free; 69 | } 70 | -------------------------------------------------------------------------------- /m4/gnulib-tool.m4: -------------------------------------------------------------------------------- 1 | # gnulib-tool.m4 serial 2 2 | dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl The following macros need not be invoked explicitly. 8 | dnl Invoking them does nothing except to declare default arguments 9 | dnl for "gnulib-tool --import". 10 | 11 | dnl Usage: gl_LOCAL_DIR([DIR]) 12 | AC_DEFUN([gl_LOCAL_DIR], []) 13 | 14 | dnl Usage: gl_MODULES([module1 module2 ...]) 15 | AC_DEFUN([gl_MODULES], []) 16 | 17 | dnl Usage: gl_AVOID([module1 module2 ...]) 18 | AC_DEFUN([gl_AVOID], []) 19 | 20 | dnl Usage: gl_SOURCE_BASE([DIR]) 21 | AC_DEFUN([gl_SOURCE_BASE], []) 22 | 23 | dnl Usage: gl_M4_BASE([DIR]) 24 | AC_DEFUN([gl_M4_BASE], []) 25 | 26 | dnl Usage: gl_PO_BASE([DIR]) 27 | AC_DEFUN([gl_PO_BASE], []) 28 | 29 | dnl Usage: gl_DOC_BASE([DIR]) 30 | AC_DEFUN([gl_DOC_BASE], []) 31 | 32 | dnl Usage: gl_TESTS_BASE([DIR]) 33 | AC_DEFUN([gl_TESTS_BASE], []) 34 | 35 | dnl Usage: gl_WITH_TESTS 36 | AC_DEFUN([gl_WITH_TESTS], []) 37 | 38 | dnl Usage: gl_LIB([LIBNAME]) 39 | AC_DEFUN([gl_LIB], []) 40 | 41 | dnl Usage: gl_LGPL or gl_LGPL([VERSION]) 42 | AC_DEFUN([gl_LGPL], []) 43 | 44 | dnl Usage: gl_MAKEFILE_NAME([FILENAME]) 45 | AC_DEFUN([gl_MAKEFILE_NAME], []) 46 | 47 | dnl Usage: gl_LIBTOOL 48 | AC_DEFUN([gl_LIBTOOL], []) 49 | 50 | dnl Usage: gl_MACRO_PREFIX([PREFIX]) 51 | AC_DEFUN([gl_MACRO_PREFIX], []) 52 | 53 | dnl Usage: gl_PO_DOMAIN([DOMAIN]) 54 | AC_DEFUN([gl_PO_DOMAIN], []) 55 | 56 | dnl Usage: gl_VC_FILES([BOOLEAN]) 57 | AC_DEFUN([gl_VC_FILES], []) 58 | -------------------------------------------------------------------------------- /m4/stddef_h.m4: -------------------------------------------------------------------------------- 1 | dnl A placeholder for POSIX 2008 , for platforms that have issues. 2 | # stddef_h.m4 serial 4 3 | dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | 8 | AC_DEFUN([gl_STDDEF_H], 9 | [ 10 | AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) 11 | AC_REQUIRE([gt_TYPE_WCHAR_T]) 12 | STDDEF_H= 13 | if test $gt_cv_c_wchar_t = no; then 14 | HAVE_WCHAR_T=0 15 | STDDEF_H=stddef.h 16 | fi 17 | AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], 18 | [gl_cv_decl_null_works], 19 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include 20 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; 21 | ]])], 22 | [gl_cv_decl_null_works=yes], 23 | [gl_cv_decl_null_works=no])]) 24 | if test $gl_cv_decl_null_works = no; then 25 | REPLACE_NULL=1 26 | STDDEF_H=stddef.h 27 | fi 28 | AC_SUBST([STDDEF_H]) 29 | AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) 30 | if test -n "$STDDEF_H"; then 31 | gl_NEXT_HEADERS([stddef.h]) 32 | fi 33 | ]) 34 | 35 | AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], 36 | [ 37 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 38 | AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) 39 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) 40 | ]) 41 | 42 | AC_DEFUN([gl_STDDEF_H_DEFAULTS], 43 | [ 44 | dnl Assume proper GNU behavior unless another module says otherwise. 45 | REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) 46 | HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) 47 | ]) 48 | -------------------------------------------------------------------------------- /submodules/jansson/src/jansson.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | json_delete 3 | json_true 4 | json_false 5 | json_null 6 | json_string 7 | json_stringn 8 | json_string_nocheck 9 | json_stringn_nocheck 10 | json_string_value 11 | json_string_length 12 | json_string_set 13 | json_string_setn 14 | json_string_set_nocheck 15 | json_string_setn_nocheck 16 | json_integer 17 | json_integer_value 18 | json_integer_set 19 | json_real 20 | json_real_value 21 | json_real_set 22 | json_number_value 23 | json_array 24 | json_array_size 25 | json_array_get 26 | json_array_set_new 27 | json_array_append_new 28 | json_array_insert_new 29 | json_array_remove 30 | json_array_clear 31 | json_array_extend 32 | json_object 33 | json_object_size 34 | json_object_get 35 | json_object_set_new 36 | json_object_set_new_nocheck 37 | json_object_del 38 | json_object_clear 39 | json_object_update 40 | json_object_update_existing 41 | json_object_update_missing 42 | json_object_iter 43 | json_object_iter_at 44 | json_object_iter_next 45 | json_object_iter_key 46 | json_object_iter_value 47 | json_object_iter_set_new 48 | json_object_key_to_iter 49 | json_object_seed 50 | json_dumps 51 | json_dumpb 52 | json_dumpf 53 | json_dumpfd 54 | json_dump_file 55 | json_dump_callback 56 | json_loads 57 | json_loadb 58 | json_loadf 59 | json_loadfd 60 | json_load_file 61 | json_load_callback 62 | json_equal 63 | json_copy 64 | json_deep_copy 65 | json_pack 66 | json_pack_ex 67 | json_vpack_ex 68 | json_unpack 69 | json_unpack_ex 70 | json_vunpack_ex 71 | json_set_alloc_funcs 72 | json_get_alloc_funcs 73 | 74 | -------------------------------------------------------------------------------- /ccan/compiler/_info: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "config.h" 4 | 5 | /** 6 | * compiler - macros for common compiler extensions 7 | * 8 | * Abstracts away some compiler hints. Currently these include: 9 | * - COLD 10 | * For functions not called in fast paths (aka. cold functions) 11 | * - PRINTF_FMT 12 | * For functions which take printf-style parameters. 13 | * - IDEMPOTENT 14 | * For functions which return the same value for same parameters. 15 | * - NEEDED 16 | * For functions and variables which must be emitted even if unused. 17 | * - UNNEEDED 18 | * For functions and variables which need not be emitted if unused. 19 | * - UNUSED 20 | * For parameters which are not used. 21 | * - IS_COMPILE_CONSTANT 22 | * For using different tradeoffs for compiletime vs runtime evaluation. 23 | * 24 | * License: LGPL (3 or any later version) 25 | * Author: Rusty Russell 26 | * 27 | * Example: 28 | * #include 29 | * #include 30 | * #include 31 | * 32 | * // Example of a (slow-path) logging function. 33 | * static int log_threshold = 2; 34 | * static void COLD PRINTF_FMT(2,3) 35 | * logger(int level, const char *fmt, ...) 36 | * { 37 | * va_list ap; 38 | * va_start(ap, fmt); 39 | * if (level >= log_threshold) 40 | * vfprintf(stderr, fmt, ap); 41 | * va_end(ap); 42 | * } 43 | * 44 | * int main(int argc, char *argv[]) 45 | * { 46 | * if (argc != 1) { 47 | * logger(3, "Don't want %i arguments!\n", argc-1); 48 | * return 1; 49 | * } 50 | * return 0; 51 | * } 52 | */ 53 | int main(int argc, char *argv[]) 54 | { 55 | /* Expect exactly one argument */ 56 | if (argc != 2) 57 | return 1; 58 | 59 | if (strcmp(argv[1], "depends") == 0) { 60 | return 0; 61 | } 62 | 63 | return 1; 64 | } 65 | -------------------------------------------------------------------------------- /winbuild/dist/include/jansson_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2014 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The CMake system will generate the jansson_config.h file and 13 | * copy it to the build and install directories. 14 | */ 15 | 16 | #ifndef JANSSON_CONFIG_H 17 | #define JANSSON_CONFIG_H 18 | 19 | /* Define this so that we can disable scattered automake configuration in source files */ 20 | #ifndef JANSSON_USING_CMAKE 21 | #define JANSSON_USING_CMAKE 22 | #endif 23 | 24 | /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, 25 | * as we will also check for __int64 etc types. 26 | * (the definition was used in the automake system) */ 27 | 28 | /* Include our standard type header for the integer typedef */ 29 | 30 | #if defined(HAVE_STDINT_H) 31 | # include 32 | #elif defined(HAVE_INTTYPES_H) 33 | # include 34 | #elif defined(HAVE_SYS_TYPES_H) 35 | # include 36 | #endif 37 | 38 | 39 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 40 | defined to `inline', otherwise empty. In C++, the inline is always 41 | supported. */ 42 | #ifdef __cplusplus 43 | #define JSON_INLINE inline 44 | #else 45 | #define JSON_INLINE __inline 46 | #endif 47 | 48 | 49 | #define json_int_t long long 50 | #define json_strtoint _strtoi64 51 | #define JSON_INTEGER_FORMAT "I64d" 52 | 53 | 54 | /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */ 55 | #define JSON_HAVE_LOCALECONV 1 56 | 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /winbuild/jansson/jansson_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2014 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | */ 13 | 14 | #ifndef JANSSON_CONFIG_H 15 | #define JANSSON_CONFIG_H 16 | 17 | /* Define this so that we can disable scattered automake configuration in source files */ 18 | #ifndef JANSSON_USING_CMAKE 19 | #define JANSSON_USING_CMAKE 20 | #endif 21 | 22 | /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, 23 | * as we will also check for __int64 etc types. 24 | * (the definition was used in the automake system) */ 25 | 26 | /* Bring in the cmake-detected defines */ 27 | #define HAVE_STDINT_H 1 28 | /* #undef HAVE_INTTYPES_H */ 29 | /* #undef HAVE_SYS_TYPES_H */ 30 | 31 | /* Include our standard type header for the integer typedef */ 32 | 33 | #if defined(HAVE_STDINT_H) 34 | # include 35 | #elif defined(HAVE_INTTYPES_H) 36 | # include 37 | #elif defined(HAVE_SYS_TYPES_H) 38 | # include 39 | #endif 40 | 41 | 42 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 43 | defined to `inline', otherwise empty. In C++, the inline is always 44 | supported. */ 45 | #ifdef __cplusplus 46 | #define JSON_INLINE inline 47 | #else 48 | #define JSON_INLINE __inline 49 | #endif 50 | 51 | 52 | #define json_int_t long long 53 | #define json_strtoint _strtoi64 54 | #define JSON_INTEGER_FORMAT "I64d" 55 | 56 | 57 | /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */ 58 | #define JSON_HAVE_LOCALECONV 1 59 | 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /lib/dummy.c: -------------------------------------------------------------------------------- 1 | /* A dummy file, to prevent empty libraries from breaking builds. 2 | Copyright (C) 2004, 2007, 2009-2011 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Some systems, reportedly OpenBSD and Mac OS X, refuse to create 18 | libraries without any object files. You might get an error like: 19 | 20 | > ar cru .libs/libgl.a 21 | > ar: no archive members specified 22 | 23 | Compiling this file, and adding its object file to the library, will 24 | prevent the library from being empty. */ 25 | 26 | /* Some systems, such as Solaris with cc 5.0, refuse to work with libraries 27 | that don't export any symbol. You might get an error like: 28 | 29 | > cc ... libgnu.a 30 | > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a 31 | 32 | Compiling this file, and adding its object file to the library, will 33 | prevent the library from exporting no symbols. */ 34 | 35 | #ifdef __sun 36 | /* This declaration ensures that the library will export at least 1 symbol. */ 37 | int gl_dummy_symbol; 38 | #else 39 | /* This declaration is solely to ensure that after preprocessing 40 | this file is never empty. */ 41 | typedef int dummy; 42 | #endif 43 | -------------------------------------------------------------------------------- /lib/sig-handler.h: -------------------------------------------------------------------------------- 1 | /* Convenience declarations when working with . 2 | 3 | Copyright (C) 2008-2011 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | #ifndef _GL_SIG_HANDLER_H 19 | #define _GL_SIG_HANDLER_H 20 | 21 | #include 22 | 23 | /* Convenience type when working with signal handlers. */ 24 | typedef void (*sa_handler_t) (int); 25 | 26 | /* Return the handler of a signal, as a sa_handler_t value regardless 27 | of its true type. The resulting function can be compared to 28 | special values like SIG_IGN but it is not portable to call it. */ 29 | static inline sa_handler_t 30 | get_handler (struct sigaction const *a) 31 | { 32 | #ifdef SA_SIGINFO 33 | /* POSIX says that special values like SIG_IGN can only occur when 34 | action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4, 35 | for example, sa_sigaction and sa_handler are aliases and a signal 36 | is ignored if sa_sigaction (after casting) equals SIG_IGN. So 37 | use (and cast) sa_sigaction in that case. */ 38 | if (a->sa_flags & SA_SIGINFO) 39 | return (sa_handler_t) a->sa_sigaction; 40 | #endif 41 | return a->sa_handler; 42 | } 43 | 44 | #endif /* _GL_SIG_HANDLER_H */ 45 | -------------------------------------------------------------------------------- /ccan/opt/_info: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "config.h" 4 | 5 | /** 6 | * opt - simple command line parsing 7 | * 8 | * Simple but powerful command line parsing. 9 | * 10 | * Example: 11 | * #include 12 | * #include 13 | * #include 14 | * 15 | * static bool someflag; 16 | * static int verbose; 17 | * static char *somestring; 18 | * 19 | * static struct opt_table opts[] = { 20 | * OPT_WITHOUT_ARG("--verbose|-v", opt_inc_intval, &verbose, 21 | * "Verbose mode (can be specified more than once)"), 22 | * OPT_WITHOUT_ARG("--someflag", opt_set_bool, &someflag, 23 | * "Set someflag"), 24 | * OPT_WITH_ARG("--somefile=", opt_set_charp, opt_show_charp, 25 | * &somestring, "Set somefile to "), 26 | * OPT_WITHOUT_ARG("--usage|--help|-h", opt_usage_and_exit, 27 | * "args...\nA silly test program.", 28 | * "Print this message."), 29 | * OPT_ENDTABLE 30 | * }; 31 | * 32 | * int main(int argc, char *argv[]) 33 | * { 34 | * int i; 35 | * 36 | * opt_register_table(opts, NULL); 37 | * // For fun, register an extra one. 38 | * opt_register_noarg("--no-someflag", opt_set_invbool, &someflag, 39 | * "Unset someflag"); 40 | * if (!opt_parse(&argc, argv, opt_log_stderr)) 41 | * exit(1); 42 | * 43 | * printf("someflag = %i, verbose = %i, somestring = %s\n", 44 | * someflag, verbose, somestring); 45 | * printf("%u args left over:", argc - 1); 46 | * for (i = 1; i < argc; i++) 47 | * printf(" %s", argv[i]); 48 | * printf("\n"); 49 | * return 0; 50 | * } 51 | * 52 | * License: GPL (2 or any later version) 53 | * Author: Rusty Russell 54 | */ 55 | int main(int argc, char *argv[]) 56 | { 57 | if (argc != 2) 58 | return 1; 59 | 60 | if (strcmp(argv[1], "depends") == 0) { 61 | printf("ccan/typesafe_cb\n"); 62 | printf("ccan/compiler\n"); 63 | return 0; 64 | } 65 | 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /submodules/jansson/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Use this script to easily make releases of Jansson. It configures 4 | # the source tree, and builds and signs all tarballs. 5 | 6 | die() { 7 | echo $1 >&2 8 | exit 1 9 | } 10 | 11 | confirm() { 12 | local answer 13 | read -p "$1 [yN]: " answer 14 | [ "$answer" = "Y" -o "$answer" = "y" ] || exit 0 15 | } 16 | 17 | set -e 18 | [ -f configure.ac ] || die "Must be run at project root directory" 19 | 20 | # Determine version 21 | v=$(grep AC_INIT configure.ac | sed -r 's/.*, \[(.+?)\],.*/\1/') 22 | [ -n "$v" ] || die "Unable to determine version" 23 | confirm "Version is $v, proceed?" 24 | 25 | # Sanity checks 26 | vi=$(grep version-info src/Makefile.am | sed 's/^[ \t]*//g' | cut -d" " -f2) 27 | confirm "Libtool version-info is $vi, proceed?" 28 | 29 | r=$(grep 'Released ' CHANGES | head -n 1) 30 | confirm "Last CHANGES entry says \"$r\", proceed??" 31 | 32 | dv=$(grep ^version doc/conf.py | sed -r "s/.*'(.*)'.*/\1/") 33 | if [ "$dv" != "$v" ]; then 34 | die "Documentation version ($dv) doesn't match library version" 35 | fi 36 | 37 | [ -f Makefile ] && make distclean || true 38 | rm -f jansson-$v.tar.* 39 | rm -rf jansson-$v-doc 40 | rm -f jansson-$v-doc.tar.* 41 | 42 | autoreconf -fi 43 | ./configure 44 | 45 | # Run tests and make gz source tarball 46 | : ${VALGRIND:=1} 47 | export VALGRIND 48 | make distcheck 49 | 50 | # Make bzip2 source tarball 51 | make dist-bzip2 52 | 53 | # Sign source tarballs 54 | for s in gz bz2; do 55 | gpg --detach-sign --armor jansson-$v.tar.$s 56 | done 57 | 58 | # Build documentation 59 | make html 60 | mv doc/_build/html jansson-$v-doc 61 | 62 | # Make and sign documentation tarballs 63 | for s in gz bz2; do 64 | [ $s = gz ] && compress=gzip 65 | [ $s = bz2 ] && compress=bzip2 66 | tar cf - jansson-$v-doc | $compress -9 -c > jansson-$v-doc.tar.$s 67 | gpg --detach-sign --armor jansson-$v-doc.tar.$s 68 | done 69 | 70 | echo "All done" 71 | -------------------------------------------------------------------------------- /pool.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright 2014 sgminer developers. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | */ 26 | 27 | #include "config.h" 28 | #include "miner.h" 29 | #include "pool.h" 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | char* get_pool_name(struct pool *pool) { 36 | if (opt_incognito) { 37 | return ""; 38 | } 39 | 40 | if (empty_string(pool->name)) { 41 | return pool->sockaddr_url; 42 | } 43 | 44 | return pool->name; 45 | } 46 | 47 | char* get_pool_user(struct pool *pool) { 48 | if (opt_incognito) { 49 | return ""; 50 | } 51 | 52 | return pool->rpc_user; 53 | } 54 | -------------------------------------------------------------------------------- /submodules/jansson/src/error.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "jansson_private.h" 3 | 4 | void jsonp_error_init(json_error_t *error, const char *source) 5 | { 6 | if(error) 7 | { 8 | error->text[0] = '\0'; 9 | error->line = -1; 10 | error->column = -1; 11 | error->position = 0; 12 | if(source) 13 | jsonp_error_set_source(error, source); 14 | else 15 | error->source[0] = '\0'; 16 | } 17 | } 18 | 19 | void jsonp_error_set_source(json_error_t *error, const char *source) 20 | { 21 | size_t length; 22 | 23 | if(!error || !source) 24 | return; 25 | 26 | length = strlen(source); 27 | if(length < JSON_ERROR_SOURCE_LENGTH) 28 | strncpy(error->source, source, length + 1); 29 | else { 30 | size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4; 31 | strncpy(error->source, "...", 3); 32 | strncpy(error->source + 3, source + extra, length - extra + 1); 33 | } 34 | } 35 | 36 | void jsonp_error_set(json_error_t *error, int line, int column, 37 | size_t position, enum json_error_code code, 38 | const char *msg, ...) 39 | { 40 | va_list ap; 41 | 42 | va_start(ap, msg); 43 | jsonp_error_vset(error, line, column, position, code, msg, ap); 44 | va_end(ap); 45 | } 46 | 47 | void jsonp_error_vset(json_error_t *error, int line, int column, 48 | size_t position, enum json_error_code code, 49 | const char *msg, va_list ap) 50 | { 51 | if(!error) 52 | return; 53 | 54 | if(error->text[0] != '\0') { 55 | /* error already set */ 56 | return; 57 | } 58 | 59 | error->line = line; 60 | error->column = column; 61 | error->position = (int)position; 62 | 63 | vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH - 1, msg, ap); 64 | error->text[JSON_ERROR_TEXT_LENGTH - 2] = '\0'; 65 | error->text[JSON_ERROR_TEXT_LENGTH - 1] = code; 66 | } 67 | -------------------------------------------------------------------------------- /submodules/jansson/doc/ext/refcounting.py: -------------------------------------------------------------------------------- 1 | """ 2 | refcounting 3 | ~~~~~~~~~~~ 4 | 5 | Reference count annotations for C API functions. Has the same 6 | result as the sphinx.ext.refcounting extension but works for all 7 | functions regardless of the signature, and the reference counting 8 | information is written inline with the documentation instead of a 9 | separate file. 10 | 11 | Adds a new directive "refcounting". The directive has no content 12 | and one required positional parameter:: "new" or "borrow". 13 | 14 | Example: 15 | 16 | .. cfunction:: json_t *json_object(void) 17 | 18 | .. refcounting:: new 19 | 20 | 21 | 22 | :copyright: Copyright (c) 2009-2016 Petri Lehtinen 23 | :license: MIT, see LICENSE for details. 24 | """ 25 | 26 | from docutils import nodes 27 | 28 | class refcounting(nodes.emphasis): pass 29 | 30 | def visit(self, node): 31 | self.visit_emphasis(node) 32 | 33 | def depart(self, node): 34 | self.depart_emphasis(node) 35 | 36 | def html_visit(self, node): 37 | self.body.append(self.starttag(node, 'em', '', CLASS='refcount')) 38 | 39 | def html_depart(self, node): 40 | self.body.append('') 41 | 42 | 43 | def refcounting_directive(name, arguments, options, content, lineno, 44 | content_offset, block_text, state, state_machine): 45 | if arguments[0] == 'borrow': 46 | text = 'Return value: Borrowed reference.' 47 | elif arguments[0] == 'new': 48 | text = 'Return value: New reference.' 49 | else: 50 | raise Error('Valid arguments: new, borrow') 51 | 52 | return [refcounting(text, text)] 53 | 54 | def setup(app): 55 | app.add_node(refcounting, 56 | html=(html_visit, html_depart), 57 | latex=(visit, depart), 58 | text=(visit, depart), 59 | man=(visit, depart)) 60 | app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0)) 61 | -------------------------------------------------------------------------------- /submodules/jansson/README.rst: -------------------------------------------------------------------------------- 1 | Jansson README 2 | ============== 3 | 4 | .. image:: https://travis-ci.org/akheron/jansson.png 5 | :target: https://travis-ci.org/akheron/jansson 6 | 7 | .. image:: https://ci.appveyor.com/api/projects/status/lmhkkc4q8cwc65ko 8 | :target: https://ci.appveyor.com/project/akheron/jansson 9 | 10 | .. image:: https://coveralls.io/repos/akheron/jansson/badge.png?branch=master 11 | :target: https://coveralls.io/r/akheron/jansson?branch=master 12 | 13 | Jansson_ is a C library for encoding, decoding and manipulating JSON 14 | data. Its main features and design principles are: 15 | 16 | - Simple and intuitive API and data model 17 | 18 | - `Comprehensive documentation`_ 19 | 20 | - No dependencies on other libraries 21 | 22 | - Full Unicode support (UTF-8) 23 | 24 | - Extensive test suite 25 | 26 | Jansson is licensed under the `MIT license`_; see LICENSE in the 27 | source distribution for details. 28 | 29 | 30 | Compilation and Installation 31 | ---------------------------- 32 | 33 | If you obtained a source tarball, just use the standard autotools 34 | commands:: 35 | 36 | $ ./configure 37 | $ make 38 | $ make install 39 | 40 | To run the test suite, invoke:: 41 | 42 | $ make check 43 | 44 | If the source has been checked out from a Git repository, the 45 | ./configure script has to be generated first. The easiest way is to 46 | use autoreconf:: 47 | 48 | $ autoreconf -i 49 | 50 | 51 | Documentation 52 | ------------- 53 | 54 | Documentation is available at http://jansson.readthedocs.io/en/latest/. 55 | 56 | The documentation source is in the ``doc/`` subdirectory. To generate 57 | HTML documentation, invoke:: 58 | 59 | $ make html 60 | 61 | Then, point your browser to ``doc/_build/html/index.html``. Sphinx_ 62 | 1.0 or newer is required to generate the documentation. 63 | 64 | 65 | .. _Jansson: http://www.digip.org/jansson/ 66 | .. _`Comprehensive documentation`: http://jansson.readthedocs.io/en/latest/ 67 | .. _`MIT license`: http://www.opensource.org/licenses/mit-license.php 68 | .. _Sphinx: http://sphinx.pocoo.org/ 69 | -------------------------------------------------------------------------------- /winbuild/dist/include/config.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | #define HAVE_STDINT_H 5 | 6 | #if defined(_MSC_VER) 7 | 8 | #define HAVE_LIBCURL 1 9 | #define CURL_HAS_KEEPALIVE 1 10 | #define HAVE_CURSES 1 11 | #define HAVE_ADL 1 12 | 13 | #define STDC_HEADERS 1 14 | #define EXECV_2ND_ARG_TYPE char* const* 15 | 16 | #define HAVE_ALLOCA 1 17 | #define HAVE_ATTRIBUTE_COLD 1 18 | #define HAVE_ATTRIBUTE_CONST 1 19 | #define HAVE_ATTRIBUTE_NORETURN 1 20 | #define HAVE_ATTRIBUTE_PRINTF 1 21 | #define HAVE_ATTRIBUTE_UNUSED 1 22 | #define HAVE_ATTRIBUTE_USED 1 23 | #define HAVE_BUILTIN_CONSTANT_P 1 24 | #define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1 25 | #define HAVE_DECL_MEMMEM 0 26 | #define HAVE_INTTYPES_H 1 27 | #define HAVE_LONG_LONG_INT 1 28 | #define HAVE_MEMORY_H 1 29 | #define HAVE_MPROTECT 1 30 | #define HAVE_RAW_DECL_MEMPCPY 1 31 | #define HAVE_RAW_DECL_STRNCAT 1 32 | #define HAVE_RAW_DECL_STRNLEN 1 33 | #define HAVE_RAW_DECL_STRPBRK 1 34 | #define HAVE_STDLIB_H 1 35 | #define HAVE_STRINGS_H 1 36 | #define HAVE_STRING_H 1 37 | #define HAVE_SYS_STAT_H 1 38 | #define HAVE_SYS_TYPES_H 1 39 | #define HAVE_UNISTD_H 1 40 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 41 | #define HAVE_WARN_UNUSED_RESULT 1 42 | #define HAVE_WCHAR_H 1 43 | #define HAVE_WCHAR_T 1 44 | 45 | #define PRIi64 "I64d" 46 | #define PRIi32 "I32d" 47 | #define PRIu32 "I32u" 48 | #define PRIu64 "I64u" 49 | 50 | #define PATH_MAX MAX_PATH 51 | 52 | // Libraries to include 53 | #pragma comment(lib, "winmm.lib") 54 | #pragma comment(lib, "wsock32.lib") 55 | #pragma comment(lib, "pthreadVC2.lib") 56 | #pragma comment(lib, "OpenCL.lib") 57 | #pragma comment(lib, "jansson.lib") 58 | 59 | #ifdef HAVE_LIBCURL 60 | #define CURL_STATICLIB 1 61 | #pragma comment(lib, "libcurl_a.lib") 62 | #endif 63 | 64 | #ifdef HAVE_CURSES 65 | #pragma comment(lib, "pdcurses.lib") 66 | #endif 67 | 68 | #endif 69 | 70 | #define VERSION "v5.2.0" 71 | #define PACKAGE_NAME "sgminer" 72 | #define PACKAGE_TARNAME "sgminer" 73 | #define PACKAGE_VERSION "5.2.0" 74 | #define PACKAGE_STRING "sgminer 5.2.0" 75 | #define PACKAGE "sgminer" 76 | 77 | #define SGMINER_PREFIX "" 78 | 79 | #include "gitversion.h" 80 | #include "winbuild.h" 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /submodules/jansson/cmake/jansson_config.h.cmake: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The CMake system will generate the jansson_config.h file and 13 | * copy it to the build and install directories. 14 | */ 15 | 16 | #ifndef JANSSON_CONFIG_H 17 | #define JANSSON_CONFIG_H 18 | 19 | /* Define this so that we can disable scattered automake configuration in source files */ 20 | #ifndef JANSSON_USING_CMAKE 21 | #define JANSSON_USING_CMAKE 22 | #endif 23 | 24 | /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, 25 | * as we will also check for __int64 etc types. 26 | * (the definition was used in the automake system) */ 27 | 28 | /* Bring in the cmake-detected defines */ 29 | #cmakedefine HAVE_STDINT_H 1 30 | #cmakedefine HAVE_INTTYPES_H 1 31 | #cmakedefine HAVE_SYS_TYPES_H 1 32 | 33 | /* Include our standard type header for the integer typedef */ 34 | 35 | #if defined(HAVE_STDINT_H) 36 | # include 37 | #elif defined(HAVE_INTTYPES_H) 38 | # include 39 | #elif defined(HAVE_SYS_TYPES_H) 40 | # include 41 | #endif 42 | 43 | 44 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 45 | defined to `inline', otherwise empty. In C++, the inline is always 46 | supported. */ 47 | #ifdef __cplusplus 48 | #define JSON_INLINE inline 49 | #else 50 | #define JSON_INLINE @JSON_INLINE@ 51 | #endif 52 | 53 | 54 | #define json_int_t @JSON_INT_T@ 55 | #define json_strtoint @JSON_STRTOINT@ 56 | #define JSON_INTEGER_FORMAT @JSON_INTEGER_FORMAT@ 57 | 58 | 59 | /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */ 60 | #define JSON_HAVE_LOCALECONV @JSON_HAVE_LOCALECONV@ 61 | 62 | 63 | /* Maximum recursion depth for parsing JSON input. 64 | This limits the depth of e.g. array-within-array constructions. */ 65 | #define JSON_PARSER_MAX_DEPTH 2048 66 | 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /m4/mmap-anon.m4: -------------------------------------------------------------------------------- 1 | # mmap-anon.m4 serial 9 2 | dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Detect how mmap can be used to create anonymous (not file-backed) memory 8 | # mappings. 9 | # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS 10 | # and MAP_ANON exist and have the same value. 11 | # - On HP-UX, only MAP_ANONYMOUS exists. 12 | # - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. 13 | # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be 14 | # used. 15 | 16 | AC_DEFUN([gl_FUNC_MMAP_ANON], 17 | [ 18 | dnl Persuade glibc to define MAP_ANONYMOUS. 19 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 20 | 21 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it 22 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is 23 | # irrelevant for anonymous mappings. 24 | AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) 25 | 26 | # Try to allow MAP_ANONYMOUS. 27 | gl_have_mmap_anonymous=no 28 | if test $gl_have_mmap = yes; then 29 | AC_MSG_CHECKING([for MAP_ANONYMOUS]) 30 | AC_EGREP_CPP([I cant identify this map.], [ 31 | #include 32 | #ifdef MAP_ANONYMOUS 33 | I cant identify this map. 34 | #endif 35 | ], 36 | [gl_have_mmap_anonymous=yes]) 37 | if test $gl_have_mmap_anonymous != yes; then 38 | AC_EGREP_CPP([I cant identify this map.], [ 39 | #include 40 | #ifdef MAP_ANON 41 | I cant identify this map. 42 | #endif 43 | ], 44 | [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], 45 | [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) 46 | gl_have_mmap_anonymous=yes]) 47 | fi 48 | AC_MSG_RESULT([$gl_have_mmap_anonymous]) 49 | if test $gl_have_mmap_anonymous = yes; then 50 | AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], 51 | [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including 52 | config.h and .]) 53 | fi 54 | fi 55 | ]) 56 | -------------------------------------------------------------------------------- /m4/multiarch.m4: -------------------------------------------------------------------------------- 1 | # multiarch.m4 serial 6 2 | dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # Determine whether the compiler is or may be producing universal binaries. 8 | # 9 | # On MacOS X 10.5 and later systems, the user can create libraries and 10 | # executables that work on multiple system types--known as "fat" or 11 | # "universal" binaries--by specifying multiple '-arch' options to the 12 | # compiler but only a single '-arch' option to the preprocessor. Like 13 | # this: 14 | # 15 | # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 16 | # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 17 | # CPP="gcc -E" CXXCPP="g++ -E" 18 | # 19 | # Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. 20 | 21 | AC_DEFUN_ONCE([gl_MULTIARCH], 22 | [ 23 | dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. 24 | gl_cv_c_multiarch=no 25 | AC_COMPILE_IFELSE( 26 | [AC_LANG_SOURCE( 27 | [[#ifndef __APPLE_CC__ 28 | not a universal capable compiler 29 | #endif 30 | typedef int dummy; 31 | ]])], 32 | [ 33 | dnl Check for potential -arch flags. It is not universal unless 34 | dnl there are at least two -arch flags with different values. 35 | arch= 36 | prev= 37 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do 38 | if test -n "$prev"; then 39 | case $word in 40 | i?86 | x86_64 | ppc | ppc64) 41 | if test -z "$arch" || test "$arch" = "$word"; then 42 | arch="$word" 43 | else 44 | gl_cv_c_multiarch=yes 45 | fi 46 | ;; 47 | esac 48 | prev= 49 | else 50 | if test "x$word" = "x-arch"; then 51 | prev=arch 52 | fi 53 | fi 54 | done 55 | ]) 56 | if test $gl_cv_c_multiarch = yes; then 57 | APPLE_UNIVERSAL_BUILD=1 58 | else 59 | APPLE_UNIVERSAL_BUILD=0 60 | fi 61 | AC_SUBST([APPLE_UNIVERSAL_BUILD]) 62 | ]) 63 | -------------------------------------------------------------------------------- /m4/warn-on-use.m4: -------------------------------------------------------------------------------- 1 | # warn-on-use.m4 serial 2 2 | dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) 8 | # --------------------------------------- 9 | # For each whitespace-separated element in the list of NAMES, define 10 | # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES 11 | # even after being undefined as a macro. 12 | # 13 | # See warn-on-use.h for some hints on how to poison function names, as 14 | # well as ideas on poisoning global variables and macros. NAMES may 15 | # include global variables, but remember that only functions work with 16 | # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single 17 | # header, but if the replacement header pulls in other headers because 18 | # some systems declare functions in the wrong header, then INCLUDES 19 | # should do likewise. 20 | # 21 | # If you assume C89, then it is generally safe to assume declarations 22 | # for functions declared in that standard (such as gets) without 23 | # needing gl_WARN_ON_USE_PREPARE. 24 | AC_DEFUN([gl_WARN_ON_USE_PREPARE], 25 | [ 26 | m4_foreach_w([gl_decl], [$2], 27 | [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), 28 | [Define to 1 if ]m4_defn([gl_decl])[ is declared even after 29 | undefining macros.])])dnl 30 | for gl_func in m4_flatten([$2]); do 31 | AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl 32 | AC_CACHE_CHECK([whether $gl_func is declared without a macro], 33 | gl_Symbol, 34 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], 35 | [@%:@undef $gl_func 36 | (void) $gl_func;])], 37 | [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) 38 | AS_VAR_IF(gl_Symbol, [yes], 39 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) 40 | dnl shortcut - if the raw declaration exists, then set a cache 41 | dnl variable to allow skipping any later AC_CHECK_DECL efforts 42 | eval ac_cv_have_decl_$gl_func=yes]) 43 | AS_VAR_POPDEF([gl_Symbol])dnl 44 | done 45 | ]) 46 | -------------------------------------------------------------------------------- /winbuild/sgminer.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sgminer", "sgminer.vcxproj", "{CCA64DCD-6401-42A3-ABC3-89E48A36D239}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jansson", "jansson\jansson.vcxproj", "{AFE7D2AA-025C-4837-B4B2-81117E010B3B}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|Win32.Build.0 = Debug|Win32 20 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|x64.ActiveCfg = Debug|x64 21 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|x64.Build.0 = Debug|x64 22 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Debug|x64.Deploy.0 = Debug|x64 23 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Release|Win32.ActiveCfg = Release|Win32 24 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Release|Win32.Build.0 = Release|Win32 25 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Release|x64.ActiveCfg = Release|x64 26 | {CCA64DCD-6401-42A3-ABC3-89E48A36D239}.Release|x64.Build.0 = Release|x64 27 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Debug|Win32.ActiveCfg = Debug|Win32 28 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Debug|Win32.Build.0 = Debug|Win32 29 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Debug|x64.ActiveCfg = Debug|x64 30 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Debug|x64.Build.0 = Debug|x64 31 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Release|Win32.ActiveCfg = Release|Win32 32 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Release|Win32.Build.0 = Release|Win32 33 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Release|x64.ActiveCfg = Release|x64 34 | {AFE7D2AA-025C-4837-B4B2-81117E010B3B}.Release|x64.Build.0 = Release|x64 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | EndGlobal 40 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | ACLOCAL_AMFLAGS = -I m4 3 | 4 | JANSSON_CPPFLAGS= -I$(top_builddir)/submodules/jansson/src -I$(top_srcdir)/submodules/jansson/src 5 | 6 | EXTRA_DIST = example.conf m4/gnulib-cache.m4 \ 7 | ADL_SDK/readme.txt api-example.php miner.php \ 8 | API.class API.java api-example.c hexdump.c \ 9 | doc/API doc/FAQ doc/GPU doc/SCRYPT doc/windows-build.txt 10 | 11 | SUBDIRS = lib submodules ccan sph 12 | 13 | bin_PROGRAMS = sgminer 14 | 15 | sgminer_CPPFLAGS = $(PTHREAD_FLAGS) -std=gnu99 $(JANSSON_CPPFLAGS) 16 | sgminer_LDFLAGS = $(PTHREAD_FLAGS) 17 | sgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \ 18 | @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \ 19 | @MM_LIBS@ @RT_LIBS@ @MATH_LIBS@ lib/libgnu.a ccan/libccan.a sph/libsph.a 20 | 21 | sgminer_CPPFLAGS += -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@ @LIBCURL_CFLAGS@ 22 | 23 | if HAVE_WINDOWS 24 | sgminer_LDFLAGS += -all-static 25 | endif 26 | 27 | sgminer_CPPFLAGS += $(ADL_CPPFLAGS) 28 | 29 | if USE_GIT_VERSION 30 | GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty') 31 | sgminer_CPPFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" 32 | endif 33 | 34 | if USE_BUILD_NUMBER 35 | sgminer_CPPFLAGS += -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" 36 | endif 37 | 38 | sgminer_SOURCES := sgminer.c 39 | sgminer_SOURCES += api.c api.h 40 | sgminer_SOURCES += elist.h miner.h compat.h bench_block.h 41 | sgminer_SOURCES += util.c util.h uthash.h 42 | sgminer_SOURCES += logging.c logging.h 43 | sgminer_SOURCES += driver-opencl.c driver-opencl.h 44 | sgminer_SOURCES += ocl.c ocl.h 45 | sgminer_SOURCES += findnonce.c findnonce.h 46 | sgminer_SOURCES += adl.c adl.h adl_functions.h 47 | sgminer_SOURCES += pool.c pool.h 48 | sgminer_SOURCES += algorithm.c algorithm.h 49 | sgminer_SOURCES += config_parser.c config_parser.h 50 | sgminer_SOURCES += events.c events.h 51 | sgminer_SOURCES += ocl/build_kernel.c ocl/build_kernel.h 52 | sgminer_SOURCES += ocl/binary_kernel.c ocl/binary_kernel.h 53 | 54 | sgminer_SOURCES += kernel/*.cl 55 | sgminer_SOURCES += algorithm/sysendian.h 56 | sgminer_SOURCES += algorithm/scrypt.c algorithm/scrypt.h 57 | sgminer_SOURCES += algorithm/bcd.c algorithm/bcd.h 58 | 59 | bin_SCRIPTS = $(top_srcdir)/kernel/*.cl 60 | 61 | -------------------------------------------------------------------------------- /ccan/opt/test/run-iter.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "utils.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | static void reset_options(void) 13 | { 14 | free(opt_table); 15 | opt_table = NULL; 16 | opt_count = opt_num_short = opt_num_short_arg = opt_num_long = 0; 17 | } 18 | 19 | /* Test iterators. */ 20 | int main(int argc, char *argv[]) 21 | { 22 | unsigned j, i, len = 0; 23 | const char *p; 24 | 25 | plan_tests(37 * 2); 26 | for (j = 0; j < 2; j ++) { 27 | reset_options(); 28 | /* Giving subtable a title makes an extra entry! */ 29 | opt_register_table(subtables, j == 0 ? NULL : "subtable"); 30 | 31 | p = first_lopt(&i, &len); 32 | ok1(i == j + 0); 33 | ok1(len == 3); 34 | ok1(strncmp(p, "jjj", len) == 0); 35 | p = next_lopt(p, &i, &len); 36 | ok1(i == j + 0); 37 | ok1(len == 3); 38 | ok1(strncmp(p, "lll", len) == 0); 39 | p = next_lopt(p, &i, &len); 40 | ok1(i == j + 1); 41 | ok1(len == 3); 42 | ok1(strncmp(p, "mmm", len) == 0); 43 | p = next_lopt(p, &i, &len); 44 | ok1(i == j + 5); 45 | ok1(len == 3); 46 | ok1(strncmp(p, "ddd", len) == 0); 47 | p = next_lopt(p, &i, &len); 48 | ok1(i == j + 6); 49 | ok1(len == 3); 50 | ok1(strncmp(p, "eee", len) == 0); 51 | p = next_lopt(p, &i, &len); 52 | ok1(i == j + 7); 53 | ok1(len == 3); 54 | ok1(strncmp(p, "ggg", len) == 0); 55 | p = next_lopt(p, &i, &len); 56 | ok1(i == j + 8); 57 | ok1(len == 3); 58 | ok1(strncmp(p, "hhh", len) == 0); 59 | p = next_lopt(p, &i, &len); 60 | ok1(!p); 61 | 62 | p = first_sopt(&i); 63 | ok1(i == j + 0); 64 | ok1(*p == 'j'); 65 | p = next_sopt(p, &i); 66 | ok1(i == j + 0); 67 | ok1(*p == 'l'); 68 | p = next_sopt(p, &i); 69 | ok1(i == j + 1); 70 | ok1(*p == 'm'); 71 | p = next_sopt(p, &i); 72 | ok1(i == j + 2); 73 | ok1(*p == 'a'); 74 | p = next_sopt(p, &i); 75 | ok1(i == j + 3); 76 | ok1(*p == 'b'); 77 | p = next_sopt(p, &i); 78 | ok1(i == j + 7); 79 | ok1(*p == 'g'); 80 | p = next_sopt(p, &i); 81 | ok1(i == j + 8); 82 | ok1(*p == 'h'); 83 | p = next_sopt(p, &i); 84 | ok1(!p); 85 | } 86 | 87 | return exit_status(); 88 | } 89 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/test_dump_callback.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include "util.h" 12 | 13 | struct my_sink { 14 | char *buf; 15 | size_t off; 16 | size_t cap; 17 | }; 18 | 19 | static int my_writer(const char *buffer, size_t len, void *data) { 20 | struct my_sink *s = data; 21 | if (len > s->cap - s->off) { 22 | return -1; 23 | } 24 | memcpy(s->buf + s->off, buffer, len); 25 | s->off += len; 26 | return 0; 27 | } 28 | 29 | static void run_tests() 30 | { 31 | struct my_sink s; 32 | json_t *json; 33 | const char str[] = "[\"A\", {\"B\": \"C\", \"e\": false}, 1, null, \"foo\"]"; 34 | char *dumped_to_string; 35 | 36 | json = json_loads(str, 0, NULL); 37 | if(!json) { 38 | fail("json_loads failed"); 39 | } 40 | 41 | dumped_to_string = json_dumps(json, 0); 42 | if (!dumped_to_string) { 43 | json_decref(json); 44 | fail("json_dumps failed"); 45 | } 46 | 47 | s.off = 0; 48 | s.cap = strlen(dumped_to_string); 49 | s.buf = malloc(s.cap); 50 | if (!s.buf) { 51 | json_decref(json); 52 | free(dumped_to_string); 53 | fail("malloc failed"); 54 | } 55 | 56 | if (json_dump_callback(json, my_writer, &s, 0) == -1) { 57 | json_decref(json); 58 | free(dumped_to_string); 59 | free(s.buf); 60 | fail("json_dump_callback failed on an exact-length sink buffer"); 61 | } 62 | 63 | if (strncmp(dumped_to_string, s.buf, s.off) != 0) { 64 | json_decref(json); 65 | free(dumped_to_string); 66 | free(s.buf); 67 | fail("json_dump_callback and json_dumps did not produce identical output"); 68 | } 69 | 70 | s.off = 1; 71 | if (json_dump_callback(json, my_writer, &s, 0) != -1) { 72 | json_decref(json); 73 | free(dumped_to_string); 74 | free(s.buf); 75 | fail("json_dump_callback succeeded on a short buffer when it should have failed"); 76 | } 77 | 78 | json_decref(json); 79 | free(dumped_to_string); 80 | free(s.buf); 81 | } 82 | -------------------------------------------------------------------------------- /hexdump.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hexdump implementation without depenecies to *printf() 3 | * output is equal to 'hexdump -C' 4 | * should be compatible to 64bit architectures 5 | * 6 | * Copyright (c) 2009 Daniel Mack 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | #include "miner.h" 22 | #define hex_print(p) applog(LOG_DEBUG, "%s", p) 23 | 24 | static char nibble[] = { 25 | '0', '1', '2', '3', '4', '5', '6', '7', 26 | '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; 27 | 28 | #define BYTES_PER_LINE 0x10 29 | 30 | void hexdump(const uint8_t *p, unsigned int len) 31 | { 32 | unsigned int i, addr; 33 | unsigned int wordlen = sizeof(void*); 34 | unsigned char v, line[BYTES_PER_LINE * 5]; 35 | 36 | for (addr = 0; addr < len; addr += BYTES_PER_LINE) { 37 | /* clear line */ 38 | for (i = 0; i < sizeof(line); i++) { 39 | if (i == wordlen * 2 + 52 || 40 | i == wordlen * 2 + 69) { 41 | line[i] = '|'; 42 | continue; 43 | } 44 | 45 | if (i == wordlen * 2 + 70) { 46 | line[i] = '\0'; 47 | continue; 48 | } 49 | 50 | line[i] = ' '; 51 | } 52 | 53 | /* print address */ 54 | for (i = 0; i < wordlen * 2; i++) { 55 | v = addr >> ((wordlen * 2 - i - 1) * 4); 56 | line[i] = nibble[v & 0xf]; 57 | } 58 | 59 | /* dump content */ 60 | for (i = 0; i < BYTES_PER_LINE; i++) { 61 | int pos = (wordlen * 2) + 3 + (i / 8); 62 | 63 | if (addr + i >= len) 64 | break; 65 | 66 | v = p[addr + i]; 67 | line[pos + (i * 3) + 0] = nibble[v >> 4]; 68 | line[pos + (i * 3) + 1] = nibble[v & 0xf]; 69 | 70 | /* character printable? */ 71 | line[(wordlen * 2) + 53 + i] = 72 | (v >= ' ' && v <= '~') ? v : '.'; 73 | } 74 | 75 | hex_print(line); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/test_load_callback.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2011 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include "util.h" 12 | 13 | struct my_source { 14 | const char *buf; 15 | size_t off; 16 | size_t cap; 17 | }; 18 | 19 | static const char my_str[] = "[\"A\", {\"B\": \"C\", \"e\": false}, 1, null, \"foo\"]"; 20 | 21 | static size_t greedy_reader(void *buf, size_t buflen, void *arg) 22 | { 23 | struct my_source *s = arg; 24 | if (buflen > s->cap - s->off) 25 | buflen = s->cap - s->off; 26 | if (buflen > 0) { 27 | memcpy(buf, s->buf + s->off, buflen); 28 | s->off += buflen; 29 | return buflen; 30 | } else { 31 | return 0; 32 | } 33 | } 34 | 35 | static void run_tests() 36 | { 37 | struct my_source s; 38 | json_t *json; 39 | json_error_t error; 40 | 41 | s.off = 0; 42 | s.cap = strlen(my_str); 43 | s.buf = my_str; 44 | 45 | json = json_load_callback(greedy_reader, &s, 0, &error); 46 | 47 | if (!json) 48 | fail("json_load_callback failed on a valid callback"); 49 | json_decref(json); 50 | 51 | s.off = 0; 52 | s.cap = strlen(my_str) - 1; 53 | s.buf = my_str; 54 | 55 | json = json_load_callback(greedy_reader, &s, 0, &error); 56 | if (json) { 57 | json_decref(json); 58 | fail("json_load_callback should have failed on an incomplete stream, but it didn't"); 59 | } 60 | if (strcmp(error.source, "") != 0) { 61 | fail("json_load_callback returned an invalid error source"); 62 | } 63 | if (strcmp(error.text, "']' expected near end of file") != 0) { 64 | fail("json_load_callback returned an invalid error message for an unclosed top-level array"); 65 | } 66 | 67 | json = json_load_callback(NULL, NULL, 0, &error); 68 | if (json) { 69 | json_decref(json); 70 | fail("json_load_callback should have failed on NULL load callback, but it didn't"); 71 | } 72 | if (strcmp(error.text, "wrong arguments") != 0) { 73 | fail("json_load_callback returned an invalid error message for a NULL load callback"); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors 2 | 3 | ## Core 4 | 5 | * Jan Berdajs 15bULC8snaKAMeFb3xBmmhbWj1xyTmBUfm 6 | * Noel Maersk 12jF1VExtmmMu8D36vo4Y4CYqLK5yCtLC4 7 | * troky 1DqHeJdVy4kQX1jHaaVxef9Bgii14pwEbg 8 | * Yann St.Arnaud 1SLixz2vRvjdpzZTep4Tiqs82Jc28tc6J 9 | * lasybear <**FIXME**> 10 | * Luke Dashjr 1QATWksNFGeUJCWBrN4g6hGM178Lovm7Wh 11 | * Andrew Smith 1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm 12 | 13 | 14 | ## Core (history) 15 | 16 | * Con Kolivas 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ 17 | * Martin Danielsen 1DNBcSEENBwDKrcTyTW61ezWhzsPy5imkn 18 | 19 | 20 | ## Cross-platform support 21 | 22 | * MinGW (Windows native): Drogean 23 | * MinGW (Linux cross-compilation): Wolf` 24 | * MinGW (Linux cross-compilation): tonobitc 25 | * MSVS2010: troky 26 | * Cygwin: Markus Peloquin 27 | 28 | 29 | ## OpenCL kernels 30 | 31 | **FIXME**: this section is outdated. 32 | 33 | All current kernels are based on `scrypt`, originally by Colin Percival, 34 | updated by many others. 35 | 36 | * alexkarnew/alexkarold: Alexey Karimov LMqRcHdwnZtTMH6c2kWoxSoKM5KySfaP5C 37 | * bufius: Bufius VvvmmkYHKGtdr97JLyyZuJ3Th5ayungnjk 38 | * ckolivas: Con Kolivas 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ 39 | * psw: Pavel Semjanov LP6GRFvgoMxKA6AW4TVF668cNezEGZvEtr 40 | * zuikkis: Zuikkis LeXck7EYgxyjw13zNDxZFmmgmWffFvhmSh 41 | 42 | 43 | ## Testing, bug fixes, improvements 44 | 45 | * Michael Fiano 46 | * Gabriel Devenyi 47 | * Benjamin Herrenschmidt 48 | * Joe4782 49 | * gacheson 50 | * Drogean 51 | * Wolf` 52 | * tonobitc 53 | * Perry Huang 54 | * Joseph Bruggeman 55 | * Badman74 56 | * djm34 57 | 58 | ...and many others. See: 59 | 60 | * [sgminer-dev/sgminer](https://github.com/sgminer-dev/sgminer/graphs/contributors) 61 | 62 | ## Legacy 63 | 64 | * Original CPU mining software: Jeff Garzik 65 | 66 | ## Sponsors and acknowledgments 67 | 68 | * nicehash.com - sponsored adding/merging many additional algorithms including X11 and Keccak, stratum extranonce 69 | -------------------------------------------------------------------------------- /submodules/jansson/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | -------------------------------------------------------------------------------- /submodules/jansson/test/suites/api/test_number.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Petri Lehtinen 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | */ 7 | 8 | #include 9 | #include 10 | #include "util.h" 11 | 12 | #ifdef INFINITY 13 | // This test triggers "warning C4756: overflow in constant arithmetic" 14 | // in Visual Studio. This warning is triggered here by design, so disable it. 15 | // (This can only be done on function level so we keep these tests separate) 16 | #ifdef _MSC_VER 17 | #pragma warning(push) 18 | #pragma warning (disable: 4756) 19 | #endif 20 | static void test_inifity() 21 | { 22 | json_t *real = json_real(INFINITY); 23 | if (real != NULL) 24 | fail("could construct a real from Inf"); 25 | 26 | real = json_real(1.0); 27 | if (json_real_set(real, INFINITY) != -1) 28 | fail("could set a real to Inf"); 29 | 30 | if (json_real_value(real) != 1.0) 31 | fail("real value changed unexpectedly"); 32 | 33 | json_decref(real); 34 | #ifdef _MSC_VER 35 | #pragma warning(pop) 36 | #endif 37 | } 38 | #endif // INFINITY 39 | 40 | static void run_tests() 41 | { 42 | json_t *integer, *real; 43 | json_int_t i; 44 | double d; 45 | 46 | integer = json_integer(5); 47 | real = json_real(100.1); 48 | 49 | if(!integer) 50 | fail("unable to create integer"); 51 | if(!real) 52 | fail("unable to create real"); 53 | 54 | i = json_integer_value(integer); 55 | if(i != 5) 56 | fail("wrong integer value"); 57 | 58 | d = json_real_value(real); 59 | if(d != 100.1) 60 | fail("wrong real value"); 61 | 62 | d = json_number_value(integer); 63 | if(d != 5.0) 64 | fail("wrong number value"); 65 | d = json_number_value(real); 66 | if(d != 100.1) 67 | fail("wrong number value"); 68 | 69 | json_decref(integer); 70 | json_decref(real); 71 | 72 | #ifdef NAN 73 | real = json_real(NAN); 74 | if(real != NULL) 75 | fail("could construct a real from NaN"); 76 | 77 | real = json_real(1.0); 78 | if(json_real_set(real, NAN) != -1) 79 | fail("could set a real to NaN"); 80 | 81 | if(json_real_value(real) != 1.0) 82 | fail("real value changed unexpectedly"); 83 | 84 | json_decref(real); 85 | #endif 86 | 87 | #ifdef INFINITY 88 | test_inifity(); 89 | #endif 90 | } 91 | -------------------------------------------------------------------------------- /m4/signal_h.m4: -------------------------------------------------------------------------------- 1 | # signal_h.m4 serial 12 2 | dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_SIGNAL_H], 8 | [ 9 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 10 | gl_NEXT_HEADERS([signal.h]) 11 | 12 | # AIX declares sig_atomic_t to already include volatile, and C89 compilers 13 | # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. 14 | AC_CHECK_TYPE([volatile sig_atomic_t], [], 15 | [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ 16 | #include 17 | ]]) 18 | 19 | AC_REQUIRE([AC_TYPE_UID_T]) 20 | 21 | dnl Persuade glibc to define sighandler_t. 22 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 23 | AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ 24 | #include 25 | ]]) 26 | 27 | dnl Check for declarations of anything we want to poison if the 28 | dnl corresponding gnulib module is not in use. 29 | gl_WARN_ON_USE_PREPARE([[#include 30 | ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember 31 | sigpending sigprocmask]) 32 | ]) 33 | 34 | AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], 35 | [ 36 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 37 | AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) 38 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) 39 | dnl Define it also as a C macro, for the benefit of the unit tests. 40 | gl_MODULE_INDICATOR_FOR_TESTS([$1]) 41 | ]) 42 | 43 | AC_DEFUN([gl_SIGNAL_H_DEFAULTS], 44 | [ 45 | GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) 46 | GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) 47 | GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) 48 | dnl Assume proper GNU behavior unless another module says otherwise. 49 | HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) 50 | HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) 51 | HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) 52 | HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) 53 | HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; 54 | AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) 55 | HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; 56 | AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) 57 | HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) 58 | ]) 59 | -------------------------------------------------------------------------------- /example.conf: -------------------------------------------------------------------------------- 1 | { 2 | "pools": [ 3 | { 4 | "name":"Testpool X11", 5 | "url": "stratum+tcp://url1:4440", 6 | "user": "user", 7 | "pass": "x", 8 | "priority": "1", 9 | "profile": "x11" 10 | }, 11 | { 12 | "name":"Testpool Scrypt", 13 | "url": "stratum+tcp://url2:3339", 14 | "user": "user", 15 | "pass": "x", 16 | "priority": "2", 17 | "profile": "scrypt" 18 | }, 19 | { 20 | "name":"Testpool X11 with other profile", 21 | "url": "stratum+tcp://url3:4440", 22 | "user": "user", 23 | "pass": "x", 24 | "priority": "0", 25 | "profile": "x11test" 26 | }, 27 | { 28 | "name":"Testpool Using default profile", 29 | "url": "stratum+tcp://url4:3333", 30 | "user": "user", 31 | "pass": "x" 32 | } 33 | ], 34 | "profiles": [ 35 | { 36 | "name": "x11", 37 | "algorithm": "darkcoin-mod", 38 | "intensity": "19", 39 | "thread-concurrency": "10696,8192", 40 | "worksize": "128", 41 | "gpu-engine": "1100", 42 | "gpu-threads": "2", 43 | "gpu-fan": "75" 44 | }, 45 | { 46 | "name": "scrypt", 47 | "algorithm": "ckolivas", 48 | "lookup-gap": "2", 49 | "intensity": "19,13", 50 | "thread-concurrency": "19656,8192", 51 | "worksize": "256", 52 | "gpu-engine": "1000,1065", 53 | "gpu-memclock": "1500", 54 | "gpu-threads": "1,2", 55 | "gpu-fan": "85", 56 | "gpu-powertune": "20" 57 | }, 58 | { 59 | "name": "x11test", 60 | "algorithm": "darkcoin-mod", 61 | "device": "1", 62 | "intensity": "19", 63 | "thread-concurrency": "10696,8192", 64 | "worksize": "512", 65 | "gpu-engine": "1100", 66 | "gpu-threads": "2", 67 | "gpu-fan": "75" 68 | } 69 | ], 70 | "failover-only": true, 71 | "default-profile": "scrypt", 72 | "temp-cutoff": "95,95", 73 | "temp-overheat": "90,90", 74 | "temp-target": "80,80", 75 | "gpu-memdiff": "0,0", 76 | "shares": "0", 77 | "kernel-path": "/usr/local/bin", 78 | "api-allow": "W:127.0.0.1", 79 | "api-listen": true, 80 | "api-mcast-port": "4028", 81 | "api-port": "4028", 82 | "expiry": "1", 83 | "failover-switch-delay": "60", 84 | "gpu-dyninterval": "7", 85 | "gpu-platform": "-1", 86 | "hamsi-expand-big": "4", 87 | "log": "5", 88 | "no-pool-disable": true, 89 | "no-client-reconnect": true, 90 | "queue": "0", 91 | "scan-time": "1", 92 | "tcp-keepalive": "30", 93 | "temp-hysteresis": "3" 94 | } -------------------------------------------------------------------------------- /ocl/binary_kernel.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "miner.h" 5 | #include "binary_kernel.h" 6 | 7 | cl_program load_opencl_binary_kernel(build_kernel_data *data) 8 | { 9 | FILE *binaryfile = NULL; 10 | size_t binary_size; 11 | char **binaries = (char **)calloc(MAX_GPUDEVICES * 4, sizeof(char *)); 12 | cl_int status; 13 | cl_program program; 14 | cl_program ret = NULL; 15 | 16 | binaryfile = fopen(data->binary_filename, "rb"); 17 | if (!binaryfile) { 18 | applog(LOG_DEBUG, "No binary found, generating from source"); 19 | goto out; 20 | } else { 21 | struct stat binary_stat; 22 | 23 | if (unlikely(stat(data->binary_filename, &binary_stat))) { 24 | applog(LOG_DEBUG, "Unable to stat binary, generating from source"); 25 | goto out; 26 | } 27 | if (!binary_stat.st_size) 28 | goto out; 29 | 30 | binary_size = binary_stat.st_size; 31 | binaries[0] = (char *)calloc(binary_size, 1); 32 | if (unlikely(!binaries[0])) { 33 | quit(1, "Unable to calloc binaries"); 34 | } 35 | 36 | if (fread(binaries[0], 1, binary_size, binaryfile) != binary_size) { 37 | applog(LOG_ERR, "Unable to fread binary"); 38 | goto out; 39 | } 40 | 41 | program = clCreateProgramWithBinary(data->context, 1, data->device, &binary_size, (const unsigned char **)binaries, &status, NULL); 42 | if (status != CL_SUCCESS) { 43 | applog(LOG_ERR, "Error %d: Loading Binary into cl_program (clCreateProgramWithBinary)", status); 44 | goto out; 45 | } 46 | 47 | applog(LOG_DEBUG, "Loaded binary image %s", data->binary_filename); 48 | 49 | /* create a cl program executable for all the devices specified */ 50 | status = clBuildProgram(program, 1, data->device, NULL, NULL, NULL); 51 | if (status != CL_SUCCESS) { 52 | applog(LOG_ERR, "Error %d: Building Program (clBuildProgram)", status); 53 | size_t log_size; 54 | status = clGetProgramBuildInfo(program, *data->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); 55 | 56 | char *sz_log = (char *)malloc(log_size + 1); 57 | status = clGetProgramBuildInfo(program, *data->device, CL_PROGRAM_BUILD_LOG, log_size, sz_log, NULL); 58 | sz_log[log_size] = '\0'; 59 | applog(LOG_ERR, "%s", sz_log); 60 | free(sz_log); 61 | clReleaseProgram(program); 62 | goto out; 63 | } 64 | 65 | ret = program; 66 | } 67 | out: 68 | if (binaryfile) fclose(binaryfile); 69 | if (binaries[0]) free(binaries[0]); 70 | if (binaries) free(binaries); 71 | return ret; 72 | } 73 | -------------------------------------------------------------------------------- /sha2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FIPS 180-2 SHA-224/256/384/512 implementation 3 | * Last update: 02/02/2007 4 | * Issue date: 04/30/2005 5 | * 6 | * Copyright (C) 2013, Con Kolivas 7 | * Copyright (C) 2005, 2007 Olivier Gay 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 3. Neither the name of the project nor the names of its contributors 19 | * may be used to endorse or promote products derived from this software 20 | * without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 23 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | */ 34 | 35 | #include "config.h" 36 | #include "miner.h" 37 | 38 | #ifndef SHA2_H 39 | #define SHA2_H 40 | 41 | #define SHA256_DIGEST_SIZE ( 256 / 8) 42 | #define SHA256_BLOCK_SIZE ( 512 / 8) 43 | 44 | typedef struct { 45 | unsigned int tot_len; 46 | unsigned int len; 47 | unsigned char block[2 * SHA256_BLOCK_SIZE]; 48 | uint32_t h[8]; 49 | } sha256_ctx; 50 | 51 | void sha256_init(sha256_ctx * ctx); 52 | void sha256_update(sha256_ctx *ctx, const unsigned char *message, 53 | unsigned int len); 54 | void sha256_final(sha256_ctx *ctx, unsigned char *digest); 55 | void sha256(const unsigned char *message, unsigned int len, 56 | unsigned char *digest); 57 | 58 | #endif /* !SHA2_H */ 59 | -------------------------------------------------------------------------------- /logging.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGGING_H 2 | #define LOGGING_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef HAVE_SYSLOG_H 8 | #include 9 | #else 10 | enum { 11 | LOG_ERR, 12 | LOG_WARNING, 13 | LOG_NOTICE, 14 | LOG_INFO, 15 | LOG_DEBUG, 16 | }; 17 | #endif 18 | 19 | /* debug flags */ 20 | extern bool opt_debug; 21 | extern bool opt_debug_console; 22 | extern bool opt_verbose; 23 | extern bool opt_realquiet; 24 | extern bool want_per_device_stats; 25 | 26 | /* global log_level, messages with lower or equal prio are logged */ 27 | extern int opt_log_level; 28 | 29 | extern int opt_log_show_date; 30 | 31 | #define LOGBUFSIZ 512 32 | 33 | void applog(int prio, const char* fmt, ...); 34 | void applogsiz(int prio, int size, const char* fmt, ...); 35 | void vapplogsiz(int prio, int size, const char* fmt, va_list args); 36 | 37 | extern void _applog(int prio, const char *str, bool force); 38 | 39 | #define IN_FMT_FFL " in %s %s():%d" 40 | 41 | #define forcelog(prio, fmt, ...) do { \ 42 | if (opt_debug || prio != LOG_DEBUG) { \ 43 | char tmp42[LOGBUFSIZ]; \ 44 | snprintf(tmp42, sizeof(tmp42), fmt, ##__VA_ARGS__); \ 45 | _applog(prio, tmp42, true); \ 46 | } \ 47 | } while (0) 48 | 49 | #define quit(status, fmt, ...) do { \ 50 | if (fmt) { \ 51 | char tmp42[LOGBUFSIZ]; \ 52 | snprintf(tmp42, sizeof(tmp42), fmt, ##__VA_ARGS__); \ 53 | _applog(LOG_ERR, tmp42, true); \ 54 | } \ 55 | _quit(status); \ 56 | } while (0) 57 | 58 | #define quithere(status, fmt, ...) do { \ 59 | if (fmt) { \ 60 | char tmp42[LOGBUFSIZ]; \ 61 | snprintf(tmp42, sizeof(tmp42), fmt IN_FMT_FFL, \ 62 | ##__VA_ARGS__, __FILE__, __func__, __LINE__); \ 63 | _applog(LOG_ERR, tmp42, true); \ 64 | } \ 65 | _quit(status); \ 66 | } while (0) 67 | 68 | #define quitfrom(status, _file, _func, _line, fmt, ...) do { \ 69 | if (fmt) { \ 70 | char tmp42[LOGBUFSIZ]; \ 71 | snprintf(tmp42, sizeof(tmp42), fmt IN_FMT_FFL, \ 72 | ##__VA_ARGS__, _file, _func, _line); \ 73 | _applog(LOG_ERR, tmp42, true); \ 74 | } \ 75 | _quit(status); \ 76 | } while (0) 77 | 78 | #ifdef HAVE_CURSES 79 | 80 | #define wlog(fmt, ...) do { \ 81 | char tmp42[LOGBUFSIZ]; \ 82 | snprintf(tmp42, sizeof(tmp42), fmt, ##__VA_ARGS__); \ 83 | _wlog(tmp42); \ 84 | } while (0) 85 | 86 | #define wlogprint(fmt, ...) do { \ 87 | char tmp42[LOGBUFSIZ]; \ 88 | snprintf(tmp42, sizeof(tmp42), fmt, ##__VA_ARGS__); \ 89 | _wlogprint(tmp42); \ 90 | } while (0) 91 | 92 | #endif 93 | 94 | extern void __debug(const char *filename, const char *fmt, ...); 95 | 96 | 97 | #endif /* LOGGING_H */ 98 | -------------------------------------------------------------------------------- /api-example.php: -------------------------------------------------------------------------------- 1 | 0) 71 | { 72 | $items = explode(',', $obj); 73 | $item = $items[0]; 74 | $id = explode('=', $items[0], 2); 75 | if (count($id) == 1 or !ctype_digit($id[1])) 76 | $name = $id[0]; 77 | else 78 | $name = $id[0].$id[1]; 79 | 80 | if (strlen($name) == 0) 81 | $name = 'null'; 82 | 83 | if (isset($data[$name])) 84 | { 85 | $num = 1; 86 | while (isset($data[$name.$num])) 87 | $num++; 88 | $name .= $num; 89 | } 90 | 91 | $counter = 0; 92 | foreach ($items as $item) 93 | { 94 | $id = explode('=', $item, 2); 95 | if (count($id) == 2) 96 | $data[$name][$id[0]] = $id[1]; 97 | else 98 | $data[$name][$counter] = $id[0]; 99 | 100 | $counter++; 101 | } 102 | } 103 | } 104 | 105 | return $data; 106 | } 107 | 108 | return null; 109 | } 110 | # 111 | if (isset($argv) and count($argv) > 1) 112 | $r = request($argv[1]); 113 | else 114 | $r = request('summary'); 115 | # 116 | echo print_r($r, true)."\n"; 117 | # 118 | ?> 119 | --------------------------------------------------------------------------------