#include <string.h>
#include <unistd.h>
-#include "compat.h"
+#include "compat/vasprintf.h"
#include "cli_priv.h"
#include "cli.h"
#include "vsb.h"
#include <string.h>
#include <unistd.h>
-#include "compat.h"
+#include "compat/asprintf.h"
#include "vsb.h"
#include "queue.h"
#include <string.h>
#include <unistd.h>
-#include "compat.h"
+#include "compat/asprintf.h"
#include "shmlog.h"
#include "cache.h"
#include <stdio.h>
#include <string.h>
+#include "compat/strlcpy.h"
#include "heritage.h"
#include "mgt.h"
cli.h \
cli_common.h \
cli_priv.h \
- compat.h \
+ compat/asprintf.h \
+ compat/strlcat.h \
+ compat/strlcpy.h \
+ compat/vasprintf.h \
hash.h \
http_headers.h \
libvarnish.h \
+++ /dev/null
-/*
- * $Id$
- */
-
-#ifndef COMPAT_H_INCLUDED
-#define COMPAT_H_INCLUDED
-
-#ifndef HAVE_VASPRINTF
-#ifdef va_start /* make sure <stdarg.h> is in scope */
-int vasprintf(char **strp, const char *fmt, va_list ap);
-#endif
-#endif
-
-#ifndef HAVE_ASPRINTF
-int asprintf(char **strp, const char *fmt, ...);
-#endif
-
-#ifndef HAVE_STRLCPY
-size_t strlcpy(char *dst, const char *src, size_t size);
-#endif
-
-#ifndef HAVE_STRLCAT
-size_t strlcat(char *dst, const char *src, size_t size);
-#endif
-
-#endif
--- /dev/null
+/*
+ * $Id$
+ */
+
+#ifndef COMPAT_ASPRINTF_H_INCLUDED
+#define COMPAT_ASPRINTF_H_INCLUDED
+
+#ifndef HAVE_ASPRINTF
+int asprintf(char **strp, const char *fmt, ...);
+#endif
+
+#endif
--- /dev/null
+/*
+ * $Id$
+ */
+
+#ifndef COMPAT_STRLCAT_H_INCLUDED
+#define COMPAT_STRLCAT_H_INCLUDED
+
+#ifndef HAVE_STRLCAT
+size_t strlcat(char *dst, const char *src, size_t size);
+#endif
+
+#endif
--- /dev/null
+/*
+ * $Id$
+ */
+
+#ifndef COMPAT_STRLCPY_H_INCLUDED
+#define COMPAT_STRLCPY_H_INCLUDED
+
+#ifndef HAVE_STRLCPY
+size_t strlcpy(char *dst, const char *src, size_t size);
+#endif
+
+#endif
--- /dev/null
+/*
+ * $Id$
+ */
+
+#ifndef COMPAT_VASPRINTF_H_INCLUDED
+#define COMPAT_VASPRINTF_H_INCLUDED
+
+#ifndef HAVE_VASPRINTF
+int vasprintf(char **strp, const char *fmt, va_list ap);
+#endif
+
+#endif
*
*/
+#ifndef HAVE_ASPRINTF
+
#include <stdarg.h>
#include <stdio.h>
-#include "compat.h"
+#include "compat/asprintf.h"
+#include "compat/vasprintf.h"
-#ifndef HAVE_ASPRINTF
int
asprintf(char **strp, const char *fmt, ...)
{
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef HAVE_STRLCAT
+
#include <sys/types.h>
#include <string.h>
-#include "compat.h"
+#include "compat/strlcat.h"
-#ifndef HAVE_STRLCAT
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef HAVE_STRLCPY
+
#include <sys/types.h>
#include <string.h>
-#include "compat.h"
+#include "compat/strlcpy.h"
-#ifndef HAVE_STRLCPY
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
*
*/
+#ifndef HAVE_VASPRINTF
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include "compat.h"
+#include "compat/vasprintf.h"
-#ifndef HAVE_VASPRINTF
int
vasprintf(char **strp, const char *fmt, va_list ap)
{
#include <queue.h>
#include <unistd.h>
-#include "compat.h"
+#include "compat/asprintf.h"
#include "vsb.h"
#include "vcc_priv.h"