aboutsummaryrefslogtreecommitdiffstats
path: root/src/protos.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-08-21 19:11:21 +0000
committerWerner Koch <[email protected]>2020-08-21 19:11:21 +0000
commita68c1975bda47b0698b48761a62e95b371095e9a (patch)
treebc5220f82e0da76eaa44e3601773e04c4e470bac /src/protos.h
parentargparse: Handle a corner case of wrong ARGC. (diff)
downloadlibgpg-error-a68c1975bda47b0698b48761a62e95b371095e9a.tar.gz
libgpg-error-a68c1975bda47b0698b48761a62e95b371095e9a.zip
core,w32: Add UTF-8 support to gpgrt_fopen, gpgrt_mkdir and gpgrt_chdir.
* src/protos.h: New. * src/Makefile.am (libgpg_error_la_SOURCES): Add file. * src/gpgrt-int.h: Include protos.h. * src/sysutils.c (_gpgrt_mkdir) [W32]: Make UTF-8 aware. (_gpgrt_chdir) [W32]: Ditto. * src/w32-gettext.c: Include protos.h. (utf8_to_wchar): Allow for strings. (_gpgrt_utf8_to_wchar): New. (_gpgrt_free_wchar): New. * src/estream.c (map_w32_to_errno): Add more error codes. (_gpgrt_w32_set_errno): New. (any8bitchar) [W32]: New helper. (func_file_create) [W32]: Convert file name and use _wopen. -- GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/protos.h')
-rw-r--r--src/protos.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/protos.h b/src/protos.h
new file mode 100644
index 0000000..9a8d57a
--- /dev/null
+++ b/src/protos.h
@@ -0,0 +1,30 @@
+/* protos.h - Miscellaneous prototypes
+ * Copyright (C) 2020 g10 Code GmbH
+ *
+ * This file is part of libgpg-error.
+ *
+ * libgpg-error is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * libgpg-error is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1+
+ */
+
+#ifndef _GPGRT_PROTOS_H
+#define _GPGRT_PROTOS_H
+
+/*-- w32-gettext.c --*/
+wchar_t *_gpgrt_utf8_to_wchar (const char *string);
+void _gpgrt_free_wchar (wchar_t *wstring);
+void _gpgrt_w32_set_errno (int ec);
+
+
+#endif /*_GPGRT_PROTOS_H*/