You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
+#include <ansidecl.h>
+#include <sysdep.h>
#include "obstack.h"
-#ifdef __STDC__
-#define POINTER void *
-#else
-#define POINTER char *
-#endif
/* Determine default alignment. */
struct fooalign {char x; double d;};
CHUNKFUN is the function to use to allocate chunks,
and FREEFUN the function to free them. */
-void
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
- POINTER (*chunkfun) ();
- void (*freefun) ();
+void DEFUN(_obstack_begin,(h, size, alignment, chunkfun, freefun),
+ struct obstack *h AND
+ int size AND
+ int alignment AND
+ PTR (*chunkfun) () AND
+ void (*freefun) ())
{
register struct _obstack_chunk* chunk; /* points to new chunk */
compilers in a : expression. */
int
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
+DEFUN(_obstack_newchunk,(h, length),
+ struct obstack *h AND
+ int length)
{
register struct _obstack_chunk* old_chunk = h->chunk;
register struct _obstack_chunk* new_chunk;
If you use it in a program, you are probably losing. */
int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
+DEFUN(_obstack_allocated_p, (h, obj),
+ struct obstack *h AND
+ PTR obj)
{
- register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk* plp; /* point to previous chunk if any */
lp = (h)->chunk;
- while (lp != 0 && ((POINTER)lp > obj || (POINTER)(lp)->limit < obj))
- {
- plp = lp -> prev;
- lp = plp;
- }
+ while (lp != 0 && ((PTR)lp > obj || (PTR)(lp)->limit < obj))
+ {
+ plp = lp -> prev;
+ lp = plp;
+ }
return lp != 0;
}
#ifdef __STDC__
#undef obstack_free
void
-obstack_free (struct obstack *h, POINTER obj)
+obstack_free (struct obstack *h, PTR obj)
#else
int
_obstack_free (h, obj)
struct obstack *h;
- POINTER obj;
+ PTR obj;
#endif
{
register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
/* We use >= because there cannot be an object at the beginning of a chunk.
But there can be an empty object at that address
at the end of another chunk. */
- while (lp != 0 && ((POINTER)lp >= obj || (POINTER)(lp)->limit < obj))
+ while (lp != 0 && ((PTR)lp >= obj || (PTR)(lp)->limit < obj))
{
plp = lp -> prev;
- (*h->freefun) ((POINTER) lp);
+ (*h->freefun) ((PTR) lp);
lp = plp;
}
if (lp)
int
_obstack_free (h, obj)
struct obstack *h;
- POINTER obj;
+ PTR obj;
{
obstack_free (h, obj);
return 0;
/* The function names appear in parentheses in order to prevent
the macro-definitions of the names from being expanded there. */
-POINTER (obstack_base) (obstack)
+PTR (obstack_base) (obstack)
struct obstack *obstack;
{
return obstack_base (obstack);
}
-POINTER (obstack_next_free) (obstack)
+PTR (obstack_next_free) (obstack)
struct obstack *obstack;
{
return obstack_next_free (obstack);
return obstack_room (obstack);
}
-void (obstack_grow) (obstack, pointer, length)
+void (obstack_grow) (obstack, ptr, length)
struct obstack *obstack;
- POINTER pointer;
+ PTR ptr;
int length;
{
- obstack_grow (obstack, pointer, length);
+(void) obstack_grow (obstack, ptr, length);
}
-void (obstack_grow0) (obstack, pointer, length)
+void (obstack_grow0) (obstack, ptr, length)
struct obstack *obstack;
- POINTER pointer;
+ PTR ptr;
int length;
{
- obstack_grow0 (obstack, pointer, length);
+(void) obstack_grow0 (obstack, ptr, length);
}
void (obstack_1grow) (obstack, character)
struct obstack *obstack;
int character;
{
- obstack_1grow (obstack, character);
+(void) obstack_1grow (obstack, character);
}
void (obstack_blank) (obstack, length)
struct obstack *obstack;
int length;
{
- obstack_blank (obstack, length);
+(void) obstack_blank (obstack, length);
}
void (obstack_1grow_fast) (obstack, character)
obstack_blank_fast (obstack, length);
}
-POINTER (obstack_finish) (obstack)
+PTR (obstack_finish) (obstack)
struct obstack *obstack;
{
return obstack_finish (obstack);
}
-POINTER (obstack_alloc) (obstack, length)
+PTR (obstack_alloc) (obstack, length)
struct obstack *obstack;
int length;
{
return obstack_alloc (obstack, length);
}
-POINTER (obstack_copy) (obstack, pointer, length)
+PTR (obstack_copy) (obstack, ptr, length)
struct obstack *obstack;
- POINTER pointer;
+ PTR ptr;
int length;
{
- return obstack_copy (obstack, pointer, length);
+ return obstack_copy (obstack, ptr, length);
}
-POINTER (obstack_copy0) (obstack, pointer, length)
+PTR (obstack_copy0) (obstack, ptr, length)
struct obstack *obstack;
- POINTER pointer;
+ PTR ptr;
int length;
{
- return obstack_copy0 (obstack, pointer, length);
+ return obstack_copy0 (obstack, ptr, length);
}
#endif /* __STDC__ */
-%{
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-
-This file is part of GLD, the Gnu Linker.
-
-GLD is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GLD is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id$
*/
-/*SUPPRESS 166*/
-/*SUPPRESS 112*/
#include "sysdep.h"
#include "bfd.h"
-
#include "ld.h"
#include "ldexp.h"
#include "ldversion.h"
#define YYDEBUG 1
boolean option_v;
-
-
extern unsigned int lineno;
extern boolean trace_files;
extern boolean write_map;