diff options
| author | Eli Zaretskii | 2012-10-01 13:37:37 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-01 13:37:37 +0200 |
| commit | 2d7d1608381a4c14822e50ae42e2a6d748842cc3 (patch) | |
| tree | b22ef7adf83c2aaf47cd7c6439a6e735f6b58551 /src/ralloc.c | |
| parent | 7692b36bc6557b20f966801e3db346d8a166d32e (diff) | |
| download | emacs-2d7d1608381a4c14822e50ae42e2a6d748842cc3.tar.gz emacs-2d7d1608381a4c14822e50ae42e2a6d748842cc3.zip | |
Clean up the Windows x64 changes.
nt/preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of
'void *', for pointer arithmetics.
(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all
macro arguments in parentheses.
src/unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
(RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
(RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
as the previous version used 'void *'.
src/ralloc.c (ROUNDUP): Fix last change.
(MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
'size_t'.
Fixes: debbugs:12544
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 9422215b54f..e4a8fe9c6da 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -92,11 +92,11 @@ static int extra_bytes; | |||
| 92 | by changing the definition of PAGE. */ | 92 | by changing the definition of PAGE. */ |
| 93 | #define PAGE (getpagesize ()) | 93 | #define PAGE (getpagesize ()) |
| 94 | #define ROUNDUP(size) (((size_t) (size) + page_size - 1) \ | 94 | #define ROUNDUP(size) (((size_t) (size) + page_size - 1) \ |
| 95 | & ~((size_t)page_size - 1)) | 95 | & ~((size_t)(page_size - 1))) |
| 96 | 96 | ||
| 97 | #define MEM_ALIGN sizeof (double) | 97 | #define MEM_ALIGN sizeof (double) |
| 98 | #define MEM_ROUNDUP(addr) (((size_t)(addr) + MEM_ALIGN - 1) \ | 98 | #define MEM_ROUNDUP(addr) (((size_t)(addr) + MEM_ALIGN - 1) \ |
| 99 | & ~((size_t)MEM_ALIGN - 1)) | 99 | & ~(MEM_ALIGN - 1)) |
| 100 | 100 | ||
| 101 | /* The hook `malloc' uses for the function which gets more space | 101 | /* The hook `malloc' uses for the function which gets more space |
| 102 | from the system. */ | 102 | from the system. */ |