summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lilv_config.h78
-rw-r--r--src/util.c1
2 files changed, 1 insertions, 78 deletions
diff --git a/src/lilv_config.h b/src/lilv_config.h
index cb8ad04..58d4429 100644
--- a/src/lilv_config.h
+++ b/src/lilv_config.h
@@ -1,90 +1,12 @@
// Copyright 2021 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
-/*
- Configuration header that defines reasonable defaults at compile time.
-
- This allows compile-time configuration from the command line (typically via
- the build system) while still allowing the source to be built without any
- configuration. The build system can define LILV_NO_DEFAULT_CONFIG to disable
- defaults, in which case it must define things like HAVE_FEATURE to enable
- features. The design here ensures that compiler warnings or
- include-what-you-use will catch any mistakes.
-*/
-
#ifndef LILV_CONFIG_H
#define LILV_CONFIG_H
// Define version unconditionally so a warning will catch a mismatch
#define LILV_VERSION "0.24.21"
-#if !defined(LILV_NO_DEFAULT_CONFIG)
-
-// We need unistd.h to check _POSIX_VERSION
-# ifndef LILV_NO_POSIX
-# ifdef __has_include
-# if __has_include(<unistd.h>)
-# include <unistd.h>
-# endif
-# elif defined(__unix__)
-# include <unistd.h>
-# endif
-# endif
-
-// POSIX.1-2001: fileno()
-# ifndef HAVE_FILENO
-# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
-# define HAVE_FILENO
-# endif
-# endif
-
-// Classic UNIX: flock()
-# ifndef HAVE_FLOCK
-# if defined(__unix__) || defined(__APPLE__)
-# define HAVE_FLOCK
-# endif
-# endif
-
-// POSIX.1-2001: lstat()
-# ifndef HAVE_LSTAT
-# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
-# define HAVE_LSTAT
-# endif
-# endif
-
-#endif // !defined(LILV_NO_DEFAULT_CONFIG)
-
-/*
- Make corresponding USE_FEATURE defines based on the HAVE_FEATURE defines from
- above or the command line. The code checks for these using #if (not #ifdef),
- so there will be an undefined warning if it checks for an unknown feature,
- and this header is always required by any code that checks for features, even
- if the build system defines them all.
-*/
-
-#ifdef HAVE_FILENO
-# define USE_FILENO 1
-#else
-# define USE_FILENO 0
-#endif
-
-#ifdef HAVE_FLOCK
-# define USE_FLOCK 1
-#else
-# define USE_FLOCK 0
-#endif
-
-#ifdef HAVE_LSTAT
-# define USE_LSTAT 1
-#else
-# define USE_LSTAT 0
-#endif
-
-/*
- Define required values. These are always used as a fallback, even with
- LILV_NO_DEFAULT_CONFIG, since they must be defined for the build to work.
-*/
-
// Separator between entries in variables like PATH
#ifndef LILV_PATH_SEP
# ifdef _WIN32
diff --git a/src/util.c b/src/util.c
index b5aed50..0904ce6 100644
--- a/src/util.c
+++ b/src/util.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
void
lilv_free(void* ptr)