mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Update feature test macro in line.c
This commit is contained in:
parent
9dd152dc28
commit
f361830cb2
@ -142,8 +142,8 @@ static Janet cfun_io_temp(int32_t argc, Janet *argv) {
|
|||||||
janet_fixarity(argc, 0);
|
janet_fixarity(argc, 0);
|
||||||
FILE *tmp = tmpfile();
|
FILE *tmp = tmpfile();
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
janet_panicf("unable to create temporary file - %s", strerror(errno));
|
janet_panicf("unable to create temporary file - %s", strerror(errno));
|
||||||
return janet_makefile(tmp, JANET_FILE_WRITE|JANET_FILE_READ|JANET_FILE_BINARY);
|
return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Janet cfun_io_fopen(int32_t argc, Janet *argv) {
|
static Janet cfun_io_fopen(int32_t argc, Janet *argv) {
|
||||||
@ -577,7 +577,7 @@ static const JanetReg io_cfuns[] = {
|
|||||||
JDOC("(eprinf fmt & xs)\n\n"
|
JDOC("(eprinf fmt & xs)\n\n"
|
||||||
"Like eprintf but with no trailing newline.")
|
"Like eprintf but with no trailing newline.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file/temp", cfun_io_temp,
|
"file/temp", cfun_io_temp,
|
||||||
JDOC("(file/temp)\n\n"
|
JDOC("(file/temp)\n\n"
|
||||||
"Open an anonymous temporary file that is removed on close."
|
"Open an anonymous temporary file that is removed on close."
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
* IN THE SOFTWARE.
|
* IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(_POSIX_C_SOURCE)
|
||||||
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef JANET_AMALG
|
#ifndef JANET_AMALG
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user