Changeset 11864
- Timestamp:
- Feb 9, 2011, 5:42:52 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/remote.c
r11809 r11864 490 490 tr_getcwd( void ) 491 491 { 492 char * result; 492 493 char buf[2048]; 493 494 *buf = '\0'; 494 495 #ifdef WIN32 495 _getcwd( buf, sizeof( buf ) );496 result = _getcwd( buf, sizeof( buf ) ); 496 497 #else 497 getcwd( buf, sizeof( buf ) );498 result = getcwd( buf, sizeof( buf ) ); 498 499 #endif 500 if( result == NULL ) 501 fprintf( stderr, "getcwd error: \"%s\"", tr_strerror( errno ) ); 499 502 return tr_strdup( buf ); 500 503 } -
trunk/utils/create.c
r11709 r11864 11 11 */ 12 12 13 #include <errno.h> 13 14 #include <stdio.h> 14 15 #include <unistd.h> /* getcwd() */ … … 78 79 tr_getcwd( void ) 79 80 { 81 char * result; 80 82 char buf[2048]; 81 83 *buf = '\0'; 82 84 #ifdef WIN32 83 _getcwd( buf, sizeof( buf ) );85 result = _getcwd( buf, sizeof( buf ) ); 84 86 #else 85 getcwd( buf, sizeof( buf ) );87 result = getcwd( buf, sizeof( buf ) ); 86 88 #endif 89 if( result == NULL ) 90 fprintf( stderr, "getcwd error: \"%s\"", tr_strerror( errno ) ); 87 91 return tr_strdup( buf ); 88 92 }
Note: See TracChangeset
for help on using the changeset viewer.