diff options
author | Michael Albinus <[email protected]> | 2008-04-10 20:47:59 +0000 |
---|---|---|
committer | Michael Albinus <[email protected]> | 2008-04-10 20:47:59 +0000 |
commit | 474d35ca3f9f6942ddaaee2298e83185a736a688 (patch) | |
tree | 45101e68c37cb5d5ec743b397fe05206b3c24352 /src | |
parent | bd73563158de9b663c701735c96db760c0ed20c4 (diff) |
* 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/fileio.c | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 81379fd113..1894f6d99a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-04-10 Michael Albinus <[email protected]> + + * 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. + 2008-04-10 Jason Rumney <[email protected]> * w32.c (stat): When Vw32_get_true_file_attributes is Qlocal, get diff --git a/src/fileio.c b/src/fileio.c index 511cca59fd..cc6c7c2d3a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2871,7 +2871,6 @@ This is what happens in interactive use with M-x. */) 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 @@ This happens for interactive use with M-x. */) 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 @@ This happens for interactive use with M-x. */) } UNGCPRO; return Qnil; -} + +#else + UNGCPRO; + xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); + #endif /* S_IFLNK */ +} #ifdef VMS @@ -6779,9 +6784,7 @@ A non-nil value may result in data loss! */); 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 */ |