root/trunk/freewrt/scripts/param.h

Revision 3625, 1.8 kB (checked in by tg, 5 years ago)

unbreak build on BSD oO

Line 
1 /* $FreeWRT$ */
2
3 /*-
4  * Copyright (c) 2007
5  *      Thorsten Glaser <tg@mirbsd.de>
6  *
7  * Provided that these terms and disclaimer and all copyright notices
8  * are retained or reproduced in an accompanying document, permission
9  * is granted to deal in this work without restriction, including un-
10  * limited rights to use, publicly perform, distribute, sell, modify,
11  * merge, give away, or sublicence.
12  *
13  * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
14  * the utmost extent permitted by applicable law, neither express nor
15  * implied; without malicious intent or gross negligence. In no event
16  * may a licensor, author or contributor be held liable for indirect,
17  * direct, other damage, loss, or other issues arising in any way out
18  * of dealing in the work, even if advised of the possibility of such
19  * damage or existence of a defect, except proven that it results out
20  * of said person's immediate fault when using the work as intended.
21  */
22
23 #ifndef IN_CROSSBUILD
24 #include_next </usr/include/sys/param.h>
25
26 #ifndef __linux__
27 typedef off_t loff_t;
28 #endif
29 #endif /* !IN_CROSSBUILD */
30
31 #if !defined(__RCSID) || !defined(__SCCSID) || !defined(__COPYRIGHT)
32 #undef __IDSTRING
33 #undef __IDSTRING_CONCAT
34 #undef __IDSTRING_EXPAND
35 #undef __COPYRIGHT
36 #undef __RCSID
37 #undef __SCCSID
38 #define __IDSTRING_CONCAT(l,p)          __LINTED__ ## l ## _ ## p
39 #define __IDSTRING_EXPAND(l,p)          __IDSTRING_CONCAT(l,p)
40 #define __IDSTRING(prefix, string)                              \
41         static const char __IDSTRING_EXPAND(__LINE__,prefix) [] \
42             __attribute__((used)) = "@(""#)" #prefix ": " string
43 #define __COPYRIGHT(x)  __IDSTRING(copyright,x)
44 #define __RCSID(x)      __IDSTRING(rcsid,x)
45 #define __SCCSID(x)     __IDSTRING(sccsid,x)
46 #endif
47
48 #ifndef IN_CROSSBUILD
49 #if !defined(BSD) && defined(_STRLCPY_DEFNS)
50 size_t strlcat(char *, const char *, size_t);
51 size_t strlcpy(char *, const char *, size_t);
52 #endif
53 #endif /* !IN_CROSSBUILD */
Note: See TracBrowser for help on using the browser.