#endif
#include <stdbool.h>
+#include <stdio.h>
#include "dataworks.h"
bool __dw_strcaseequ(const char* a, const char* b);
+bool __dw_lockfile(FILE* fp);
+bool __dw_unlockfile(FILE* fp);
#define __dw_xstr(x) #x
#define __dw_str(x) __dw_xstr(x)
#include <ctype.h>
#include <stdbool.h>
#include <string.h>
+#ifdef __MINGW32__
+#include <fileapi.h>
+#else
+#include <unistd.h>
+#endif
bool __dw_strcaseequ(const char* a, const char* b) {
if(strlen(a) != strlen(b)) return false;
}
return true;
}
+
+bool __dw_lockfile(FILE* fp){
+#ifdef __MINGW32__
+ OVERLAPPED overlap = {0};
+ LockFileEx(fp, LOCKFILE_EXCLUSIVE_LOCK, 0, MAXDWORD, MAXDWORD, &overlap);
+#else
+ lockf(fp, F_LOCK);
+#endif
+ return false;
+}
+
+bool __dw_unlockfile(FILE* fp){
+#ifdef __MINGW32__
+#else
+ lockf(fp, F_ULOCK);
+#endif
+ return false;
+}
$(MAKE) -C ./Client clean $(COMPILE_FLAGS)
$(MAKE) -C ./Document clean $(COMPILE_FLAGS)
-archive-prepare: no-doc
+archive-prepare: all
rm -f *.zip *.tar.gz
rm -rf dataworks-dist
mkdir -p dataworks-dist
mkdir -p dataworks-dist/Client
mkdir -p dataworks-dist/Library
+ mkdir -p dataworks-dist/Document
cp Library/*$(LIB_SUFFIX) dataworks-dist/Library/
cp Library/*.h dataworks-dist/Library/
cp Client/dataworks$(EXEC_SUFFIX) dataworks-dist/Client/
+ cp -rf Document/doc/html dataworks-dist/Document/html
archive-cleanup:
rm -rf dataworks-dist