/*
- * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
+ * Copyright (C) 2016-2019 "IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* limitations under the License.
*/
+#if WITH_LIBMICROHTTPD
+
#define _GNU_SOURCE
#include <stdlib.h>
#define JSON_C_TO_STRING_NOSLASHESCAPE 0
#endif
-#if defined(USE_MAGIC_MIME_TYPE)
+#if USE_MAGIC_MIME_TYPE
#include <magic.h>
#endif
va_end(args);
}
-#if defined(USE_MAGIC_MIME_TYPE)
+#if USE_MAGIC_MIME_TYPE
#if !defined(MAGIC_DB)
#define MAGIC_DB "/usr/share/misc/magic.mgc"
{
const char *result = NULL;
-#if defined(INFER_EXTENSION)
+#if INFER_EXTENSION
/*
* Set some well-known extensions
* Note that it is mandatory for example for css files in order to provide
}
}
#endif
-#if defined(USE_MAGIC_MIME_TYPE)
+#if USE_MAGIC_MIME_TYPE
if (result == NULL)
result = magic_mimetype_fd(fd);
#endif
return hreq;
}
+#endif