summaryrefslogtreecommitdiff
path: root/lib/obstack.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-08-22 14:55:01 +0000
committerJim Meyering <jim@meyering.net>1997-08-22 14:55:01 +0000
commitfada8884a31fb72600fce8b8fc6e9c9efbd8d36b (patch)
tree4a77fa8a6b2f1749dd12e2b1723b3198faece69f /lib/obstack.h
parent2fc81ec762307ac71b7150c0aa02d8484befeec0 (diff)
downloadcoreutils-fada8884a31fb72600fce8b8fc6e9c9efbd8d36b.tar.xz
update from glibc
Diffstat (limited to 'lib/obstack.h')
-rw-r--r--lib/obstack.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/obstack.h b/lib/obstack.h
index 0e7eb0905..53d25b449 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -107,6 +107,10 @@ Summary:
#ifndef __OBSTACK_H__
#define __OBSTACK_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* We use subtraction of (char *) 0 instead of casting to int
because on word-addressable machines a simple cast to int
may ignore the byte-within-word field of the pointer. */
@@ -303,13 +307,14 @@ extern int obstack_exit_failure;
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg))
+ (void *(*) (void *, long)) (chunkfun), \
+ (void (*) (void *, void *)) (freefun), (arg))
#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun))
+ ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *)) (newfreefun))
+ ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
#else
@@ -578,4 +583,8 @@ __extension__ \
#endif /* not __GNUC__ or not __STDC__ */
+#ifdef __cplusplus
+} /* C++ */
+#endif
+
#endif /* not __OBSTACK_H__ */