[misc] move hash definitions to rufus.h

* Also always add an extra NUL to read_file(), some additional macros in missing.h
  and fix some warnings in process.c.
This commit is contained in:
Pete Batard 2024-03-27 19:02:24 +00:00
parent d3f78c4e01
commit a59389e1e1
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 67 additions and 54 deletions

View file

@ -31,14 +31,14 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#define LO_ALIGN_X_TO_Y(x, y) (((x) / (y)) * (y))
#define HI_ALIGN_X_TO_Y(x, y) ((((x) + (y) - 1) / (y)) * (y))
#if defined(__GNUC__)
#define ALIGNED(m) __attribute__ ((__aligned__(m)))
#elif defined(_MSC_VER)
#define ALIGNED(m) __declspec(align(m))
#endif
#define IS_HEXASCII(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'))
/*
* Prefetch 64 bytes at address m, for read-only operation