Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 18 Nov 2019 20:04:59 -0800
From: Michael Forney <mforney@...rney.org>
To: musl@...ts.openwall.com
Subject: [PATCH] Unconditonally define alloca as __builtin_alloca

This enables alternative compilers, which may not define __GNUC__,
to implement alloca, which is still fairly widely used.

This is similar to how stdarg.h already works in musl; compilers must
implement __builtin_va_arg, there is no fallback definition.
---
 include/alloca.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/alloca.h b/include/alloca.h
index d2e6f1c6..8ae8a30d 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -8,11 +8,7 @@ extern "C" {
 #define	__NEED_size_t
 #include <bits/alltypes.h>
 
-void *alloca(size_t);
-
-#ifdef __GNUC__
 #define alloca __builtin_alloca
-#endif
 
 #ifdef __cplusplus
 }
-- 
2.20.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.