~ubuntu-branches/ubuntu/wily/gsasl/wily-proposed

« back to all changes in this revision

Viewing changes to gltests/malloca.h

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-04-14 07:26:51 UTC
  • mfrom: (2.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100414072651-hoc2231ulo8onq2x
Tags: 1.4.4-1ubuntu1
* Merge from Debian experimental (LP: #548480). Bugfix only release.
  Remaining changes:
  - debian/rules: Include clean-la.mk from cdbs to clean up the
    dependency_libs field in libgsasl.la.
* debian/control: drop libgsasl7 Depends on libgcrypt to what we have in
  Lucid (1.4.4-5). See Debian bug #564661.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Safe automatic memory allocation.
2
 
   Copyright (C) 2003-2007 Free Software Foundation, Inc.
 
2
   Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
3
3
   Written by Bruno Haible <bruno@clisp.org>, 2003.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify
54
54
   the function returns.  Upon failure, it returns NULL.  */
55
55
#if HAVE_ALLOCA
56
56
# define malloca(N) \
57
 
  ((N) < 4032 - sa_increment                                        \
 
57
  ((N) < 4032 - sa_increment                                        \
58
58
   ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
59
59
   : mmalloca (N))
60
60
#else
122
122
  sa_alignment_longdouble = sa_alignof (long double),
123
123
  sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
124
124
#if HAVE_LONG_LONG_INT
125
 
                      | (sa_alignment_longlong - 1)
 
125
                      | (sa_alignment_longlong - 1)
126
126
#endif
127
 
                      | (sa_alignment_longdouble - 1)
128
 
                     ) + 1,
 
127
                      | (sa_alignment_longdouble - 1)
 
128
                     ) + 1,
129
129
/* The increment that guarantees room for a magic word must be >= sizeof (int)
130
130
   and a multiple of sa_alignment_max.  */
131
131
  sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max