a few less #ifdef's

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5955 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2009-03-28 09:47:26 +00:00
parent 49276c77c7
commit 501dc3c699
3 changed files with 26 additions and 47 deletions

View file

@ -74,8 +74,12 @@ FILE *my_fopen(const char *path, const char *mode);
#else
#define my_convert(x) (x)
#define my_convert_free(x)
#define FOPEN(a, b) fopen(a, b)
#define OPEN(a, b) open(a, b)
#endif
// round a value up to be a multiple of 512
@ -142,5 +146,13 @@ RM_DEFINE_FREEFUNC(close);
RM_DEFINE_FREEFUNC(CloseHandle);
RM_DEFINE_FREEFUNC(fclose);
RM_DEFINE_FREEFUNC(free);
RM_DEFINE_FREEFUNC(my_convert_free);
// Auto path conversion
#ifndef _WIN32
# define PATH_CONVERT(x) x = my_convert(x); MANAGE_WITH(x, my_convert_free);
#else
# define PATH_CONVERT(x)
#endif
#endif //_UTIL_H_