annotate src/libsndfile-1.0.27/M4/flexible_array.m4 @ 168:ceec0dd9ec9c

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