| 1926 | } |
| 1927 | |
| 1928 | int64 read_longint(int f) |
| 1929 | { |
| 1930 | #if SIZEOF_INT64 >= 8 |
| 1931 | char b[9]; |
| 1932 | #endif |
| 1933 | int32 num = read_int(f); |
| 1934 | |
| 1935 | if (num != (int32)0xffffffff) |
| 1936 | return num; |
| 1937 | |
| 1938 | #if SIZEOF_INT64 < 8 |
| 1939 | rprintf(FERROR, "Integer overflow: attempted 64-bit offset\n"); |
| 1940 | exit_cleanup(RERR_UNSUPPORTED); |
| 1941 | #else |
| 1942 | read_buf(f, b, 8); |
| 1943 | return IVAL(b,0) | (((int64)IVAL(b,4))<<32); |
| 1944 | #endif |
| 1945 | } |
| 1946 | |
| 1947 | /* Debugging note: this will be named read_buf_() when using an external zlib. */ |
| 1948 | void read_buf(int f, char *buf, size_t len) |
no test coverage detected