Mercurial > hg > octave-lyh > gnulib-hg
changeset 7601:144308705998
* lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
(CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
* m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
Check for functions and headers just once.
Check for declaration of canonicalize_file_name.
Define PROVIDE_CANONICALIZE_FILENAME_MODE.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 03 Nov 2006 23:17:27 +0000 |
parents | 42c51a6fef88 |
children | adf3720ff325 |
files | ChangeLog lib/canonicalize.h m4/canonicalize.m4 |
diffstat | 3 files changed, 23 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-11-03 Paul Eggert <eggert@cs.ucla.edu> + + * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING): + (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode): + Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined. + * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): + Check for functions and headers just once. + Check for declaration of canonicalize_file_name. + Define PROVIDE_CANONICALIZE_FILENAME_MODE. + 2006-11-02 Charles Wilson <cygwin@cwilson.fastmail.fm> * gnulib-tool (func_import): Fix typo in actioncmd.
--- a/lib/canonicalize.h +++ b/lib/canonicalize.h @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996-2005 Free Software Foundation, Inc. + Copyright (C) 1996-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #ifndef CANONICALIZE_H_ # define CANONICALIZE_H_ +# ifdef PROVIDE_CANONICALIZE_FILENAME_MODE enum canonicalize_mode_t { /* All components must exist. */ @@ -33,8 +34,11 @@ typedef enum canonicalize_mode_t canonicalize_mode_t; char *canonicalize_filename_mode (const char *, canonicalize_mode_t); +# endif -# if !HAVE_CANONICALIZE_FILE_NAME +# if HAVE_DECL_CANONICALIZE_FILE_NAME +# include <stdlib.h> +# else char *canonicalize_file_name (const char *); # endif
--- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,6 +1,6 @@ -#serial 10 +#serial 11 -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,9 @@ [ AC_LIBOBJ([canonicalize]) - AC_CHECK_HEADERS(sys/param.h) - AC_CHECK_FUNCS(resolvepath canonicalize_file_name) + AC_CHECK_HEADERS_ONCE([sys/param.h]) + AC_CHECK_DECLS_ONCE([canonicalize_file_name]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name resolvepath]) + AC_DEFINE([PROVIDE_CANONICALIZE_FILENAME_MODE], 1, + [Define to 1 to provide canonicalize_filename_mode.]) ])