Changeset 35291


Ignore:
Timestamp:
2021-08-13T20:38:34+12:00 (3 years ago)
Author:
davidb
Message:

Updated syntax to work with newer C compilers (e.g., gcc v10)

Location:
main/trunk/greenstone2/build-src/packages/rtftohtml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/build-src/packages/rtftohtml/rtftohtml-gs.txt

    r2581 r35291  
    5555John McPherson ([email protected])
    5656June 2001.
     57
     58====
     59When compiling with gcc v10, the following struct definition:
     60
     61struct SSStruct {
     62        struct SDest SD;
     63        int alloc;
     64        int used;
     65        struct SSData *data;
     66} PNSave, FNSave;
     67
     68
     69in:
     70
     71  htmlout.h
     72
     73caused a multiply defined linking error.
     74
     75The syntax used in the header file seeks to defined the struct 'SSStruct'
     76and then introduce 2 global variables 'PNSave' and 'FNSave'.  It was
     77reasoned that this style of declaring a struct and then declaring global
     78variables of this type has probably been deprecated, then then officially
     79discontinued (by gcc v10).  Rather than spending time delving into what
     80is/isn't allowed in newer standards of C, the decision was made to
     81simply rewrite the code so the actual declaration of the global variables
     82was moved to htmlout.c
     83
     84David Bainbridge ([email protected])
     85August 2021
     86====
Note: See TracChangeset for help on using the changeset viewer.