Upgrade CGNS, meson, and ninja by bmunguia · Pull Request #2531 · su2code/SU2 · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Short summary of the minimal requirements:
If you have these tools installed, you can create a configuration using the `meson.py` found in the root source code folder:

```
./meson.py build
./meson.py setup build
```

Use `ninja` to compile and install the code
Expand Down
4 changes: 2 additions & 2 deletions externals/cgns/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**********************************************************************
https://github.com/CGNS/CGNS/releases,
the source files for CGNS v4.2.0 are bundled and build directly into SU2
https://github.com/CGNS/CGNS/releases,
the source files for CGNS v4.5.0 are bundled and built directly into SU2

From the CGNS webpage:

Expand Down
3 changes: 3 additions & 0 deletions externals/cgns/adf/ADF_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ static char ADF_A_identification[] = "\300\250\243\251ADF Database Version A0201
/***********************************************************************
Includes
***********************************************************************/
#ifndef _WIN32
#define _POSIX_C_SOURCE 200112L
#endif
#include <stdio.h>
#include <errno.h>
#include <string.h>
Expand Down
3 changes: 3 additions & 0 deletions externals/cgns/adf/ADF_internals.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ bytes start end description range / format
/***********************************************************************
Includes
***********************************************************************/
#ifndef _WIN32
#define _POSIX_C_SOURCE 200112L
#endif
#include <sys/types.h>
#include <time.h>
#include <stdio.h>
Expand Down
6 changes: 3 additions & 3 deletions externals/cgns/adf/ADF_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ extern void ADFI_increment_array(
cgulong_t *element_offset,
int *error_return ) ;

extern void ADFI_is_block_in_core() ;
extern void ADFI_is_block_in_core(void) ;

extern void ADFI_little_endian_to_cray(
const char from_format,
Expand Down Expand Up @@ -591,7 +591,7 @@ extern void ADFI_read_data_translated(
char *data,
int *error_return ) ;

extern void ADFI_read_disk_block() ;
extern void ADFI_read_disk_block(void) ;

extern void ADFI_read_disk_pointer_from_disk(
const unsigned int file_index,
Expand Down Expand Up @@ -707,7 +707,7 @@ extern void ADFI_write_data_translated(
const char *data,
int *error_return ) ;

extern void ADFI_write_disk_block() ;
extern void ADFI_write_disk_block(void) ;

extern void ADFI_write_disk_pointer_2_disk(
const unsigned int file_index,
Expand Down
26 changes: 4 additions & 22 deletions externals/cgns/adfh/ADFH.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ freely, subject to the following restrictions:
/*-------------------------------------------------------------------
* HDF5 interface to ADF
*-------------------------------------------------------------------*/

#ifndef _WIN32
#define _POSIX_C_SOURCE 200112L
#endif
#include <stdio.h>
#include <string.h>
#include <math.h>
Expand Down Expand Up @@ -2180,33 +2182,13 @@ void ADFH_Database_Open(const char *name,
for (i = 0; buff[i]; i++)
buff[i] = TO_UPPER(buff[i]);

if (0 == strcmp(buff, "UNKNOWN")) {
if (ACCESS(name, 0))
mode = ADFH_MODE_NEW;
else if (ACCESS(name, 2))
mode = ADFH_MODE_RDO;
else
mode = ADFH_MODE_OLD;
}
else if (0 == strcmp(buff, "NEW")) {
if (!ACCESS(name, 0)) {
set_error(REQUESTED_NEW_FILE_EXISTS, err);
return;
}
if (0 == strcmp(buff, "NEW")) {
mode = ADFH_MODE_NEW;
}
else if (0 == strcmp(buff, "READ_ONLY")) {
if (ACCESS(name, 0)) {
set_error(REQUESTED_OLD_FILE_NOT_FOUND, err);
return;
}
mode = ADFH_MODE_RDO;
}
else if (0 == strcmp(buff, "OLD")) {
if (ACCESS(name, 0)) {
set_error(REQUESTED_OLD_FILE_NOT_FOUND, err);
return;
}
mode = ADFH_MODE_OLD;
}
else {
Expand Down
8 changes: 7 additions & 1 deletion externals/cgns/cg_hash_types.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

#define SIZEOF_LONG @SIZEOF_LONG@
#define SIZEOF_VOID_P @SIZEOF_VOID_P@
#if @BUILD64BIT@
typedef int64_t map_ssize_t;
typedef uint64_t map_usize_t;
#define SIZEOF_MAP_USIZE_T 8
#else
typedef int32_t map_ssize_t;
typedef uint32_t map_usize_t;
#define SIZEOF_MAP_USIZE_T 4
#endif
typedef char char_name[33];

#endif
#endif
47 changes: 44 additions & 3 deletions externals/cgns/cgns_error.c
Loading