~ubuntu-branches/ubuntu/feisty/openldap2.3/feisty-updates

« back to all changes in this revision

Viewing changes to include/ac/alloca.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Mohlmann
  • Date: 2006-11-11 11:24:42 UTC
  • Revision ID: james.westby@ubuntu.com-20061111112442-645qqio2u3fin0sj
Tags: upstream-2.3.29
ImportĀ upstreamĀ versionĀ 2.3.29

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Generic alloca.h */
 
2
/* $OpenLDAP: pkg/ldap/include/ac/alloca.h,v 1.16.2.2 2006/01/03 22:16:06 kurt Exp $ */
 
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 
4
 *
 
5
 * Copyright 1998-2006 The OpenLDAP Foundation.
 
6
 * All rights reserved.
 
7
 *
 
8
 * Redistribution and use in source and binary forms, with or without
 
9
 * modification, are permitted only as authorized by the OpenLDAP
 
10
 * Public License.
 
11
 *
 
12
 * A copy of this license is available in file LICENSE in the
 
13
 * top-level directory of the distribution or, alternatively, at
 
14
 * <http://www.OpenLDAP.org/license.html>.
 
15
 */
 
16
 
 
17
#ifndef _AC_ALLOCA_H
 
18
#define _AC_ALLOCA_H
 
19
 
 
20
/*
 
21
 * use of alloca is disallowed as it is machine dependent
 
22
 */
 
23
#error  "alloca() not supported, use malloc()"
 
24
 
 
25
/* AIX requires this to be the first thing in the file.  */
 
26
#ifdef __GNUC__
 
27
# define alloca __builtin_alloca
 
28
#else
 
29
# if HAVE_ALLOCA_H
 
30
#  include <alloca.h>
 
31
# else
 
32
#  ifdef _AIX
 
33
#pragma alloca
 
34
#  else
 
35
#   ifndef alloca /* predefined by HP cc +Olibcalls */
 
36
extern char *(alloca)();
 
37
#   endif
 
38
#  endif
 
39
# endif
 
40
#endif
 
41
 
 
42
 
 
43
#endif /* _AC_ALLOCA_H */