Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compile for msvc
Browse files Browse the repository at this point in the history
alcomposer authored and ben-wes committed Oct 1, 2024
1 parent 6f39118 commit f8716e1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pdlua.c
Original file line number Diff line number Diff line change
@@ -32,15 +32,18 @@
#include <sys/types.h> // for open
#include <sys/stat.h> // for open
#ifdef _MSC_VER
#include <io.h>
#include <fcntl.h> // for open
#define read _read
#define close _close
#define ssize_t int
#define snprintf _snprintf
#include <io.h>
#include <fcntl.h> // for open
#ifndef PATH_MAX
#define PATH_MAX 1024 /* same with Mac OS X's syslimits.h */
#endif
#define read _read
#define close _close
#define ssize_t int
#define snprintf _snprintf
#else
#include <sys/fcntl.h> // for open
#include <unistd.h>
#include <sys/fcntl.h> // for open
#include <unistd.h>
#endif
/* we use Lua */
#include <lua.h>
@@ -180,9 +183,6 @@ void initialise_lua_state()
# define PDLUA_DEBUG3 PDLUA_DEBUG
#endif

EXTERN int sys_trytoopenone(const char *dir, const char *name, const char* ext,
char *dirresult, char **nameresult, unsigned int size, int bin);

// In plugdata we're linked statically and thus c_externdir is empty.
// So we pass a data directory to the setup function instead and store it here.
// ag: Renamed to pdlua_datadir since we also need this in vanilla when

0 comments on commit f8716e1

Please sign in to comment.