diff options
| author | Eli Zaretskii | 2008-08-29 10:08:26 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-08-29 10:08:26 +0000 |
| commit | 565f0b98c20501d33d8f8112891d72888b559b67 (patch) | |
| tree | a0fb5d9ddb10f90bb34f9f408e6d1fe1ce45c5d1 /src | |
| parent | fa79be7e04de685abe4e22f9daa175623c7a2a55 (diff) | |
| download | emacs-565f0b98c20501d33d8f8112891d72888b559b67.tar.gz emacs-565f0b98c20501d33d8f8112891d72888b559b67.zip | |
(Fexpand_file_name): Copy argument `name' into local storage on all platforms,
not just on DOS_NT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3faea824ff0..9bab3609af6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-08-29 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Fexpand_file_name): Copy argument `name' into local | ||
| 4 | storage on all platforms, not just on DOS_NT. | ||
| 5 | |||
| 1 | 2008-08-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2008-08-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * mac.c (mac_system_script_code): Use EMACS_INT for DEFVAR_INT variable. | 8 | * mac.c (mac_system_script_code): Use EMACS_INT for DEFVAR_INT variable. |
diff --git a/src/fileio.c b/src/fileio.c index 81836bd8213..d925543c8d1 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1149,11 +1149,10 @@ See also the function `substitute-in-file-name'. */) | |||
| 1149 | nm = SDATA (name); | 1149 | nm = SDATA (name); |
| 1150 | multibyte = STRING_MULTIBYTE (name); | 1150 | multibyte = STRING_MULTIBYTE (name); |
| 1151 | 1151 | ||
| 1152 | #ifdef DOS_NT | 1152 | /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */ |
| 1153 | /* We will force directory separators to be either all \ or /, so make | ||
| 1154 | a local copy to modify, even if there ends up being no change. */ | ||
| 1155 | nm = strcpy (alloca (strlen (nm) + 1), nm); | 1153 | nm = strcpy (alloca (strlen (nm) + 1), nm); |
| 1156 | 1154 | ||
| 1155 | #ifdef DOS_NT | ||
| 1157 | /* Note if special escape prefix is present, but remove for now. */ | 1156 | /* Note if special escape prefix is present, but remove for now. */ |
| 1158 | if (nm[0] == '/' && nm[1] == ':') | 1157 | if (nm[0] == '/' && nm[1] == ':') |
| 1159 | { | 1158 | { |
| @@ -1340,7 +1339,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1340 | } | 1339 | } |
| 1341 | return name; | 1340 | return name; |
| 1342 | #else /* not DOS_NT */ | 1341 | #else /* not DOS_NT */ |
| 1343 | if (nm == SDATA (name)) | 1342 | if (strcmp (nm, SDATA (name)) == 0) |
| 1344 | return name; | 1343 | return name; |
| 1345 | return make_specified_string (nm, -1, strlen (nm), multibyte); | 1344 | return make_specified_string (nm, -1, strlen (nm), multibyte); |
| 1346 | #endif /* not DOS_NT */ | 1345 | #endif /* not DOS_NT */ |