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:06:03 -0700 |
commit | 2f1fdf30d8319994069326976865190561503600 (patch) | |
tree | 077fd50f8c9f46ad31f5db0c056abe9dd1aa7fd0 /alloca.h | |
parent | 850fed40a8cd0858025de3abc6a8cef07ea3eae1 (diff) | |
download | txr-2f1fdf30d8319994069326976865190561503600.tar.gz txr-2f1fdf30d8319994069326976865190561503600.tar.bz2 txr-2f1fdf30d8319994069326976865190561503600.zip |
Add forgotten alloca header under version control.
I had this file locally for the better part of a year!
Commit 5e4c74dfd5927b3829b4f5e04a7964dbac6a4f34 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.
Diffstat (limited to 'alloca.h')
-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 |