xref: /freebsd/contrib/pkgconf/libpkgconf/bsdstubs.h (revision a3cefe7f2b4df0f70ff92d4570ce18e517af43ec)
1*a3cefe7fSPierre Pronchery /*
2*a3cefe7fSPierre Pronchery  * bsdstubs.h
3*a3cefe7fSPierre Pronchery  * Header for stub BSD function prototypes if unavailable on a specific platform.
4*a3cefe7fSPierre Pronchery  *
5*a3cefe7fSPierre Pronchery  * Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>.
6*a3cefe7fSPierre Pronchery  *
7*a3cefe7fSPierre Pronchery  * Permission to use, copy, modify, and/or distribute this software for any
8*a3cefe7fSPierre Pronchery  * purpose with or without fee is hereby granted, provided that the above
9*a3cefe7fSPierre Pronchery  * copyright notice and this permission notice appear in all copies.
10*a3cefe7fSPierre Pronchery  *
11*a3cefe7fSPierre Pronchery  * This software is provided 'as is' and without any warranty, express or
12*a3cefe7fSPierre Pronchery  * implied.  In no event shall the authors be liable for any damages arising
13*a3cefe7fSPierre Pronchery  * from the use of this software.
14*a3cefe7fSPierre Pronchery  */
15*a3cefe7fSPierre Pronchery 
16*a3cefe7fSPierre Pronchery #ifndef LIBPKGCONF_BSDSTUBS_H
17*a3cefe7fSPierre Pronchery #define LIBPKGCONF_BSDSTUBS_H
18*a3cefe7fSPierre Pronchery 
19*a3cefe7fSPierre Pronchery #include <libpkgconf/libpkgconf-api.h>
20*a3cefe7fSPierre Pronchery 
21*a3cefe7fSPierre Pronchery #ifdef __cplusplus
22*a3cefe7fSPierre Pronchery extern "C" {
23*a3cefe7fSPierre Pronchery #endif
24*a3cefe7fSPierre Pronchery 
25*a3cefe7fSPierre Pronchery PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz);
26*a3cefe7fSPierre Pronchery PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz);
27*a3cefe7fSPierre Pronchery PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len);
28*a3cefe7fSPierre Pronchery PKGCONF_API extern void *pkgconf_reallocarray(void *ptr, size_t m, size_t n);
29*a3cefe7fSPierre Pronchery PKGCONF_API extern int pkgconf_pledge(const char *promises, const char *execpromises);
30*a3cefe7fSPierre Pronchery PKGCONF_API extern int pkgconf_unveil(const char *path, const char *permissions);
31*a3cefe7fSPierre Pronchery 
32*a3cefe7fSPierre Pronchery #ifdef __cplusplus
33*a3cefe7fSPierre Pronchery }
34*a3cefe7fSPierre Pronchery #endif
35*a3cefe7fSPierre Pronchery 
36*a3cefe7fSPierre Pronchery #endif
37