Mercurial > hg > sv-dependency-builds
annotate src/libsndfile-1.0.25/M4/flexible_array.m4 @ 88:fe7c3a0b0259
Add some MinGW builds
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 20 Mar 2013 13:49:36 +0000 |
parents | 545efbb81310 |
children |
rev | line source |
---|---|
cannam@85 | 1 dnl @synopsis MN_C99_FLEXIBLE_ARRAY |
cannam@85 | 2 dnl |
cannam@85 | 3 dnl Dose the compiler support the 1999 ISO C Standard "stuct hack". |
cannam@85 | 4 dnl @version 1.1 Mar 15 2004 |
cannam@85 | 5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com> |
cannam@85 | 6 dnl |
cannam@85 | 7 dnl Permission to use, copy, modify, distribute, and sell this file for any |
cannam@85 | 8 dnl purpose is hereby granted without fee, provided that the above copyright |
cannam@85 | 9 dnl and this permission notice appear in all copies. No representations are |
cannam@85 | 10 dnl made about the suitability of this software for any purpose. It is |
cannam@85 | 11 dnl provided "as is" without express or implied warranty. |
cannam@85 | 12 |
cannam@85 | 13 AC_DEFUN([MN_C99_FLEXIBLE_ARRAY], |
cannam@85 | 14 [AC_CACHE_CHECK(C99 struct flexible array support, |
cannam@85 | 15 ac_cv_c99_flexible_array, |
cannam@85 | 16 |
cannam@85 | 17 # Initialize to unknown |
cannam@85 | 18 ac_cv_c99_flexible_array=no |
cannam@85 | 19 |
cannam@85 | 20 AC_TRY_LINK([[ |
cannam@85 | 21 #include <stdlib.h> |
cannam@85 | 22 typedef struct { |
cannam@85 | 23 int k; |
cannam@85 | 24 char buffer [] ; |
cannam@85 | 25 } MY_STRUCT ; |
cannam@85 | 26 ]], |
cannam@85 | 27 [ MY_STRUCT *p = calloc (1, sizeof (MY_STRUCT) + 42); ], |
cannam@85 | 28 ac_cv_c99_flexible_array=yes, |
cannam@85 | 29 ac_cv_c99_flexible_array=no |
cannam@85 | 30 ))] |
cannam@85 | 31 ) # MN_C99_FLEXIBLE_ARRAY |
cannam@85 | 32 |