XBPS can now be built on NetBSD (and probably any other BSD variant).

This commit is contained in:
Juan RP
2012-12-06 12:58:17 +01:00
parent d6a65a5a55
commit 2c1e4e502d
15 changed files with 145 additions and 158 deletions

View File

@ -3,7 +3,12 @@
#include <sys/types.h>
#include <stdarg.h>
#include "xbps_api_impl.h"
#if HAVE_VISIBILITY
#define HIDDEN __attribute__ ((visibility("hidden")))
#else
#define HIDDEN
#endif
#ifndef HAVE_STRLCAT
size_t HIDDEN strlcat(char *, const char *, size_t);
@ -17,8 +22,18 @@ size_t HIDDEN strlcpy(char *, const char *, size_t);
char HIDDEN *strcasestr(const char *, const char *);
#endif
#if defined(HAVE_VASPRINTF) && !defined(_GNU_SOURCE)
#if !defined(HAVE_VASPRINTF) && !defined(_GNU_SOURCE)
int HIDDEN vasprintf(char **, const char *, va_list);
#endif
#ifndef HAVE_HUMANIZE_HUMBER
#define HN_DECIMAL 0x01
#define HN_NOSPACE 0x02
#define HN_B 0x04
#define HN_DIVISOR_1000 0x08
#define HN_GETSCALE 0x10
#define HN_AUTOSCALE 0x20
int HIDDEN humanize_number(char *, size_t, int64_t, const char *, int, int);
#endif
#endif /* COMPAT_H */

View File

@ -38,11 +38,15 @@
#ifdef __cplusplus
# ifndef __BEGIN_DECLS
# define __BEGIN_DECLS extern "C" {
# endif
# ifndef __END_DECLS
# define __END_DECLS }
# endif
#else
# ifndef __BEGIN_DECLS
# define __BEGIN_DECLS
# endif
# ifndef __END_DECLS
# define __END_DECLS
# endif
#endif

View File

@ -40,7 +40,6 @@
#define HIDDEN
#endif
#include "compat.h"
#include "queue.h"
#include "fetch.h"