Commit cdc0e6c
authored
updated configuration for
Long story short: `ErlNapiSInt64` defined in `erl_drv_nif.h` becomes signed
32-bit integer when cross-compiling for an `armv7l` target on an `x86_64` host.
The old but gold `printf` debugging:
case SQLITE_INTEGER: {
int64_t value = sqlite3_column_int64(statement, i);
sqlite_int64 v = value;
printf("sqlite3_column_int64: int64_t %lld\r\n", value);
printf("sqlite3_column_int64: sqlite_int64 %lld\r\n", v);
printf("sizeof(ErlNapiSInt64): %ld\r\n", sizeof(ErlNapiSInt64));
return enif_make_int64(env, v);
}
Output:
sqlite3_column_int64: int64_t 20221010123504
sqlite3_column_int64: sqlite_int64 20221010123504
sizeof(ErlNapiSInt64): 4
Signed-off-by: Cocoa <i@uwucocoa.moe>armv7l-linux-gnueabihf (#302)1 parent 67786df commit cdc0e6c
2 files changed
+58
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
12 | 65 | | |
13 | 66 | | |
14 | 67 | | |
| |||
44 | 97 | | |
45 | 98 | | |
46 | 99 | | |
47 | | - | |
48 | 100 | | |
49 | 101 | | |
50 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
0 commit comments