"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "m4/getcwd.m4" between
le-1.16.5.tar.gz and le-1.16.6.tar.gz

About: le is a terminal text editor (many block operations with stream and rectangular blocks, tunable syntax highlighting, etc.).

getcwd.m4  (le-1.16.5):getcwd.m4  (le-1.16.6)
# getcwd.m4 - check for working getcwd that is compatible with glibc # getcwd.m4 - check for working getcwd that is compatible with glibc
# Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. # Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert. # Written by Paul Eggert.
# serial 14 # serial 16
AC_DEFUN([gl_FUNC_GETCWD_NULL], AC_DEFUN([gl_FUNC_GETCWD_NULL],
[ [
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[gl_cv_func_getcwd_null], [gl_cv_func_getcwd_null],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
# include <stdlib.h> # include <stdlib.h>
# if HAVE_UNISTD_H # if HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
# else /* on Windows with MSVC */ # else /* on Windows with MSVC */
# include <direct.h> # include <direct.h>
# endif # endif
# ifndef getcwd # ifndef getcwd
char *getcwd (); char *getcwd ();
# endif # endif
]], [[ ]], [[
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ #if defined _WIN32 && ! defined __CYGWIN__
/* mingw cwd does not start with '/', but getcwd does allocate. /* mingw cwd does not start with '/', but getcwd does allocate.
However, mingw fails to honor non-zero size. */ However, mingw fails to honor non-zero size. */
#else #else
if (chdir ("/") != 0) if (chdir ("/") != 0)
return 1; return 1;
else else
{ {
char *f = getcwd (NULL, 0); char *f = getcwd (NULL, 0);
if (! f) if (! f)
return 2; return 2;
skipping to change at line 51 skipping to change at line 51
if (f[1] != '\0') if (f[1] != '\0')
{ free (f); return 4; } { free (f); return 4; }
free (f); free (f);
return 0; return 0;
} }
#endif #endif
]])], ]])],
[gl_cv_func_getcwd_null=yes], [gl_cv_func_getcwd_null=yes],
[gl_cv_func_getcwd_null=no], [gl_cv_func_getcwd_null=no],
[[case "$host_os" in [[case "$host_os" in
# Guess yes on glibc systems. # Guess yes on glibc systems.
*-gnu*) gl_cv_func_getcwd_null="guessing yes";; *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
# Guess yes on Cygwin. # Guess yes on Cygwin.
cygwin*) gl_cv_func_getcwd_null="guessing yes";; cygwin*) gl_cv_func_getcwd_null="guessing yes";;
# If we don't know, assume the worst. # If we don't know, assume the worst.
*) gl_cv_func_getcwd_null="guessing no";; *) gl_cv_func_getcwd_null="guessing no";;
esac esac
]])]) ]])])
]) ])
AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE], AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE],
[ [
AC_CACHE_CHECK([for getcwd with POSIX signature], AC_CACHE_CHECK([for getcwd with POSIX signature],
[gl_cv_func_getcwd_posix_signature], [gl_cv_func_getcwd_posix_signature],
[AC_COMPILE_IFELSE( [AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
 End of changes. 4 change blocks. 
9 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)