readline: define _XOPEN_SOURCE at the top of files
It is a requirement to define feature_test_macros(7) as soon as possible before including any files, otherwise the headers may not allow further configuration, as reconfiguration maybe denied. You need to pick the standard you wish to work with for the compilation unit (the file). This can be seen with an error for lack of symbol `wcwidth()` from wchar.h Moving the order slightly fixes the compile failure issue. See feature_test_macros(7) for more info. GCC14 --without-tk --without-tcl (without system libreadline-dev)
This commit is contained in:
parent
54f49829f2
commit
932deeaf2d
|
|
@ -21,6 +21,8 @@
|
|||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
#define READLINE_LIBRARY
|
||||
|
||||
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
|
@ -41,7 +43,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
|
||||
#include <wchar.h>
|
||||
|
||||
/* System-specific feature definitions and include files. */
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <wchar.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue