[Chapel Merge] Change c2chapel record generation idiom

Branch: refs/heads/main
Revision: 490a136
Author: bmcdonald3
Log Message:

Merge pull request #18355 from bmcdonald3/c2-struct

Change c2chapel record generation idiom

[ reviewed by @ronawho ]

While running Arrow/Parquet code in Chapel that was generated by c2chapel, it was noticed that it would only compile when using the LLVM backend and not with CHPL_LLVM=none. This was due to some structs in the Arrow headers being declared as struct foo { ... } instead of typedef struct _foo { ... } foo.

To fix this, this PR changes records generated by c2chapel to be of the form extern "struct foo" record foo { ... }, instead of just extern record foo { ... }.

Motivated by and more information: https://github.com/Cray/chapel-private/issues/2433

Modified Files:
M tools/c2chapel/c2chapel.py

M tools/c2chapel/test/arrayDecl.chpl
M tools/c2chapel/test/chapelKeywords.chpl
M tools/c2chapel/test/enum.chpl
M tools/c2chapel/test/fileGlobals.chpl
M tools/c2chapel/test/fnPointers.chpl
M tools/c2chapel/test/gnuTest.chpl
M tools/c2chapel/test/miscTypedef.chpl
M tools/c2chapel/test/nestedStruct.chpl
M tools/c2chapel/test/opaqueStruct.chpl
M tools/c2chapel/test/simpleRecords.chpl

Compare: https://github.com/chapel-lang/chapel/compare/bf2bdeae307d...490a136a46e0