1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy. 2141cc406Sopenharmony_ci 3141cc406Sopenharmony_ci This file is part of the SANE package. 4141cc406Sopenharmony_ci 5141cc406Sopenharmony_ci SANE is free software; you can redistribute it and/or modify it under 6141cc406Sopenharmony_ci the terms of the GNU General Public License as published by the Free 7141cc406Sopenharmony_ci Software Foundation; either version 2 of the License, or (at your 8141cc406Sopenharmony_ci option) any later version. 9141cc406Sopenharmony_ci 10141cc406Sopenharmony_ci SANE is distributed in the hope that it will be useful, but WITHOUT 11141cc406Sopenharmony_ci ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12141cc406Sopenharmony_ci FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13141cc406Sopenharmony_ci for more details. 14141cc406Sopenharmony_ci 15141cc406Sopenharmony_ci You should have received a copy of the GNU General Public License 16141cc406Sopenharmony_ci along with sane; see the file COPYING. 17141cc406Sopenharmony_ci If not, see <https://www.gnu.org/licenses/>. 18141cc406Sopenharmony_ci 19141cc406Sopenharmony_ci As a special exception, the authors of SANE give permission for 20141cc406Sopenharmony_ci additional uses of the libraries contained in this release of SANE. 21141cc406Sopenharmony_ci 22141cc406Sopenharmony_ci The exception is that, if you link a SANE library with other files 23141cc406Sopenharmony_ci to produce an executable, this does not by itself cause the 24141cc406Sopenharmony_ci resulting executable to be covered by the GNU General Public 25141cc406Sopenharmony_ci License. Your use of that executable is in no way restricted on 26141cc406Sopenharmony_ci account of linking the SANE library code into it. 27141cc406Sopenharmony_ci 28141cc406Sopenharmony_ci This exception does not, however, invalidate any other reasons why 29141cc406Sopenharmony_ci the executable file might be covered by the GNU General Public 30141cc406Sopenharmony_ci License. 31141cc406Sopenharmony_ci 32141cc406Sopenharmony_ci If you submit changes to SANE to the maintainers to be included in 33141cc406Sopenharmony_ci a subsequent release, you agree by submitting the changes that 34141cc406Sopenharmony_ci those changes may be distributed with this exception intact. 35141cc406Sopenharmony_ci 36141cc406Sopenharmony_ci If you write modifications of your own for SANE, it is your choice 37141cc406Sopenharmony_ci whether to permit this exception to apply to your modifications. 38141cc406Sopenharmony_ci If you do not wish that, delete this exception notice. 39141cc406Sopenharmony_ci 40141cc406Sopenharmony_ci Choose suitable implementation of alloca. 41141cc406Sopenharmony_ci 42141cc406Sopenharmony_ci*/ 43141cc406Sopenharmony_ci 44141cc406Sopenharmony_ci#ifndef lalloca_h 45141cc406Sopenharmony_ci#define lalloca_h 46141cc406Sopenharmony_ci 47141cc406Sopenharmony_ci/* The idea how to do this is from the autoconf documentation */ 48141cc406Sopenharmony_ci 49141cc406Sopenharmony_ci/* AIX requires this to be the first thing in the file. */ 50141cc406Sopenharmony_ci#if defined(__GNUC__) 51141cc406Sopenharmony_ci# define alloca __builtin_alloca 52141cc406Sopenharmony_ci#else 53141cc406Sopenharmony_ci# if HAVE_ALLOCA_H 54141cc406Sopenharmony_ci# include <alloca.h> 55141cc406Sopenharmony_ci# else 56141cc406Sopenharmony_ci# ifdef _AIX 57141cc406Sopenharmony_ci#pragma alloca 58141cc406Sopenharmony_ci# else 59141cc406Sopenharmony_ci# ifndef alloca /* predefined by HP cc +Olibcalls */ 60141cc406Sopenharmony_ci/* Remap to internal version name as not to conflict with 61141cc406Sopenharmony_ci * other libraries that also add as util to their libraries. 62141cc406Sopenharmony_ci */ 63141cc406Sopenharmony_ci#define alloca sanei_alloca 64141cc406Sopenharmony_ci# if __STDC__ 65141cc406Sopenharmony_civoid *alloca (); 66141cc406Sopenharmony_ci# else 67141cc406Sopenharmony_cichar *alloca (); 68141cc406Sopenharmony_ci# endif 69141cc406Sopenharmony_ci# endif 70141cc406Sopenharmony_ci# endif 71141cc406Sopenharmony_ci# endif 72141cc406Sopenharmony_ci#endif 73141cc406Sopenharmony_ci 74141cc406Sopenharmony_ci#endif /* lalloca_h */ 75