fix reveng for all platforms else than WIN32
This commit is contained in:
@@ -67,7 +67,7 @@ main(int argc, char *argv[]) {
|
||||
setbmp();
|
||||
if (BMP_BIT != bmpbit || BMP_SUB != bmpsub) {
|
||||
fprintf(stderr, "reveng: configuration fault. Update "
|
||||
"config.h with these definitions and "
|
||||
"reveng/config.h with these definitions and "
|
||||
"recompile:\n"
|
||||
"\t#define BMP_BIT %d\n"
|
||||
"\t#define BMP_SUB %d\n",
|
||||
|
||||
@@ -57,33 +57,43 @@
|
||||
|
||||
/* #define ALWPCK 1 */
|
||||
|
||||
/* Define PRESETS to compile CRC RevEng with the preset models from the
|
||||
/* #define PRESETS 1
|
||||
* Define PRESETS to compile CRC RevEng with the preset models from the
|
||||
* CRC Catalogue. This implies BMPMACRO and so makes the code platform-
|
||||
* specific.
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define PRESETS 1 //
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros defining the size of a bmp_t.
|
||||
/* #define BMP_BIT 32
|
||||
* Macros defining the size of a bmp_t.
|
||||
* Their values only matter if PRESETS and/or BMPMACRO are defined, in
|
||||
* which case edit the macros below to suit your architecture.
|
||||
* Otherwise, BMP_BIT and BMP_SUB will be redefined as aliases of bmpbit
|
||||
* and bmpsub, global objects initialised at run time.
|
||||
*/
|
||||
|
||||
/* Size in bits of a bmp_t. Not necessarily a power of two. */
|
||||
|
||||
#define BMP_BIT 32
|
||||
|
||||
/* The highest power of two that is strictly less than BMP_BIT.
|
||||
/* #define BMP_SUB 16
|
||||
* The highest power of two that is strictly less than BMP_BIT.
|
||||
* Initialises the index of a binary search for set bits in a bmp_t.
|
||||
*/
|
||||
|
||||
|
||||
#if UINTMAX_MAX == UINT64_MAX
|
||||
// 64-bit
|
||||
#define PRESETS 1
|
||||
#define BMP_BIT 64
|
||||
#define BMP_SUB 32
|
||||
|
||||
//#elif INTPTR_MAX == INT32_MAX
|
||||
#elif UINTMAX_MAX == UINT32_MAX
|
||||
// 32-bit
|
||||
#define PRESETS 1
|
||||
#define BMP_BIT 32
|
||||
#define BMP_SUB 16
|
||||
|
||||
#else
|
||||
#error Cannot determine automatically REVENG PRESETS Macros for your platform, you need to set them manually
|
||||
#endif
|
||||
|
||||
/*****************************************
|
||||
* *
|
||||
* End of user configuration options *
|
||||
|
||||
Reference in New Issue
Block a user