projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a note about empty files.
[gnulib.git]
/
lib
/
obstack.h
diff --git
a/lib/obstack.h
b/lib/obstack.h
index
09c263f
..
c0fc9ac
100644
(file)
--- a/
lib/obstack.h
+++ b/
lib/obstack.h
@@
-1,10
+1,11
@@
/* obstack.h - object stack macros
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99
,2003
Free Software Foundation, Inc.
+ This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
NOTE: The canonical source of this file is maintained with the GNU C Library.
the C library, however. The master source lives in /gd/gnu/lib.
NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@
prep.ai.mit.edu
.
+ Bugs can be reported to bug-glibc@
gnu.org
.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@
-122,8
+123,12
@@
extern "C" {
#endif
#ifndef __INT_TO_PTR
#endif
#ifndef __INT_TO_PTR
+#if defined __STDC__ && __STDC__
+# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
+#else
# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
+#endif
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
@@
-367,12
+372,12
@@
extern int obstack_exit_failure;
# define obstack_object_size(OBSTACK) \
__extension__ \
# define obstack_object_size(OBSTACK) \
__extension__ \
- ({ struct obstack
*__o = (OBSTACK);
\
+ ({ struct obstack
const *__o = (OBSTACK);
\
(unsigned) (__o->next_free - __o->object_base); })
# define obstack_room(OBSTACK) \
__extension__ \
(unsigned) (__o->next_free - __o->object_base); })
# define obstack_room(OBSTACK) \
__extension__ \
- ({ struct obstack
*__o = (OBSTACK);
\
+ ({ struct obstack
const *__o = (OBSTACK);
\
(unsigned) (__o->chunk_limit - __o->next_free); })
# define obstack_make_room(OBSTACK,length) \
(unsigned) (__o->chunk_limit - __o->next_free); })
# define obstack_make_room(OBSTACK,length) \
@@
-385,7
+390,7
@@
__extension__ \
# define obstack_empty_p(OBSTACK) \
__extension__ \
# define obstack_empty_p(OBSTACK) \
__extension__ \
- ({ struct obstack
*__o = (OBSTACK);
\
+ ({ struct obstack
const *__o = (OBSTACK);
\
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
# define obstack_grow(OBSTACK,where,length) \
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
# define obstack_grow(OBSTACK,where,length) \