From b49402fdb2504c17fe7f8032dc46ac1fa1dd1523 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 19 Nov 2019 12:27:04 +0100 Subject: local is a reserved word diff --git a/libdispatch/dcrc32.c b/libdispatch/dcrc32.c index 3878841..afb0820 100644 --- a/libdispatch/dcrc32.c +++ b/libdispatch/dcrc32.c @@ -73,7 +73,7 @@ UCAR /* Define some of the macros used here */ #define FAR #define ZEXPORT -#define local static +#define netcdf_local static #define OF(x) x #define uLong unsigned long #define uInt unsigned int @@ -99,24 +99,24 @@ UCAR # define BYFOUR #endif #ifdef BYFOUR - local unsigned long crc32_little OF((unsigned long, + netcdf_local unsigned long crc32_little OF((unsigned long, const unsigned char FAR *, z_size_t)); - local unsigned long crc32_big OF((unsigned long, + netcdf_local unsigned long crc32_big OF((unsigned long, const unsigned char FAR *, z_size_t)); # define TBLS 8 #else # define TBLS 1 #endif /* BYFOUR */ -local const z_crc_t FAR crc_table[TBLS][256]; +netcdf_local const z_crc_t FAR crc_table[TBLS][256]; #ifdef DYNAMIC_CRC_TABLE -local volatile int crc_table_empty = 1; -local z_crc_t FAR crc_table[TBLS][256]; -local void make_crc_table OF((void)); +netcdf_local volatile int crc_table_empty = 1; +netcdf_local z_crc_t FAR crc_table[TBLS][256]; +netcdf_local void make_crc_table OF((void)); #ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *)); + netcdf_local void write_table OF((FILE *, const z_crc_t FAR *)); #endif /* MAKECRCH */ /* Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: @@ -144,7 +144,7 @@ local void make_crc_table OF((void)); allow for word-at-a-time CRC calculation for both big-endian and little- endian machines, where a word is four bytes. */ -local void make_crc_table() +netcdf_local void make_crc_table() { z_crc_t c; int n, k; @@ -203,7 +203,7 @@ local void make_crc_table() if (out == NULL) return; fprintf(out, "/* dcrc32.h -- tables for rapid CRC calculation\n"); fprintf(out, " * Generated automatically by dcrc32.c\n */\n\n"); - fprintf(out, "local const z_crc_t FAR "); + fprintf(out, "netcdf_local const z_crc_t FAR "); fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); write_table(out, crc_table[0]); # ifdef BYFOUR @@ -221,7 +221,7 @@ local void make_crc_table() } #ifdef MAKECRCH -local void write_table(out, table) +netcdf_local void write_table(out, table) FILE *out; const z_crc_t FAR *table; { @@ -245,7 +245,7 @@ local void write_table(out, table) * This function can be used by asm versions of crc32() */ #if 0 /* Unused */ -local const z_crc_t FAR * ZEXPORT get_crc_table() +netcdf_local const z_crc_t FAR * ZEXPORT get_crc_table() { #ifdef DYNAMIC_CRC_TABLE if (crc_table_empty) @@ -260,7 +260,7 @@ local const z_crc_t FAR * ZEXPORT get_crc_table() #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 /* ========================================================================= */ -local unsigned long ZEXPORT crc32_z(crc, buf, len) +netcdf_local unsigned long ZEXPORT crc32_z(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; z_size_t len; @@ -325,7 +325,7 @@ NC_crc32(unsigned int crc, const void* buf, unsigned int len) #define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 /* ========================================================================= */ -local unsigned long crc32_little(crc, buf, len) +netcdf_local unsigned long crc32_little(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; z_size_t len; @@ -365,7 +365,7 @@ local unsigned long crc32_little(crc, buf, len) #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 /* ========================================================================= */ -local unsigned long crc32_big(crc, buf, len) +netcdf_local unsigned long crc32_big(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; z_size_t len; @@ -404,7 +404,7 @@ local unsigned long crc32_big(crc, buf, len) /* ========================================================================= */ #if 0 /* Unused */ -local unsigned long gf2_matrix_times(mat, vec) +netcdf_local unsigned long gf2_matrix_times(mat, vec) unsigned long *mat; unsigned long vec; { @@ -421,7 +421,7 @@ local unsigned long gf2_matrix_times(mat, vec) } /* ========================================================================= */ -local void gf2_matrix_square(square, mat) +netcdf_local void gf2_matrix_square(square, mat) unsigned long *square; unsigned long *mat; { @@ -433,7 +433,7 @@ local void gf2_matrix_square(square, mat) /* ========================================================================= */ -local uLong crc32_combine_(crc1, crc2, len2) +netcdf_local uLong crc32_combine_(crc1, crc2, len2) uLong crc1; uLong crc2; z_off64_t len2; @@ -489,7 +489,7 @@ local uLong crc32_combine_(crc1, crc2, len2) } /* ========================================================================= */ -local uLong ZEXPORT crc32_combine(crc1, crc2, len2) +netcdf_local uLong ZEXPORT crc32_combine(crc1, crc2, len2) uLong crc1; uLong crc2; z_off_t len2; @@ -497,7 +497,7 @@ local uLong ZEXPORT crc32_combine(crc1, crc2, len2) return crc32_combine_(crc1, crc2, len2); } -local uLong ZEXPORT crc32_combine64(crc1, crc2, len2) +netcdf_local uLong ZEXPORT crc32_combine64(crc1, crc2, len2) uLong crc1; uLong crc2; z_off64_t len2; diff --git a/libdispatch/dcrc32.h b/libdispatch/dcrc32.h old mode 100755 new mode 100644 index 9e0c778..8fc35df --- a/libdispatch/dcrc32.h +++ b/libdispatch/dcrc32.h @@ -2,7 +2,7 @@ * Generated automatically by crc32.c */ -local const z_crc_t FAR crc_table[TBLS][256] = +netcdf_local const z_crc_t FAR crc_table[TBLS][256] = { { 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, -- 2.30.2