#define _BSD_SOURCE
#define _XOPEN_SOURCE
#include <sys/time.h>
#include <alloca.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#ifdef HAVE_ONIGURUMA
#include <oniguruma.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "builtin.h"
#include "compile.h"
#include "jq_parser.h"
#include "bytecode.h"
#include "linker.h"
#include "locfile.h"
#include "jv_unicode.h"
static jv type_error(jv bad, const char* msg) {
char errbuf[15];
jv err = jv_invalid_with_msg(jv_string_fmt("%s (%s) %s",