|
version 1.1, 2012/02/17 15:09:30
|
version 1.1.1.4, 2021/03/17 00:32:36
|
|
Line 1
|
Line 1
|
| /* |
/* |
| * A pre-compilation helper program to aid in the creation of rounding.h. |
* A pre-compilation helper program to aid in the creation of rounding.h. |
| * |
* |
| * Copyright (C) 2007-2009 Wayne Davison | * Copyright (C) 2007-2020 Wayne Davison |
| * |
* |
| * This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
|
Line 23
|
Line 23
|
| #define SIZEOF(x) ((long int)sizeof (x)) |
#define SIZEOF(x) ((long int)sizeof (x)) |
| |
|
| struct test { |
struct test { |
| union file_extras extras[ARRAY_LEN]; | union file_extras extras[ARRAY_LEN]; |
| struct file_struct file; | int64 test; |
| }; |
}; |
| |
|
| #define ACTUAL_SIZE SIZEOF(struct test) |
#define ACTUAL_SIZE SIZEOF(struct test) |
| #define EXPECTED_SIZE (SIZEOF(union file_extras) * ARRAY_LEN + SIZEOF(struct file_struct)) | #define EXPECTED_SIZE (SIZEOF(union file_extras) * ARRAY_LEN + SIZEOF(int64)) |
| |
|
| int main(UNUSED(int argc), UNUSED(char *argv[])) |
int main(UNUSED(int argc), UNUSED(char *argv[])) |
| { |
{ |
| static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)]; | static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)]; |
| test_array[0] = 0; | test_array[0] = 0; |
| return 0; | return 0; |
| } |
} |