Skip to content

Commit

Permalink
ansi build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Aug 6, 2024
1 parent 697ccd8 commit d69325f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ccode/value.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include <stdbool.h>
#include <stdio.h>

#ifdef __STRICT_ANSI__
#define strdup(A) strcpy(calloc(strlen(A) + 1, sizeof(char)), A);
#endif

typedef struct _variable {
char* name;
char* value;
Expand Down
3 changes: 0 additions & 3 deletions src/include/value.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include <stdbool.h>
#include <string.h>
#ifdef __STRICT_ANSI__
#define strdup(A) strcpy(calloc(strlen(A) + 1, sizeof(char)), A);
#endif
char* get_value(char* name);
void set_value(char* name, char* value);
void set_value_readonly(char* name, char* value);
Expand Down

0 comments on commit d69325f

Please sign in to comment.