comparison src/nt.c @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 727739f917cb
children ca9a9ec9c1c1
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
636 /* "INFOPATH", */ 636 /* "INFOPATH", */
637 "EMACSDOC", 637 "EMACSDOC",
638 "TERM", 638 "TERM",
639 }; 639 };
640 640
641 for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) 641 for (i = 0; i < countof (env_vars); i++)
642 { 642 {
643 if (!getenv (env_vars[i]) && 643 if (!getenv (env_vars[i]) &&
644 (lpval = nt_get_resource (env_vars[i], &dwType)) != NULL) 644 (lpval = nt_get_resource (env_vars[i], &dwType)) != NULL)
645 { 645 {
646 if (dwType == REG_EXPAND_SZ) 646 if (dwType == REG_EXPAND_SZ)
1246 { 1246 {
1247 return _chdir (map_win32_filename (path, NULL)); 1247 return _chdir (map_win32_filename (path, NULL));
1248 } 1248 }
1249 1249
1250 int 1250 int
1251 sys_chmod (const char * path, int mode) 1251 sys_chmod (const char * path, mode_t mode)
1252 { 1252 {
1253 return _chmod (map_win32_filename (path, NULL), mode); 1253 return _chmod (map_win32_filename (path, NULL), mode);
1254 } 1254 }
1255 1255
1256 int 1256 int
1257 sys_creat (const char * path, int mode) 1257 sys_creat (const char * path, mode_t mode)
1258 { 1258 {
1259 return _creat (map_win32_filename (path, NULL), mode); 1259 return _creat (map_win32_filename (path, NULL), mode);
1260 } 1260 }
1261 1261
1262 FILE * 1262 FILE *
2426 2426
2427 return cp->status; 2427 return cp->status;
2428 } 2428 }
2429 2429
2430 int 2430 int
2431 sys_read (int fd, char * buffer, unsigned int count) 2431 sys_read (int fd, char * buffer, size_t count)
2432 { 2432 {
2433 int nchars; 2433 int nchars;
2434 int to_read; 2434 int to_read;
2435 DWORD waiting; 2435 DWORD waiting;
2436 char * orig_buffer = buffer; 2436 char * orig_buffer = buffer;
2574 return nchars; 2574 return nchars;
2575 } 2575 }
2576 2576
2577 /* For now, don't bother with a non-blocking mode */ 2577 /* For now, don't bother with a non-blocking mode */
2578 int 2578 int
2579 sys_write (int fd, const void * buffer, unsigned int count) 2579 sys_write (int fd, const void * buffer, size_t count)
2580 { 2580 {
2581 int nchars; 2581 int nchars;
2582 2582
2583 if (fd < 0 || fd >= MAXDESC) 2583 if (fd < 0 || fd >= MAXDESC)
2584 { 2584 {