Changeset 1213


Ignore:
Timestamp:
Oct 9, 2010, 4:47:10 PM (11 years ago)
Author:
Peter Johansson
Message:

avoid using GNU extensions. fixes #478

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/rmdirhier.cc

    r1186 r1213  
    2525#include "utility.h"
    2626
     27#include <cstdio>
    2728#include <cstring>
    2829#include <dirent.h>
     
    7576      // Make sure file is removable before removing it
    7677      chmod(dir.c_str(),S_IWRITE);
    77       if (unlink(dir.c_str()))
     78      if (remove(dir.c_str()))
    7879        throw FileDeleteError(concatenate_path(pwd(),dir));
    7980      return;
     
    9798    // Remove the directory from its parent
    9899    chdir("..");
    99     if (rmdir(dir.c_str()))
     100    if (remove(dir.c_str()))
    100101      throw DirectoryDeleteError(concatenate_path(pwd(),dir));
    101102  }
Note: See TracChangeset for help on using the changeset viewer.