Skip to content
Merged
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
10 changes: 6 additions & 4 deletions src/dotenv.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#include "dotenv.h"
#include <stdio.h>
#include <memory.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <stdbool.h>

#if (defined(_WIN32) || defined(_MSC_VER)) && !defined(__MINGW32__)
#if defined(_WIN32)

#include <string.h>
#if defined(_MSC_VER)
#define strtok_r strtok_s
#define strdup _strdup
#endif

int setenv(const char *name, const char *value, int overwrite) {
int errcode = 0;
Expand Down Expand Up @@ -190,4 +193,3 @@ int env_load(const char *path, bool overwrite)

return 0;
}