annotate src/libsndfile-1.0.27/M4/flexible_array.m4 @ 84:08ae793730bd

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