Skip to content

Commit

Permalink
Fix C89 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Apr 9, 2021
1 parent f30a6ea commit d18170d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Modelica/Resources/C-Sources/ModelicaInternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
ModelicaInternal_getFullPath
*/

#if defined(__gnu_linux__) && !defined(NO_FILE_SYSTEM)
#define _GNU_SOURCE 1
#endif

#include "ModelicaInternal.h"
#include "ModelicaUtilities.h"

Expand Down
2 changes: 1 addition & 1 deletion Modelica/Resources/C-Sources/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static UINTMAX_T cast(LDOUBLE);
static UINTMAX_T myround(LDOUBLE);
static LDOUBLE mypow10(int);

//extern int errno;
/*extern int errno;*/

int
rpl_vsnprintf(char *str, size_t size, const char *format, va_list args)
Expand Down
3 changes: 3 additions & 0 deletions Modelica/Resources/C-Sources/zlib/gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
# ifdef __MVS__
# define NO_vsnprintf
# endif
# ifndef STDC99
# define NO_vsnprintf
# endif
#endif

/* unlike snprintf (which is required in C99), _snprintf does not guarantee
Expand Down

0 comments on commit d18170d

Please sign in to comment.