diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-09-12 00:04:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-09-12 00:04:18 -0700 |
commit | d44208772d9a1366032b8f4032c98ddfab96187f (patch) | |
tree | 077fd50f8c9f46ad31f5db0c056abe9dd1aa7fd0 | |
parent | 6748a8b2495573c53f8288ec004e0e3b939916fd (diff) | |
download | txr-d44208772d9a1366032b8f4032c98ddfab96187f.tar.gz txr-d44208772d9a1366032b8f4032c98ddfab96187f.tar.bz2 txr-d44208772d9a1366032b8f4032c98ddfab96187f.zip |
Add forgotten alloca header under version control.
I had this file locally for the better part of a year!
Commit 13691a2cb390d91bb125712452fcf5909f23abd6 made on
December 31, 2018 claims that alloca.h was added.
In fact, it was not. Things work without it because
the #include "alloca.h" directives in the code end up
resolving to <alloca.h>. This is widely available so nobody
has seen a problem.
* alloca.h: New file.
-rw-r--r-- | alloca.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/alloca.h b/alloca.h new file mode 100644 index 00000000..93f232d3 --- /dev/null +++ b/alloca.h @@ -0,0 +1,38 @@ +/* Copyright 2019 + * Kaz Kylheku <kaz@kylheku.com> + * Vancouver, Canada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef alloca +#if HAVE_ALLOCA_stdlib +#include <stdlib.h> +#elif HAVE_ALLOCA_alloca +#include <alloca.h> +#elif HAVE_ALLOCA_malloc +#include <malloc.h> +#else +#error portme +#endif +#endif |