mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
The Sfio code uses its own _has_multibyte macro and that was not being disabled by AST_NOMULTIBYTE, so some of its multibyte code was still getting compiled in. This is easily fixed in sfhdr.h. But that exposed another issue: the Sfio stdio wrappers didn't know about the _has_multibyte macro. So this adds the necessary directives to keep their multibyte functions from compiling.
42 lines
1.8 KiB
C
42 lines
1.8 KiB
C
/***********************************************************************
|
|
* *
|
|
* This software is part of the ast package *
|
|
* Copyright (c) 1985-2011 AT&T Intellectual Property *
|
|
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
|
|
* and is licensed under the *
|
|
* Eclipse Public License, Version 1.0 *
|
|
* by AT&T Intellectual Property *
|
|
* *
|
|
* A copy of the License is available at *
|
|
* http://www.eclipse.org/org/documents/epl-v10.html *
|
|
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
|
|
* *
|
|
* Information and Software Systems Research *
|
|
* AT&T Research *
|
|
* Florham Park NJ *
|
|
* *
|
|
* Glenn Fowler <gsf@research.att.com> *
|
|
* David Korn <dgk@research.att.com> *
|
|
* Phong Vo <kpv@research.att.com> *
|
|
* *
|
|
***********************************************************************/
|
|
|
|
#include "stdhdr.h"
|
|
|
|
#if !_has_multibyte
|
|
|
|
NoN(fputws)
|
|
|
|
#else
|
|
|
|
int
|
|
fputws(const wchar_t* s, Sfio_t* f)
|
|
{
|
|
size_t n;
|
|
|
|
FWIDE(f, WEOF);
|
|
n = wcslen(s) * sizeof(wchar_t);
|
|
return (sfwrite(f, s, n) == n) ? 0 : -1;
|
|
}
|
|
|
|
#endif /* !_has_multibyte */
|