Import code from my Subversion repository
[black_box_cellml.git] / libltdl / lt_argz.h
blob7b1dab606a4764967f5685132c41e8dfe26a329d
1 /* lt__argz.h -- internal argz interface for non-glibc systems
2 Copyright (C) 2004 Free Software Foundation, Inc.
3 Originally by Gary V. Vaughan <gary@gnu.org>
5 NOTE: The canonical source of this file is maintained with the
6 GNU Libtool package. Report bugs to bug-libtool@gnu.org.
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
13 As a special exception to the GNU Lesser General Public License,
14 if you distribute this file as part of a program or library that
15 is built using GNU libtool, you may include it under the same
16 distribution terms that you use for the rest of that program.
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 02110-1301 USA
30 #if !defined(LT__ARGZ_H)
31 #define LT__ARGZ_H 1
33 /* Redefine any glibc symbols we reimplement to import the
34 implementations into our lt__ namespace so we don't ever
35 clash with the system library if our clients use argz_*
36 from there in addition to libltdl. */
37 # undef argz_append
38 # define argz_append lt__argz_append
39 # undef argz_create_sep
40 # define argz_create_sep lt__argz_create_sep
41 # undef argz_insert
42 # define argz_insert lt__argz_insert
43 # undef argz_next
44 # define argz_next lt__argz_next
45 # undef argz_stringify
46 # define argz_stringify lt__argz_stringify
49 #include <stdlib.h>
50 #include <sys/types.h>
52 #if defined(LTDL)
53 # include "lt__glibc.h"
54 # include "lt_system.h"
55 #else
56 # define LT_SCOPE
57 #endif
59 #if defined(_cplusplus)
60 extern "C" {
61 #endif
63 LT_SCOPE int argz_append (char **pargz, size_t *pargz_len,
64 const char *buf, size_t buf_len);
65 LT_SCOPE int argz_create_sep(const char *str, int delim,
66 char **pargz, size_t *pargz_len);
67 LT_SCOPE int argz_insert (char **pargz, size_t *pargz_len,
68 char *before, const char *entry);
69 LT_SCOPE char * argz_next (char *argz, size_t argz_len,
70 const char *entry);
71 LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
73 #if defined(_cplusplus)
75 #endif
77 #if !defined(LTDL)
78 # undef LT_SCOPE
79 #endif
81 #endif /*!defined(LT__ARGZ_H)*/