Mercurial > emacs
changeset 80488:df2738e4f7ad
* fileio.c (Fmake_symbolic_link): Surround code by #ifdef S_IFLNK
only after check for file name handler functions. Signal, when
native functionality is not supported.
(syms_of_fileio): Declare it unconditionally.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Thu, 10 Apr 2008 20:46:42 +0000 |
parents | b401fc62b3a1 |
children | fc6d47996893 |
files | src/fileio.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Thu Apr 10 10:44:51 2008 +0000 +++ b/src/fileio.c Thu Apr 10 20:46:42 2008 +0000 @@ -2871,7 +2871,6 @@ return Qnil; } -#ifdef S_IFLNK DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", doc: /* Make a symbolic link to FILENAME, named LINKNAME. @@ -2916,6 +2915,7 @@ RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, linkname, ok_if_already_exists)); +#ifdef S_IFLNK encoded_filename = ENCODE_FILE (filename); encoded_linkname = ENCODE_FILE (linkname); @@ -2942,8 +2942,13 @@ } UNGCPRO; return Qnil; + +#else + UNGCPRO; + xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); + +#endif /* S_IFLNK */ } -#endif /* S_IFLNK */ #ifdef VMS @@ -6779,9 +6784,7 @@ defsubr (&Sdelete_file); defsubr (&Srename_file); defsubr (&Sadd_name_to_file); -#ifdef S_IFLNK defsubr (&Smake_symbolic_link); -#endif /* S_IFLNK */ #ifdef VMS defsubr (&Sdefine_logical_name); #endif /* VMS */