diff options
| author | Michael Albinus | 2008-04-10 20:35:54 +0000 |
|---|---|---|
| committer | Michael Albinus | 2008-04-10 20:35:54 +0000 |
| commit | e89b536d4b54f200b2f9a6f4561d4b634ef4bbe0 (patch) | |
| tree | 08a40dbfe653a3b223c0f813837056b5164dd5fe | |
| parent | 31403b2446c0f130398c64bdfd3a0b81cc87baac (diff) | |
| download | emacs-e89b536d4b54f200b2f9a6f4561d4b634ef4bbe0.tar.gz emacs-e89b536d4b54f200b2f9a6f4561d4b634ef4bbe0.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.
| -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 34edb2370b3..3e222ecf376 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 | * w32menu.c (is_simple_dialog, simple_dialog_show): New functions. | 10 | * w32menu.c (is_simple_dialog, simple_dialog_show): New functions. |
diff --git a/src/fileio.c b/src/fileio.c index 6433fe93231..f9f37404b1a 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2878,7 +2878,6 @@ This is what happens in interactive use with M-x. */) | |||
| 2878 | return Qnil; | 2878 | return Qnil; |
| 2879 | } | 2879 | } |
| 2880 | 2880 | ||
| 2881 | #ifdef S_IFLNK | ||
| 2882 | DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, | 2881 | DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, |
| 2883 | "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", | 2882 | "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", |
| 2884 | doc: /* Make a symbolic link to FILENAME, named LINKNAME. | 2883 | doc: /* Make a symbolic link to FILENAME, named LINKNAME. |
| @@ -2923,6 +2922,7 @@ This happens for interactive use with M-x. */) | |||
| 2923 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, | 2922 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, |
| 2924 | linkname, ok_if_already_exists)); | 2923 | linkname, ok_if_already_exists)); |
| 2925 | 2924 | ||
| 2925 | #ifdef S_IFLNK | ||
| 2926 | encoded_filename = ENCODE_FILE (filename); | 2926 | encoded_filename = ENCODE_FILE (filename); |
| 2927 | encoded_linkname = ENCODE_FILE (linkname); | 2927 | encoded_linkname = ENCODE_FILE (linkname); |
| 2928 | 2928 | ||
| @@ -2949,8 +2949,13 @@ This happens for interactive use with M-x. */) | |||
| 2949 | } | 2949 | } |
| 2950 | UNGCPRO; | 2950 | UNGCPRO; |
| 2951 | return Qnil; | 2951 | return Qnil; |
| 2952 | } | 2952 | |
| 2953 | #else | ||
| 2954 | UNGCPRO; | ||
| 2955 | xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); | ||
| 2956 | |||
| 2953 | #endif /* S_IFLNK */ | 2957 | #endif /* S_IFLNK */ |
| 2958 | } | ||
| 2954 | 2959 | ||
| 2955 | #ifdef VMS | 2960 | #ifdef VMS |
| 2956 | 2961 | ||
| @@ -6637,9 +6642,7 @@ A non-nil value may result in data loss! */); | |||
| 6637 | defsubr (&Sdelete_file); | 6642 | defsubr (&Sdelete_file); |
| 6638 | defsubr (&Srename_file); | 6643 | defsubr (&Srename_file); |
| 6639 | defsubr (&Sadd_name_to_file); | 6644 | defsubr (&Sadd_name_to_file); |
| 6640 | #ifdef S_IFLNK | ||
| 6641 | defsubr (&Smake_symbolic_link); | 6645 | defsubr (&Smake_symbolic_link); |
| 6642 | #endif /* S_IFLNK */ | ||
| 6643 | #ifdef VMS | 6646 | #ifdef VMS |
| 6644 | defsubr (&Sdefine_logical_name); | 6647 | defsubr (&Sdefine_logical_name); |
| 6645 | #endif /* VMS */ | 6648 | #endif /* VMS */ |