~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to debian/patches/134_dir_checkdir.patch

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- ruby-1.8.5/file.c   7 Sep 2006 14:28:36 -0000       1.169.2.52
2
 
+++ ruby-1.8.5/file.c   25 Sep 2006 12:25:29 -0000      1.169.2.53
3
 
@@ -2427,9 +2427,8 @@ rb_path_last_separator(path)
4
 
     return last;
5
 
 }
6
 
 
7
 
-#define chompdirsep rb_path_end
8
 
 char *
9
 
-rb_path_end(path)
10
 
+chompdirsep(path)
11
 
     const char *path;
12
 
 {
13
 
     while (*path) {
14
 
@@ -2445,6 +2444,14 @@ rb_path_end(path)
15
 
     return (char *)path;
16
 
 }
17
 
 
18
 
+char *
19
 
+rb_path_end(path)
20
 
+    const char *path;
21
 
+{
22
 
+    if (isdirsep(*path)) path++;
23
 
+    return chompdirsep(path);
24
 
+}
25
 
+
26
 
 #define BUFCHECK(cond) do {\
27
 
     long bdiff = p - buf;\
28
 
     while (cond) {\
29
 
@@ -2821,7 +2828,7 @@ static VALUE
30
 
 rb_file_s_dirname(klass, fname)
31
 
     VALUE klass, fname;
32
 
 {
33
 
-    char *name, *root, *p;
34
 
+    const char *name, *root, *p;
35
 
     VALUE dirname;
36
 
 
37
 
     name = StringValueCStr(fname);
38
 
@@ -2841,8 +2848,9 @@ rb_file_s_dirname(klass, fname)
39
 
        return rb_str_new2(".");
40
 
 #ifdef DOSISH_DRIVE_LETTER
41
 
     if (has_drive_letter(name) && isdirsep(*(name + 2))) {
42
 
+       const char *top = skiproot(name + 2);
43
 
        dirname = rb_str_new(name, 3);
44
 
-       rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));
45
 
+       rb_str_cat(dirname, top, p - top);
46
 
     }
47
 
     else
48
 
 #endif