Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 1caff7c613273e3ad3043bb7b2f3a5dcb31506da |
|---|---|
| Date: | 2010-03-10 21:06:01 |
| User: | stephan |
| Comment: | added missing #include |
Tags And Properties
- branch=trunk inherited from [c3e484d316]
- sym-trunk inherited from [c3e484d316]
Changes
Changes to pfs/cp.c
| Old (92c39d8cd8b3381e) | New (cab4f80688aecced) | |||
|---|---|---|---|---|
| 1 | /************************************************************************ | 1 | /************************************************************************ | |
| 2 | Author: Stephan Beal (http://wanderinghorse.net/home/stephan/) | 2 | Author: Stephan Beal (http://wanderinghorse.net/home/stephan/) | |
| 3 | 3 | |||
| 4 | License: Public Domain | 4 | License: Public Domain | |
| 5 | ************************************************************************/ | 5 | ************************************************************************/ | |
| 16 hidden lines | ||||
| 22 | #include <time.h> // localtime() | 22 | #include <time.h> // localtime() | |
| 23 | #include <wh/whio/whio_devs.h> | 23 | #include <wh/whio/whio_devs.h> | |
| 24 | #include "EPFSApp.c" | 24 | #include "EPFSApp.c" | |
| 25 | 25 | |||
| 26 | /** @def USE_POSIX_STAT | 26 | /** @def USE_POSIX_STAT | |
| 27 | If USE_POSIX_STAT is true then the copy routines will try to | | | 27 | |
| 28 | keep the timestamp for imported files. i haven't yet found a way | | | 28 | If USE_POSIX_STAT is true then the copy routines will try to keep the |
| 29 | to restore the timestamp on exported files. | | | 29 | timestamp for imported/exported files. |
| 30 | */ | 30 | */ | |
| 31 | #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) | 31 | #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) | |
| 32 | // Assume we have stat() (POSIX-1.2001). | 32 | // Assume we have stat() (POSIX-1.2001). | |
| 33 | # define USE_POSIX_STAT 1 | 33 | # define USE_POSIX_STAT 1 | |
| 34 | #else | 34 | #else | |
| 36 | #endif | 36 | #endif | |
| 37 | 37 | |||
| 38 | #if USE_POSIX_STAT | 38 | #if USE_POSIX_STAT | |
| 39 | # include <sys/types.h> | 39 | # include <sys/types.h> | |
| 40 | # include <sys/stat.h> | 40 | # include <sys/stat.h> | |
| > | 41 | # include <utime.h> | ||
| 41 | # include <unistd.h> | 42 | # include <unistd.h> | |
| 42 | /** POSIX 2008 marks utime() as obsolete, but i don't know of another | 43 | /** POSIX 2008 marks utime() as obsolete, but i don't know of another | |
| 43 | way to set a file's timestamp. | 44 | way to set a file's timestamp. | |
| 44 | */ | 45 | */ | |
| 45 | #include <utime.h> | 46 | #include <utime.h> | |
| 266 hidden lines | ||||
| 312 | AppCp.stdout->api->finalize( AppCp.stdout ); | 313 | AppCp.stdout->api->finalize( AppCp.stdout ); | |
| 313 | AppCp.stdout = 0; | 314 | AppCp.stdout = 0; | |
| 314 | } | 315 | } | |
| 315 | } | 316 | } | |
| 316 | 317 | |||
| 317 | int main (int argc, char const ** argv) | | | 318 | int main(int argc, char const ** argv) |
| 318 | { | 319 | { | |
| 319 | EPFSApp_very_first_thing(); | 320 | EPFSApp_very_first_thing(); | |
| 320 | EPFSApp.usageText = "[flags] epfs_file filename..."; | 321 | EPFSApp.usageText = "[flags] epfs_file filename..."; | |
| 321 | EPFSApp.appVersion = "20090216"; | 322 | EPFSApp.appVersion = "20090216"; | |
| 322 | EPFSApp.helpFunction = cp_help; | 323 | EPFSApp.helpFunction = cp_help; | |
| 68 hidden lines | ||||
| 391 | } | 392 | } | |
| 392 | } | 393 | } | |
| 393 | EPFSApp_verbose_error_code( rc ); | 394 | EPFSApp_verbose_error_code( rc ); | |
| 394 | return rc; | 395 | return rc; | |
| 395 | } | 396 | } | |