> -----Original Message----- > From: Rainer Orth <r...@cebitec.uni-bielefeld.de> > Sent: Friday, April 18, 2025 07:50 > To: Andreas Schwab <sch...@linux-m68k.org> > Cc: gcc-patches@gcc.gnu.org; Robert Dubner <rdub...@symas.com>; James K. > Lowden <jklow...@cobolworx.com>; Jakub Jelinek <ja...@redhat.com> > Subject: Re: [PATCH] libgcobol: Check for struct tm tm_zone > > Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > > > Hi Andreas, > > > >> On Apr 11 2025, Rainer Orth wrote: > >> > >>> This patch uses Autoconf's AC_STRUCT_TIMEZONE to determine its > presence > >>> and guard the use accordingly. > >> > >> You cannot use AC_STRUCT_TIMEZONE because it requires a link test > (which > >> is forbidden in a target module, see PR119550). > > > > drats. Must have taken this from libstdc++ shortly before it was > > replaced. > > > > I suspect a simple > > > > AC_CHECK_MEMBER([struct tm.tm_zone],,[#include <time.h>]) > > > > does the trick. > > > > Thanks for the hint. > > That's what I actually tested on amd64-pc-solaris2.11, > sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. > > Ok for trunk and gcc-15 branch?
Looks good to me. > > Rainer > > -- > -------------------------------------------------------------------------- > --- > Rainer Orth, Center for Biotechnology, Bielefeld University > > > 2025-04-08 Rainer Orth <r...@cebitec.uni-bielefeld.de> > > libgcobol: > * configure.ac: Check for struct tm.tm_zone. > * configure, config.h.in: Regenerate. > * intrinsic.cc (__gg__formatted_current_date): Guard tm.tm_zone > use with HAVE_STRUCT_TM_TM_ZONE.