Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Ayer
f03d972937 Add get_directory_contents utility function 2014-07-02 22:10:09 -07:00
Andrew Ayer
e6bb66b93a Add touch_file() utility function 2014-06-26 23:03:30 -07:00
Cyril Cleaud
df2b472cd9 Add umask and rename compatibility wrappers for Windows
umask() doesn't exist on Windows and is thus a no-op.

rename() only works if the destination doesn't already exist,
so we must unlink before renaming.
2014-06-26 23:03:30 -07:00
Andrew Ayer
dcea03f0d7 Finish implementing Windows utility functions
This completes Windows support, except for the build system and
documentation.
2014-06-15 12:07:22 -07:00
Andrew Ayer
6e43b2a1cd New exec_command() that takes command as array instead of string
This abstracts away the details of argument quoting, which differs
between Unix and Windows.

Also replace all uses of the system() library call with exec_command().
Although system() exists on Windows, it executes the command via cmd.exe,
which has ridiculous escaping rules.
2014-06-12 21:23:04 -07:00
Andrew Ayer
0774ed018c Lay groundwork for Windows support
Move Unix-specific code to util-unix.cpp, and place Windows equivalents
in util-win32.cpp.  Most of the Windows functions are just stubs at
the moment, and we need a build system that works on Windows.
2014-06-12 21:23:02 -07:00