summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblythe%netscape.com <devnull@localhost>2002-02-08 22:15:06 +0000
committerblythe%netscape.com <devnull@localhost>2002-02-08 22:15:06 +0000
commit658c9a95a92f19f20f6278c7db5270015b10abe0 (patch)
treec13ac81a31cf2ddfee133b2d357a91c5b43e485d
parent8567274a90d686a5d32333e5309c65c5c269cf56 (diff)
downloadnspr-hg-658c9a95a92f19f20f6278c7db5270015b10abe0.tar.gz
DeleteFileA handled
-rw-r--r--pr/include/md/_win32_unicode.h8
-rw-r--r--pr/src/md/windows/w32unicode.c24
-rw-r--r--pr/src/md/windows/w95io.c2
3 files changed, 33 insertions, 1 deletions
diff --git a/pr/include/md/_win32_unicode.h b/pr/include/md/_win32_unicode.h
index 564a7ff2..bc433cb5 100644
--- a/pr/include/md/_win32_unicode.h
+++ b/pr/include/md/_win32_unicode.h
@@ -68,6 +68,7 @@ LPWSTR _PR_MD_A2W(LPCSTR inString, LPWSTR outWideString, int inWideStringChars);
* the linkage by prepending _imp_ ## functioname to make things happen.
* We need to provide our own linkage symbol for all this to work out.
*/
+
HANDLE
WINAPI
_MD_CreateFileA(
@@ -79,6 +80,13 @@ _MD_CreateFileA(
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
+
+BOOL
+WINAPI
+_MD_DeleteFileA(
+ LPCSTR lpFileName
+ );
+
#endif /* WINCE */
#endif /* nspr_win32_unicode_h___ */
diff --git a/pr/src/md/windows/w32unicode.c b/pr/src/md/windows/w32unicode.c
index 00db1770..9f6444d7 100644
--- a/pr/src/md/windows/w32unicode.c
+++ b/pr/src/md/windows/w32unicode.c
@@ -274,5 +274,29 @@ _MD_CreateFileA(
return retval;
}
+BOOL
+WINAPI
+_MD_DeleteFileA(
+ LPCSTR lpFileName
+ )
+{
+ BOOL retval = FALSE;
+ LPWSTR wideStr = NULL;
+ WCHAR widePath[MAX_PATH + 1];
+
+ wideStr = _PR_MD_A2W(lpFileName, widePath, sizeof(widePath) / sizeof(WCHAR));
+ if(NULL != wideStr)
+ {
+ retval = DeleteFileW(
+ wideStr
+ );
+ }
+ else
+ {
+ PR_SetError(PR_NAME_TOO_LONG_ERROR, 0);
+ }
+
+ return retval;
+}
#endif /* WINCE */ \ No newline at end of file
diff --git a/pr/src/md/windows/w95io.c b/pr/src/md/windows/w95io.c
index fed44ba1..06a5ae42 100644
--- a/pr/src/md/windows/w95io.c
+++ b/pr/src/md/windows/w95io.c
@@ -616,7 +616,7 @@ _PR_MD_DELETE(const char *name)
#if !defined(WINCE)
DeleteFile(name)
#else
- DeleteFileA(name)
+ _MD_DeleteFileA(name)
#endif
) {
return 0;