summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-15 22:36:49 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-15 22:36:49 +0000
commitb470173705a93b3064407a5112843095b3b67d9a (patch)
tree20adfa26aaa0fef5f1aa90f84185b7fb2047c36f
parent1507d20a56b6c7cf39f8e19a1dac8d610cd1de3d (diff)
downloadATCD-b470173705a93b3064407a5112843095b3b67d9a.tar.gz
ChangeLogTag: Wed Sep 15 15:32:59 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r--ChangeLog16
-rw-r--r--ace/OS_NS_stdio.h8
-rw-r--r--ace/OS_NS_stdio.inl8
-rw-r--r--configure.ac2
4 files changed, 24 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 6381d169bed..f082c1e7e08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Wed Sep 15 15:32:59 2004 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * configure.ac:
+
+ Added checks for fgetws and fputws.
+
+ * ace/OS_NS_stdio.h:
+ * ace/OS_NS_stdio.inl:
+
+ Added feature test macros ACE_LACKS_FGETWS and ACE_LACKS_FPUTWS
+ and disable wide character versions of fgets and fputs if they
+ are not present. Thanks to Johnny Willemsen for reporting this
+ bug.
+
Wed Sep 15 15:17:39 2004 J.T. Conklin <jtc@acorntoolworks.com>
* ace/OS_NS_string.h:
@@ -5,7 +19,7 @@ Wed Sep 15 15:17:39 2004 J.T. Conklin <jtc@acorntoolworks.com>
Changed preprocessor conditional for the declaration of the wide
character version of strtok_r_emulation() to use ACE_WCHAR and
ACE_LACKS_WCSTOK instead of ACE_HAS_REENTRANT_FUNCTIONS. Thanks
- to Johnny Willemsen for finding this bug.
+ to Johnny Willemsen for reporting this bug.
Wed Sep 15 11:41:53 2004 Douglas C. Schmidt <schmidt@cs.wustl.edu>
diff --git a/ace/OS_NS_stdio.h b/ace/OS_NS_stdio.h
index eb242cc7bda..e1720e7f582 100644
--- a/ace/OS_NS_stdio.h
+++ b/ace/OS_NS_stdio.h
@@ -179,10 +179,10 @@ namespace ACE_OS {
ACE_NAMESPACE_INLINE_FUNCTION
char *fgets (char *buf, int size, FILE *fp);
-# if defined (ACE_HAS_WCHAR)
+# if defined (ACE_HAS_WCHAR) && !defined(ACE_LACKS_FGETWS)
ACE_NAMESPACE_INLINE_FUNCTION
wchar_t *fgets (wchar_t *buf, int size, FILE *fp);
-# endif /* ACE_HAS_WCHAR */
+# endif /* ACE_HAS_WCHAR && !ACE_LACKS_FGETWS */
//@{ @name A set of wrappers for file locks.
@@ -302,11 +302,11 @@ namespace ACE_OS {
int fputs (const char *s,
FILE *stream);
-# if defined (ACE_HAS_WCHAR)
+# if defined (ACE_HAS_WCHAR) && !defined(ACE_LACKS_FPUTWS)
ACE_NAMESPACE_INLINE_FUNCTION
int fputs (const wchar_t *s,
FILE *stream);
-#endif /* ACE_HAS_WCHAR */
+# endif /* ACE_HAS_WCHAR && !ACE_LACKS_FPUTWS */
ACE_NAMESPACE_INLINE_FUNCTION
size_t fread (void *ptr,
diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl
index 958b4ca806b..0d1459b64f7 100644
--- a/ace/OS_NS_stdio.inl
+++ b/ace/OS_NS_stdio.inl
@@ -709,14 +709,14 @@ ACE_OS::fgets (char *buf, int size, FILE *fp)
ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fgets (buf, size, fp), char *, 0);
}
-#if defined (ACE_HAS_WCHAR)
+#if defined (ACE_HAS_WCHAR) && !defined(ACE_LACKS_FGETWS)
ACE_INLINE wchar_t *
ACE_OS::fgets (wchar_t *buf, int size, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fgets");
ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fgetws (buf, size, fp), wchar_t *, 0);
}
-#endif /* ACE_HAS_WCHAR */
+#endif /* ACE_HAS_WCHAR && !ACE_LACKS_FGETWS */
#if !defined (ACE_WIN32)
// Win32 implementation of fopen () is in OS_NS_stdio.cpp.
@@ -749,14 +749,14 @@ ACE_OS::fputs (const char *s, FILE *stream)
ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fputs (s, stream), int, -1);
}
-#if defined (ACE_HAS_WCHAR)
+#if defined (ACE_HAS_WCHAR) && !defined(ACE_LACKS_FPUTWS)
ACE_INLINE int
ACE_OS::fputs (const wchar_t *s, FILE *stream)
{
ACE_OS_TRACE ("ACE_OS::fputs");
ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fputws (s, stream), int, -1);
}
-#endif /* ACE_HAS_WCHAR */
+#endif /* ACE_HAS_WCHAR && !ACE_LACKS_FPUTWS */
ACE_INLINE size_t
ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp)
diff --git a/configure.ac b/configure.ac
index 023bafb52d8..a6b69ea6be6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3596,7 +3596,7 @@ ACE_CHECK_LACKS_FUNCS(sbrk)
ACE_CHECK_HAS_FUNCS(vfwprintf vswprintf)
-ACE_CHECK_LACKS_FUNCS(itow towlower towupper wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcsicmp wcslen wcsncat wcsncmp wcsncpy wcsnicmp wcspbrk wcsrchr wcsspn wcsstr wcstod wcstok wcstol wcstoul)
+ACE_CHECK_LACKS_FUNCS(fgetws fputws itow towlower towupper wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcsicmp wcslen wcsncat wcsncmp wcsncpy wcsnicmp wcspbrk wcsrchr wcsspn wcsstr wcstod wcstok wcstol wcstoul)
if test "$ac_cv_func_wcstok" = yes; then
dnl The wcstok() function varies with standards. Check which one we have.