Re: Deprecation of __USE_MINGW_ANSI_STDIO

Keith Marshall <[email protected]>
Newsgroups gmane.comp.gnu.mingw.user
Organization MinGW.org Project
Message-ID <[email protected]>
On 05/01/19 20:12, Keith Marshall wrote:
>> Did I miss some reasonable way of shutting up this warning and
>> switching to __MINGW_FEATURES__?
> 
> I don't think so, but then, I don't want this warning to be silenced --
> I want other project maintainers to take note of it, and to stop
> misusing this implementation-private feature test ...

While I don't approve of the bad downstream software engineering that
leads you to ask, and I'm not going to remove the warnings, v5.2.1 of
mingwrt does now offer a hook, which you could adapt to kludge around
them.  I haven't tested it, but the attached "features.h" may give you
some inspiration.

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
features.h (text/x-chdr, 4.5 KB)
/*
 * features.h
 *
 * Features configuration for MinGW.org GCC implementation; users may
 * customize this file, to establish their preferred default behaviour.
 * Projects may provide an alternative, package-specific configuration,
 * either by placing their own customized <features.h> in the package
 * -I path, ahead of the system default, or by assignment of their
 * preferred alternative to the _MINGW_FEATURES_HEADER macro.
 *
 *
 * $Id$
 *
 * Template written by Keith Marshall <[email protected]>
 * Copyright (C) 2019, MinGW.org Project.
 *
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice, this permission notice, and the following
 * disclaimer shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */
#ifndef _FEATURES_H
#pragma GCC system_header

/* Users are expected to customize this header, but it remains subject to
 * automatic updates by system software.  To ensure that any customisation
 * is not ovewritten, during such updates, it MUST observe the following:
 *
 * This header MUST define __MINGW_FEATURES__; the definition MUST begin
 * with "#define __MINGW_FEATURES__ (__MINGW_FEATURES_BEGIN__) \"; it MUST
 * extend over multiple lines, and terminate with "__MINGW_FEATURES_END__";
 * intervening lines may enumerate any defined features, one per line, and
 * each specified as an argument to either the __MINGW_FEATURE_ENABLE__(),
 * or the __MINGW_FEATURE_IGNORE__() macro, (ensuring that at least one
 * space separates either of these macro names from its parenthesized
 * argument name).
 *
 * CAUTION:
 * If customizing this features configuration, ALWAYS refer to features
 * using their designated symbolic constant names; NEVER usurp the use of
 * these symbolic constants for any other purpose, and NEVER assume that
 * any such constant has a specific value ... their definitions may vary
 * between distinct MinGW Runtime Library software releases!
 */
#ifndef __MINGW_FEATURES__
#define __MINGW_FEATURES__    (__MINGW_FEATURES_BEGIN__)        \
 __MINGW_FEATURE_IGNORE__     (__MINGW_ANSI_STDIO__)            \
 __MINGW_FEATURE_IGNORE__     (__MINGW_LC_MESSAGES__)           \
 __MINGW_FEATURE_IGNORE__     (__MINGW_LC_ENVVARS__)            \
 __MINGW_FEATURE_ENABLE__     (__MISUSED_FEATURES__)            \
 __MINGW_FEATURES_END__

#endif	/* !__MINGW_FEATURES__ */

#ifdef __USE_MINGW_ANSI_STDIO
/* Although considered to be strictly reserved for MinGW internal use,
 * some projects try to define this anyway; to avoid warnings relating
 * to its misuse, map its desired effect into __MINGW_FEATURES__, and
 * overrule the improper definition.
 */
#define __MISUSED_ANSI_STDIO__  __MINGW_ANSI_STDIO__
#undef __USE_MINGW_ANSI_STDIO
#else
/* __USE_MINGW_ANSI_STDIO has not been improperly defined; ensure that
 * its associated effect flag is not set, (but note that this does not
 * interfere with __MINGW_ANSI_STDIO__ activation by direct assignment
 * within __MINGW_FEATURES__).
 */
#define __MISUSED_ANSI_STDIO__  __MINGW_FEATURES_UNSET__
#endif

#define __MISUSED_FEATURES__   (__MINGW_FEATURES_BEGIN__)      \
 __MINGW_FEATURE_ENABLE__      (__MISUSED_ANSI_STDIO__)        \
 __MINGW_FEATURES_END__

#ifdef __USE_MINGW_FSEEK
/* Similarly, some projects may define this reserved macro improperly;
 * it has no effect, unless running on Win9X, in which case its effect
 * is always desired; it is automatically enabled when _WIN32_WINDOWS
 * is appropriately defined.
 */
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS  _WIN32_WINDOWS_95
#endif
#undef __USE_MINGW_FSEEK
#endif

#endif	/* !_FEATURES_H: $RCSfile$: end of file */
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJcR2LUAAoJEMCtNsY0flo/lzcP/3frC2Iq/lVDK1cpSnwJP9Rp
LEMJdoqE3d6Gs+6Tva+yjvKc2pMdQ6pMtkJURj0CbyKxkVc8zT9gu2hnhi0Hwd6O
BWAy7a/kdkE62jtt7gBMV3XKTebtKARErT1yA/xKJSNf5gSidCKkeaSmguRdEvSR
NauUmK5oogQkDyEfdk19tcYe2zgH7cycxorPRjR/0GoTo3D0ff2uVJKNwgNFpfUx
xTDITRAamcKZ+xbcb8aVCOobpO3GKLvHVJhUcOGAs/AOpdldShROeizV7ieXGa09
FyF9Td+COSqUnx2YAPuZlC35pobrQNoo3ttC4wFBc4/oTmL9pG3mqBUWwJ/8xYk6
URSSvdlO+Yh3BZzXeaRD/tSWTmQb0pbuIHAWKW8BQyHUHAZ3fTogRixjd4JR0mg5
LOIH/MfsT61iSSJS/9HiUVnJLGB+KQMBf9Y6eVItHBC+mcNwDYvXaTUfeWKoStLZ
bxCop2S4TrzpDjFEeGYHrITV6UrCaCjVBu+gabPl5kpIbfpMtGiYyjXpwBD/ZTIk
pp+r7Mp2gFmiif0hVxzu04qo9wDlhcSj7AepElLvgjWEsFIuK05LQQUyK+QskZ/p
ZiU+vJ0Ymahmmicfv3FamD+gXAbPwAie/pKiQ5ltyL8J7DiEfWudawJFNvsLJfY9
0NOAgJ2nc5SbNBuhw4Ly
=Oltp
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.