~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/obstack.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* obstack.c - subroutines used implicitly by object stack macros
2
2
 
3
 
   Copyright (C) 1988-1994, 1996-2006, 2009-2011 Free Software Foundation, Inc.
 
3
   Copyright (C) 1988-1994, 1996-2006, 2009-2012 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
34
34
   C Library, but also included in many other GNU distributions.  Compiling
35
35
   and linking in this code is a waste when using the GNU C library
36
36
   (especially if it is a shared library).  Rather than having every GNU
37
 
   program understand `configure --with-gnu-libc' and omit the object
 
37
   program understand 'configure --with-gnu-libc' and omit the object
38
38
   files, it is simpler to just do this in the source for each such file.  */
39
39
 
40
40
#include <stdio.h>              /* Random thing to get __GNU_LIBRARY__.  */
74
74
 
75
75
/* When we copy a long block of data, this is the unit to do it with.
76
76
   On some machines, copying successive ints does not work;
77
 
   in such a case, redefine COPYING_UNIT to `long' (if that works)
78
 
   or `char' as a last resort.  */
 
77
   in such a case, redefine COPYING_UNIT to 'long' (if that works)
 
78
   or 'char' as a last resort.  */
79
79
# ifndef COPYING_UNIT
80
80
#  define COPYING_UNIT int
81
81
# endif
82
82
 
83
83
 
84
 
/* The functions allocating more room by calling `obstack_chunk_alloc'
85
 
   jump to the handler pointed to by `obstack_alloc_failed_handler'.
 
84
/* The functions allocating more room by calling 'obstack_chunk_alloc'
 
85
   jump to the handler pointed to by 'obstack_alloc_failed_handler'.
86
86
   This can be set to a user defined function which should either
87
87
   abort gracefully or use longjump - but shouldn't return.  This
88
88
   variable by default points to the internal function
89
 
   `print_and_abort'.  */
90
 
static void print_and_abort (void);
 
89
   'print_and_abort'.  */
 
90
static _Noreturn void print_and_abort (void);
91
91
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
92
92
 
93
 
/* Exit value used when `print_and_abort' is used.  */
 
93
/* Exit value used when 'print_and_abort' is used.  */
94
94
# include <stdlib.h>
95
95
# ifdef _LIBC
96
96
int obstack_exit_failure = EXIT_FAILURE;