mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-05 18:44:25 +03:00
Attempt to prevent use of STRPTIME or GETDATE on platforms where we know it is broken
This commit is contained in:
parent
b4d26fd160
commit
c47db23f8f
@ -84,6 +84,7 @@ $(S_JSAPI_BINDING): $(BINDINGS)
|
|||||||
|
|
||||||
S_JAVASCRIPT += dukky.c content.c fetcher.c duktape/duktape.c
|
S_JAVASCRIPT += dukky.c content.c fetcher.c duktape/duktape.c
|
||||||
|
|
||||||
|
CFLAGS += -DDUK_OPT_HAVE_CUSTOM_H
|
||||||
else
|
else
|
||||||
S_JAVASCRIPT += none.c fetcher.c
|
S_JAVASCRIPT += none.c fetcher.c
|
||||||
endif
|
endif
|
||||||
|
@ -2987,6 +2987,18 @@ typedef FILE duk_file;
|
|||||||
#undef DUK_USE_GCC_PRAGMAS
|
#undef DUK_USE_GCC_PRAGMAS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Alternative customization header
|
||||||
|
*
|
||||||
|
* If you want to modify the final DUK_USE_xxx flags directly (without
|
||||||
|
* using the available DUK_OPT_xxx flags), define DUK_OPT_HAVE_CUSTOM_H
|
||||||
|
* and tweak the final flags there.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(DUK_OPT_HAVE_CUSTOM_H)
|
||||||
|
#include "duk_custom.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Date provider selection
|
* Date provider selection
|
||||||
*
|
*
|
||||||
@ -3070,18 +3082,6 @@ DUK_INTERNAL_DECL duk_bool_t duk_bi_date_format_parts_strftime(duk_context *ctx,
|
|||||||
#define DUK_USE_JSON_QUOTESTRING_FASTPATH
|
#define DUK_USE_JSON_QUOTESTRING_FASTPATH
|
||||||
#undef DUK_USE_JSON_STRINGIFY_FASTPATH
|
#undef DUK_USE_JSON_STRINGIFY_FASTPATH
|
||||||
|
|
||||||
/*
|
|
||||||
* Alternative customization header
|
|
||||||
*
|
|
||||||
* If you want to modify the final DUK_USE_xxx flags directly (without
|
|
||||||
* using the available DUK_OPT_xxx flags), define DUK_OPT_HAVE_CUSTOM_H
|
|
||||||
* and tweak the final flags there.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(DUK_OPT_HAVE_CUSTOM_H)
|
|
||||||
#include "duk_custom.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* You may add overriding #define/#undef directives below for
|
* You may add overriding #define/#undef directives below for
|
||||||
* customization. You of course cannot un-#include or un-typedef
|
* customization. You of course cannot un-#include or un-typedef
|
||||||
|
29
javascript/duktape/duk_custom.h
Normal file
29
javascript/duktape/duk_custom.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2015 Daniel Silverstone <dsilvers@netsurf-browser.org>
|
||||||
|
*
|
||||||
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
||||||
|
*
|
||||||
|
* NetSurf is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; version 2 of the License.
|
||||||
|
*
|
||||||
|
* NetSurf is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* Custom configuration for duktape
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "utils/config.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_STRPTIME
|
||||||
|
#undef DUK_USE_DATE_PRS_STRPTIME
|
||||||
|
#undef DUK_USE_DATE_PRS_GETDATE
|
||||||
|
#undef DUK_USE_DATE_PARSE_STRING
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user