aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/win32/init_file.c
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-02-11 15:04:07 +0100
committerDan Gudmundsson <[email protected]>2013-05-20 13:34:44 +0200
commitd9cb8383625bd06e0f2d9548b392f199e7949e24 (patch)
tree0c962cebe316ff9515cbd51d50091cccd229117d /erts/etc/win32/init_file.c
parent8d63da45b86b46d3107fd70e0e96825afe066da0 (diff)
downloadotp-d9cb8383625bd06e0f2d9548b392f199e7949e24.tar.gz
otp-d9cb8383625bd06e0f2d9548b392f199e7949e24.tar.bz2
otp-d9cb8383625bd06e0f2d9548b392f199e7949e24.zip
erts: Windows, use widechars for all paths during startup
To enable unicode paths as installation dir and allow unicode in arguments
Diffstat (limited to 'erts/etc/win32/init_file.c')
-rw-r--r--erts/etc/win32/init_file.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/erts/etc/win32/init_file.c b/erts/etc/win32/init_file.c
index 52f6c41d1d..d452afa65c 100644
--- a/erts/etc/win32/init_file.c
+++ b/erts/etc/win32/init_file.c
@@ -173,7 +173,7 @@ static void digout_key_value(char *line, char **key, char **value)
}
}
-InitFile *load_init_file(char *filename)
+InitFile *load_init_file(wchar_t *filename)
{
HANDLE infile;
InitFile *inif;
@@ -187,13 +187,13 @@ InitFile *load_init_file(char *filename)
int i;
- if ( (infile = CreateFile(filename,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL)) == INVALID_HANDLE_VALUE) {
+ if ( (infile = CreateFileW(filename,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == INVALID_HANDLE_VALUE) {
return NULL;
}
@@ -280,7 +280,7 @@ InitFile *load_init_file(char *filename)
return inif;
}
-int store_init_file(InitFile *inif, char *filename)
+int store_init_file(InitFile *inif, wchar_t *filename)
{
char *buff;
int size = 10;
@@ -297,13 +297,13 @@ int store_init_file(InitFile *inif, char *filename)
buff[num++] = (Char); \
} while(0)
- if ( (outfile = CreateFile(filename,
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL,
- CREATE_ALWAYS,
- FILE_ATTRIBUTE_NORMAL,
- NULL)) == INVALID_HANDLE_VALUE) {
+ if ( (outfile = CreateFileW(filename,
+ GENERIC_WRITE,
+ FILE_SHARE_WRITE,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == INVALID_HANDLE_VALUE) {
return INIT_FILE_OPEN_ERROR;
}
buff = ALLOC(size);