epoc32/include/stdapis/glib-2.0/glib/galloca.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/galloca.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/galloca.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,63 @@
     1.4 -galloca.h
     1.5 +/* GLIB - Library of useful routines for C programming
     1.6 + * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
     1.7 + * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
     1.8 + *
     1.9 + * This library is free software; you can redistribute it and/or
    1.10 + * modify it under the terms of the GNU Lesser General Public
    1.11 + * License as published by the Free Software Foundation; either
    1.12 + * version 2 of the License, or (at your option) any later version.
    1.13 + *
    1.14 + * This library is distributed in the hope that it will be useful,
    1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.17 + * Lesser General Public License for more details.
    1.18 + *
    1.19 + * You should have received a copy of the GNU Lesser General Public
    1.20 + * License along with this library; if not, write to the
    1.21 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.22 + * Boston, MA 02111-1307, USA.
    1.23 + */
    1.24 +
    1.25 +/*
    1.26 + * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
    1.27 + * file for a list of people on the GLib Team.  See the ChangeLog
    1.28 + * files for a list of changes.  These files are distributed with
    1.29 + * GLib at ftp://ftp.gtk.org/pub/gtk/. 
    1.30 + */
    1.31 +
    1.32 +#ifndef __G_ALLOCA_H__
    1.33 +#define __G_ALLOCA_H__
    1.34 +
    1.35 +#include <glib/gtypes.h>
    1.36 +
    1.37 +#ifdef  __GNUC__
    1.38 +/* GCC does the right thing */
    1.39 +# undef alloca
    1.40 +# define alloca(size)   __builtin_alloca (size)
    1.41 +#elif defined (GLIB_HAVE_ALLOCA_H)
    1.42 +/* a native and working alloca.h is there */ 
    1.43 +# include <alloca.h>
    1.44 +#elif defined(__SYMBIAN32__)
    1.45 +#  define alloca g_malloc
    1.46 +#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
    1.47 +# ifdef _MSC_VER
    1.48 +#  include <malloc.h>
    1.49 +#  define alloca _alloca
    1.50 +# else /* !_MSC_VER */
    1.51 +#  ifdef _AIX
    1.52 +#   pragma alloca
    1.53 +#  else /* !_AIX */
    1.54 +#   ifndef alloca /* predefined by HP cc +Olibcalls */
    1.55 +G_BEGIN_DECLS
    1.56 +char *alloca ();
    1.57 +G_END_DECLS
    1.58 +#   endif /* !alloca */
    1.59 +#  endif /* !_AIX */
    1.60 +# endif /* !_MSC_VER */
    1.61 +#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
    1.62 +
    1.63 +#define g_alloca(size)		 alloca (size)
    1.64 +#define g_newa(struct_type, n_structs)	((struct_type*) g_alloca (sizeof (struct_type) * (gsize) (n_structs)))
    1.65 +
    1.66 +
    1.67 +#endif /* __G_ALLOCA_H__ */