Ticket #12622: macports-ftscompare.patch
File macports-ftscompare.patch, 927 bytes (added by afb@…, 17 years ago) |
---|
-
src/pextlib1.0/fs-traverse.c
127 127 return rval; 128 128 } 129 129 130 static int 131 do_compare(const FTSENT **a, const FTSENT **b) 132 { 133 if ((*a)->fts_info == FTS_ERR || (*b)->fts_info == FTS_ERR) 134 return 0; 135 136 return strcmp((*a)->fts_name, (*b)->fts_name); 137 } 138 130 139 static int 131 140 do_traverse(Tcl_Interp *interp, int flags, char * CONST *targets, Tcl_Obj *varname, Tcl_Obj *body) 132 141 { … … 134 143 FTS *root_fts; 135 144 FTSENT *ent; 136 145 137 root_fts = fts_open(targets, FTS_PHYSICAL /*| FTS_COMFOLLOW */| FTS_NOCHDIR | FTS_XDEV, NULL);146 root_fts = fts_open(targets, FTS_PHYSICAL /*| FTS_COMFOLLOW */| FTS_NOCHDIR | FTS_XDEV, &do_compare); 138 147 139 148 while ((ent = fts_read(root_fts)) != NULL) { 140 149 switch (ent->fts_info) {