lib/parser: use g_vasprintf, _XOPEN_SOURCE
Attempt to restore building on Cygwin.
This commit is contained in:
@ -17,6 +17,9 @@
|
|||||||
** 02110-1301, USA.
|
** 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _XOPEN_SOUCE
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#define GNU_SOURCE
|
#define GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -28,6 +31,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <glib/gprintf.h>
|
||||||
|
|
||||||
using namespace Mux;
|
using namespace Mux;
|
||||||
|
|
||||||
@ -184,7 +188,7 @@ Mux::quote (const std::string& str)
|
|||||||
va_start (args, frm);
|
va_start (args, frm);
|
||||||
|
|
||||||
char *s = {};
|
char *s = {};
|
||||||
const auto res = vasprintf (&s, frm, args);
|
const auto res = g_vasprintf (&s, frm, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
std::cerr << "string format failed" << std::endl;
|
std::cerr << "string format failed" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user