Changeset 3492
- Timestamp:
- 04/25/08 14:49:11 (6 months ago)
- Files:
-
- 1 modified
-
trunk/src/tools/rutoken-tool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tools/rutoken-tool.c
r3478 r3492 37 37 #include "util.h" 38 38 39 /* win32 needs this in open(2) */ 40 #ifndef O_BINARY 41 #define O_BINARY 0 42 #endif 43 39 44 #define IV_SIZE 8 40 45 #define HASH_SIZE 4 … … 196 201 u8 *inbuf = NULL, *outbuf = NULL, *p; 197 202 198 fd_in = open(path_infile, O_RDONLY );203 fd_in = open(path_infile, O_RDONLY | O_BINARY); 199 204 if (fd_in < 0) { 200 205 fprintf(stderr, "Error: Cannot open file '%s'\n", path_infile); … … 241 246 242 247 if (err == 0) { 243 fd_out = open(path_outfile, O_WRONLY | O_CREAT | O_TRUNC ,248 fd_out = open(path_outfile, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 244 249 S_IRUSR | S_IWUSR); 245 250 if (fd_out < 0) { … … 308 313 u8 outbuf[HASH_SIZE]; 309 314 310 fd = open(path_infile, O_RDONLY );315 fd = open(path_infile, O_RDONLY | O_BINARY); 311 316 if (fd < 0) { 312 317 fprintf(stderr, "Error: Cannot open file '%s'\n", path_infile);
