Commit Graph

17 Commits

Author SHA1 Message Date
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Jakub Jelinek 2afd3180c5 Update copyright years.
From-SVN: r244052
2017-01-04 12:30:51 +01:00
Alan Modra f0e525fe18 Modify obstack.[hc] to avoid having to include other gnulib files
Using the standard gnulib obstack source requires importing quite a
lot of other files from gnulib, and requires build changes.

include/
	* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
libiberty/
	* obstack.c (__alignof__): Expand alignof_type from alignof.h.
	(obstack_exit_failure): Don't use exitfail.h.
	(_): Include libintl.h when HAVE_LIBINTL_H and nls enabled.
	Provide default.  Don't include gettext.h.
	(_Noreturn): Define.
	* obstacks.texi: Adjust node references to external libc info files.

From-SVN: r229988
2015-11-09 14:58:21 +10:30
Alan Modra c9f265c945 Copy gnulib obstack files
This copies obstack.[ch] from gnulib, and updates the docs.  The next
patch should be applied if someone repeats the import at a later date.

include/
	* obstack.h: Import current gnulib file.
libiberty/
	* obstack.c: Import current gnulib file.
	* obstacks.texi: Updated doc, from glibc's manual/memory.texi.

From-SVN: r229987
2015-11-09 14:56:32 +10:30
H.J. Lu 9cefc85619 Update copyright year in include
From-SVN: r225781
2015-07-14 09:08:59 -07:00
DJ Delorie 40c4cbcd82 obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* ansidecl.h (ENUM_BITFIELD): Always use enum in C++

From-SVN: r180321
2011-10-21 21:35:29 -04:00
Alan Modra 085c6bd4f7 obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.
* obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.

From-SVN: r141254
2008-10-21 09:33:03 +10:30
Nick Clifton d6d47ea0f5 Update the address and phone number of the FSF organization.
From-SVN: r99518
2005-05-10 15:22:21 +00:00
Gabriel Dos Reis 885f2199f3 partition.h: Remove use of PARAMS.
include/
2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        * partition.h: Remove use of PARAMS.
        * obstack.h: Remove conditional prototypes __STDC__.
        * objalloc.h:  Remove use of PARAMS.
        * splay-tree.h: Likewise.

libiberty/
2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        Convert libiberty to use ISO C prototype style 5/n.
        * random.c (srandom, initstate, setstate, random): Use ISO C
        prototypes.
        * putenv.c (putenv): Likewise.
        * physmem.c (physmem_available, physmem_total, main):
        Likewise.
        * pex-win32.c (fix_argv, pexecute, pwait): Likewise.
        * pex-unix.c (pexecute, pwait): Likewise.
        * pex-msdos.c (pexecute, pwait): Likewise.
        * pex-djgpp.c (pexecute, pwait): Likewise.
        * partition.c (partition_new, partition_delete,
        partition_union)
        (elem_compare, partition_print): Likewise.
        * obstack.c (_obstack_begin, _obstack_begin_1,
        _obstack_newchunk,
        _obstack_allocated_p, _obstack_free, obstack_free,
        _obstack_memory_used, print_and_abort, obstack_next_free,
        obstack_object_size, obstack_base): Likewise.  Remove codes
        predicated on !defined(__STDC__).
        * objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free,
        objalloc_free_block): Use ISO C prototypes.
        * mkstemps.c (mkstemps): Likewise.
        * memset.c (memset): Likewise.
        * mempcpy.c (mempcpy): Likewise.
        * rename.c (rename): Likewise.
        * rindex.c (rindex): Likewise.
        * setenv.c (setenv, unsetenv): Likewise.
        * sigsetmask.c (sigsetmask): Likewise.
        * snprintf.c (snprintf): Likewise.
        * sort.c (sort_pointers, xmalloc): Likewise.
        * spaces.c (spaces): Likewise.
        * splay-tree.c (splay_tree_delete_helper,
        splay_tree_splay_helper, splay_tree_splay,
        splay_tree_foreach_helper, splay_tree_xmalloc_allocate,
        splay_tree_new, splay_tree_xmalloc_allocate,
        splay_tree_new_with_allocator, splay_tree_delete,
        splay_tree_insert, splay_tree_remove, splay_tree_lookup,
        splay_tree_max, splay_tree_min, splay_tree_predecessor,
        splay_tree_successor, splay_tree_foreach,
        splay_tree_compare_ints, splay_tree_compare_pointers):
        Likewise.
        * stpcpy.c (stpcpy): Likewise.
        * stpncpy.c (stpncpy): Likewise.
        * strcasecmp.c (strcasecmp): Likewise.
        * strchr.c (strchr): Likewise.
        * strdup.c (strdup): Likewise.

From-SVN: r97125
2005-03-28 04:22:33 +00:00
Bernardo Innocenti 5557e16d2a libiberty.h (ASTRDUP): Add casts required for stricter type conversion rules of C++.
* libiberty.h (ASTRDUP): Add casts required for stricter
	type conversion rules of C++.
	* obstack.h (obstack_free): Likewise.

From-SVN: r84642
2004-07-13 22:54:38 +02:00
Joseph Myers dc70e81d6e obstack.h: Merge the following change from gnulib...
include:
	* obstack.h: Merge the following change from gnulib:
	2003-10-21  Paul Eggert  <eggert@twinsun.com>
	* obstack.h (obstack_1grow_fast): Properly parenthesize arg.
	(obstack_ptr_grow_fast, obstack_int_grow_fast):
	Don't use lvalue casts, as GCC plans to remove support for them
	in GCC 3.5.  Reported by Joseph S. Myers.  This bug
	was also present in the non-GCC version, indicating that this
	code had always been buggy and had never been widely used.
	(obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
	Use the fast variant of each macro, rather than copying the
	definiens of the fast variant; that way, we'll be more likely to
	catch future bugs in the fast variants.

gcc:
	* c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of
	deprecation of casts as lvalues.
	* fixinc/inclhack.def (obstack_lvalue_cast): New fix.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/obstack.h: New test.

gcc/testsuite:
	* gcc.dg/cast-lvalue-1.c: New test.

From-SVN: r72826
2003-10-22 23:28:39 +01:00
Nick Clifton 01f537aba0 Fix copyright dates
From-SVN: r40469
2001-03-14 19:44:38 +00:00
Rodney Brown 0b749da1b8 * getopt.h obstack.h: Standarize copyright statement.
From-SVN: r38086
2000-12-06 18:54:13 -07:00
Kaveh R. Ghazi 98c3e05ded Avoids false positives with -Wcast-qual:
* obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
	in calls to `_obstack_memcpy' from here ...

	(_obstack_memcpy): ... to here, except in the __STDC__ case which
	doesn't need it.

From-SVN: r29028
1999-09-01 14:44:56 +00:00
Jeffrey A Law 7539f38d47 * getopt.h, obstack.h: Updated from gcc.
From-SVN: r22260
1998-09-05 06:25:19 -06:00
Jason Merrill 6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00