(root)/
gawk-5.2.2/
replace.c
       1  /*
       2   * replace.c -- Get replacement versions of functions.
       3   */
       4  
       5  /*
       6   * Copyright (C) 1989, 1991-2014, 2018, 2022, the Free Software Foundation, Inc.
       7   *
       8   * This file is part of GAWK, the GNU implementation of the
       9   * AWK Programming Language.
      10   *
      11   * GAWK is free software; you can redistribute it and/or modify
      12   * it under the terms of the GNU General Public License as published by
      13   * the Free Software Foundation; either version 3 of the License, or
      14   * (at your option) any later version.
      15   *
      16   * GAWK is distributed in the hope that it will be useful,
      17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19   * GNU General Public License for more details.
      20   *
      21   * You should have received a copy of the GNU General Public License
      22   * along with this program; if not, write to the Free Software
      23   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
      24   */
      25  
      26  /*
      27   * Do all necessary includes here, so that we don't have to worry about
      28   * overlapping includes in the files in missing.d.
      29   */
      30  #include "awk.h"	/* includes config.h for us */
      31  
      32  
      33  #ifndef HAVE_SYSTEM
      34  #include "missing_d/system.c"
      35  #endif /* HAVE_SYSTEM */
      36  
      37  #ifndef HAVE_MEMCMP
      38  #include "missing_d/memcmp.c"
      39  #endif	/* HAVE_MEMCMP */
      40  
      41  #ifndef HAVE_MEMCPY
      42  #include "missing_d/memcpy.c"
      43  #endif	/* HAVE_MEMCPY */
      44  
      45  #ifndef HAVE_MEMSET
      46  #include "missing_d/memset.c"
      47  #endif	/* HAVE_MEMSET */
      48  
      49  #ifndef HAVE_MEMMOVE
      50  #include "missing_d/memmove.c"
      51  #endif	/* HAVE_MEMMOVE */
      52  
      53  #if !defined(HAVE_STRNCASECMP) || !defined(HAVE_STRCASECMP)
      54  #include "missing_d/strncasecmp.c"
      55  #endif	/* HAVE_STRCASE */
      56  
      57  #ifndef HAVE_STRERROR
      58  #include "missing_d/strerror.c"
      59  #endif	/* HAVE_STRERROR */
      60  
      61  #ifndef HAVE_STRFTIME
      62  # ifdef __MINGW32__
      63  /* Need to use underlying_strftime in replacement strftime.  */
      64  #  define HAVE_STRFTIME 1
      65  # endif
      66  #include "missing_d/strftime.c"
      67  # ifdef __MINGW32__
      68  #  undef HAVE_STRFTIME
      69  # endif
      70  #endif	/* HAVE_STRFTIME */
      71  
      72  #ifndef HAVE_STRCHR
      73  #include "missing_d/strchr.c"
      74  #endif	/* HAVE_STRCHR */
      75  
      76  #if !defined(HAVE_STRTOD)
      77  #include "missing_d/strtod.c"
      78  #endif	/* HAVE_STRTOD */
      79  
      80  #ifndef HAVE_STRTOUL
      81  #include "missing_d/strtoul.c"
      82  #endif	/* HAVE_STRTOUL */
      83  
      84  #ifndef HAVE_TZSET
      85  #include "missing_d/tzset.c"
      86  #endif /* HAVE_TZSET */
      87  
      88  #ifndef HAVE_MKTIME
      89  /* mktime.c defines main() if DEBUG is set */
      90  #undef DEBUG
      91  #include "missing_d/mktime.c"
      92  #endif /* HAVE_MKTIME */
      93  
      94  #ifndef HAVE_TIMEGM
      95  #include "missing_d/timegm.c"
      96  #endif /* HAVE_TIMEGM */
      97  
      98  #ifndef HAVE_SNPRINTF
      99  #include "missing_d/snprintf.c"
     100  #endif
     101  
     102  #if defined(HAVE_SOCKETS) && ! defined(HAVE_GETADDRINFO)
     103  #include "missing_d/getaddrinfo.c"
     104  #endif
     105  
     106  #ifndef HAVE_USLEEP
     107  #include "missing_d/usleep.c"
     108  #endif
     109  
     110  #ifndef HAVE_SETENV
     111  #include "missing_d/setenv.c"
     112  #endif
     113  
     114  #ifndef HAVE_STRCOLL
     115  #include "missing_d/strcoll.c"
     116  #endif
     117  
     118  #ifndef HAVE_STRSIGNAL
     119  #include "missing_d/strsignal.c"
     120  #endif