projects
/
fdkaac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
adbd1aa
)
win32: change _wfopen() -> wfsopen()
author
nu774
<honeycomb77@gmail.com>
Sun, 3 Feb 2013 03:11:13 +0000
(12:11 +0900)
committer
nu774
<honeycomb77@gmail.com>
Sun, 3 Feb 2013 03:11:13 +0000
(12:11 +0900)
src/compat_win32.c
patch
|
blob
|
blame
|
history
diff --git
a/src/compat_win32.c
b/src/compat_win32.c
index 23edd9170d5403f0a6f6025d1e934881cf7760ce..d65ea5032bd0b7ffd1c0a7a8b4a8abecc8b55d7f 100644
(file)
--- a/
src/compat_win32.c
+++ b/
src/compat_win32.c
@@
-15,6
+15,7
@@
#include <assert.h>
#include <io.h>
#include <fcntl.h>
#include <assert.h>
#include <io.h>
#include <fcntl.h>
+#include <share.h>
#include <sys/timeb.h>
#include "compat.h"
#define WIN32_LEAN_AND_MEAN
#include <sys/timeb.h>
#include "compat.h"
#define WIN32_LEAN_AND_MEAN
@@
-66,9
+67,12
@@
FILE *aacenc_fopen(const char *name, const char *mode)
fp = (mode[0] == 'r') ? stdin : stdout;
_setmode(_fileno(fp), _O_BINARY);
} else {
fp = (mode[0] == 'r') ? stdin : stdout;
_setmode(_fileno(fp), _O_BINARY);
} else {
+ int share = _SH_DENYRW;
+ if (strchr(mode, 'r') && !strchr(mode, '+'))
+ share = _SH_DENYWR;
codepage_decode_wchar(CP_UTF8, name, &wname);
codepage_decode_wchar(CP_UTF8, mode, &wmode);
codepage_decode_wchar(CP_UTF8, name, &wname);
codepage_decode_wchar(CP_UTF8, mode, &wmode);
- fp = _wf
open(wname, wmod
e);
+ fp = _wf
sopen(wname, wmode, shar
e);
free(wname);
free(wmode);
}
free(wname);
free(wmode);
}
This page took
0.011346 seconds
and
4
git commands to generate.