diff options
| author | Michael Albinus | 2008-04-10 20:47:59 +0000 |
|---|---|---|
| committer | Michael Albinus | 2008-04-10 20:47:59 +0000 |
| commit | 474d35ca3f9f6942ddaaee2298e83185a736a688 (patch) | |
| tree | 45101e68c37cb5d5ec743b397fe05206b3c24352 /src | |
| parent | bd73563158de9b663c701735c96db760c0ed20c4 (diff) | |
| download | emacs-474d35ca3f9f6942ddaaee2298e83185a736a688.tar.gz emacs-474d35ca3f9f6942ddaaee2298e83185a736a688.zip | |
* 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 81379fd1130..1894f6d99ad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-04-10 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * fileio.c (Fmake_symbolic_link): Surround code by #ifdef S_IFLNK | ||
| 4 | only after check for file name handler functions. Signal, when | ||
| 5 | native functionality is not supported. | ||
| 6 | (syms_of_fileio): Declare it unconditionally. | ||
| 7 | |||
| 1 | 2008-04-10 Jason Rumney <jasonr@gnu.org> | 8 | 2008-04-10 Jason Rumney <jasonr@gnu.org> |
| 2 | 9 | ||
| 3 | * w32.c (stat): When Vw32_get_true_file_attributes is Qlocal, get | 10 | * w32.c (stat): When Vw32_get_true_file_attributes is Qlocal, get |
diff --git a/src/fileio.c b/src/fileio.c index 511cca59fdb..cc6c7c2d3a7 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2871,7 +2871,6 @@ This is what happens in interactive use with M-x. */) | |||
| 2871 | return Qnil; | 2871 | return Qnil; |
| 2872 | } | 2872 | } |
| 2873 | 2873 | ||
| 2874 | #ifdef S_IFLNK | ||
| 2875 | DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, | 2874 | DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, |
| 2876 | "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", | 2875 | "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", |
| 2877 | doc: /* Make a symbolic link to FILENAME, named LINKNAME. | 2876 | doc: /* Make a symbolic link to FILENAME, named LINKNAME. |
| @@ -2916,6 +2915,7 @@ This happens for interactive use with M-x. */) | |||
| 2916 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, | 2915 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, |
| 2917 | linkname, ok_if_already_exists)); | 2916 | linkname, ok_if_already_exists)); |
| 2918 | 2917 | ||
| 2918 | #ifdef S_IFLNK | ||
| 2919 | encoded_filename = ENCODE_FILE (filename); | 2919 | encoded_filename = ENCODE_FILE (filename); |
| 2920 | encoded_linkname = ENCODE_FILE (linkname); | 2920 | encoded_linkname = ENCODE_FILE (linkname); |
| 2921 | 2921 | ||
| @@ -2942,8 +2942,13 @@ This happens for interactive use with M-x. */) | |||
| 2942 | } | 2942 | } |
| 2943 | UNGCPRO; | 2943 | UNGCPRO; |
| 2944 | return Qnil; | 2944 | return Qnil; |
| 2945 | } | 2945 | |
| 2946 | #else | ||
| 2947 | UNGCPRO; | ||
| 2948 | xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); | ||
| 2949 | |||
| 2946 | #endif /* S_IFLNK */ | 2950 | #endif /* S_IFLNK */ |
| 2951 | } | ||
| 2947 | 2952 | ||
| 2948 | #ifdef VMS | 2953 | #ifdef VMS |
| 2949 | 2954 | ||
| @@ -6779,9 +6784,7 @@ A non-nil value may result in data loss! */); | |||
| 6779 | defsubr (&Sdelete_file); | 6784 | defsubr (&Sdelete_file); |
| 6780 | defsubr (&Srename_file); | 6785 | defsubr (&Srename_file); |
| 6781 | defsubr (&Sadd_name_to_file); | 6786 | defsubr (&Sadd_name_to_file); |
| 6782 | #ifdef S_IFLNK | ||
| 6783 | defsubr (&Smake_symbolic_link); | 6787 | defsubr (&Smake_symbolic_link); |
| 6784 | #endif /* S_IFLNK */ | ||
| 6785 | #ifdef VMS | 6788 | #ifdef VMS |
| 6786 | defsubr (&Sdefine_logical_name); | 6789 | defsubr (&Sdefine_logical_name); |
| 6787 | #endif /* VMS */ | 6790 | #endif /* VMS */ |