BRL-CAD
sysv.h
Go to the documentation of this file.
1 /* S Y S V . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2007-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /** @file sysv.h
21  *
22  * The "System V" library is a compatibility library for older systems
23  * that may not have various BSD and POSIX interfaces that BRL-CAD
24  * expects. Only the portions that are missing should end up getting
25  * declared and compiled.
26  *
27  * The majority of the code in this compatibility library comes from
28  * sources external to BRL-CAD and as such, refer to each individual
29  * file for license information. All code included is either covered
30  * by the LGPL, BSD license, or is in the public domain.
31  *
32  */
33 
34 #ifndef SYSV_H
35 #define SYSV_H
36 
37 #include "common.h"
38 
39 /* for size_t */
40 #include <stddef.h>
41 
43 
44 #ifndef SYSV_EXPORT
45 # if defined(SYSV_DLL_EXPORTS) && defined(SYSV_DLL_IMPORTS)
46 # error "Only SYSV_DLL_EXPORTS or SYSV_DLL_IMPORTS can be defined, not both."
47 # elif defined(SYSV_DLL_EXPORTS)
48 # define SYSV_EXPORT __declspec(dllexport)
49 # elif defined(SYSV_DLL_IMPORTS)
50 # define SYSV_EXPORT __declspec(dllimport)
51 # else
52 # define SYSV_EXPORT
53 # endif
54 #endif
55 
56 #ifndef HAVE_MEMSET
57 SYSV_EXPORT extern void *memset(void *s, int c, size_t n);
58 #endif
59 
60 #ifndef HAVE_STRCHR
61 SYSV_EXPORT extern char *strchr(const char *sp, int c);
62 #endif
63 
64 #ifndef HAVE_STRDUP
65 SYSV_EXPORT extern char *strdup(const char *cp);
66 #endif
67 
68 #ifndef HAVE_STRSEP
69 SYSV_EXPORT extern char *strsep(char **stringp, const char *delim);
70 #endif
71 
72 #ifndef HAVE_STRTOK
73 SYSV_EXPORT extern char *strtok(char *s, const char *delim);
74 #endif
75 
76 #ifndef HAVE_SETENV
77 SYSV_EXPORT extern int setenv(const char *name, const char *value, int overwrite);
78 #endif
79 
81 
82 #endif /* SYSV_H */
83 
84 /*
85  * Local Variables:
86  * tab-width: 8
87  * mode: C
88  * indent-tabs-mode: t
89  * c-file-style: "stroustrup"
90  * End:
91  * ex: shiftwidth=4 tabstop=8
92  */
if lu s
Definition: nmg_mod.c:3860
Definition: clone.c:90
Header file for the BRL-CAD common definitions.
char * strchr(const char *sp, int c)
void * memset(void *s, int c, size_t n)
#define __BEGIN_DECLS
Definition: common.h:73
char * strsep(char **stringp, const char *delim)
char * strtok(char *s, const char *delim)
char * strdup(const char *cp)
#define __END_DECLS
Definition: common.h:74
int setenv(const char *name, const char *value, int overwrite)
Definition: setenv.c:48