#define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
#endif
-#ifdef OSX
+#ifdef __APPLE__
typedef struct cpu_set
{
uint32_t count;
exit (-1); \
} else { \
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
- return (-1); \
+ return -1; \
} \
} \
}
exit (-1); \
} else { \
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
- return (-1); \
+ return -1; \
} \
} \
}
exit (-1); \
} else { \
log_error ("WARNING: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
- return (-1); \
+ return -1; \
} \
}
#define CL_VENDOR_NV "NVIDIA Corporation"
#define CL_VENDOR_POCL "The pocl project"
-#define VENDOR_ID_AMD (1 << 0)
-#define VENDOR_ID_APPLE (1 << 1)
-#define VENDOR_ID_INTEL_BEIGNET (1 << 2)
-#define VENDOR_ID_INTEL_SDK (1 << 3)
-#define VENDOR_ID_MESA (1 << 4)
-#define VENDOR_ID_NV (1 << 5)
-#define VENDOR_ID_POCL (1 << 6)
-#define VENDOR_ID_AMD_USE_INTEL (1 << 7)
-#define VENDOR_ID_GENERIC (1 << 31)
+#define VENDOR_ID_AMD (1u << 0)
+#define VENDOR_ID_APPLE (1u << 1)
+#define VENDOR_ID_INTEL_BEIGNET (1u << 2)
+#define VENDOR_ID_INTEL_SDK (1u << 3)
+#define VENDOR_ID_MESA (1u << 4)
+#define VENDOR_ID_NV (1u << 5)
+#define VENDOR_ID_POCL (1u << 6)
+#define VENDOR_ID_AMD_USE_INTEL (1u << 7)
+#define VENDOR_ID_GENERIC (1u << 31)
#define BLOCK_SIZE 64
int veracrypt_parse_hash_655331 (char *input_buf, uint input_len, hash_t *hash_buf);
int win8phone_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
+void naive_replace (char *s, const u8 key_char, const u8 replace_char);
+void naive_escape (char *s, size_t s_max, const u8 key_char, const u8 escape_char);
void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
void writeProgramBin (char *dst, u8 *binary, size_t binary_size);