522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
# ifdef OF_HAVE_THREADS
[passwdMutex lock];
@try {
# endif
of_string_encoding_t encoding =
[OFSystemInfo native8BitEncoding];
if (owner != nil) {
struct passwd *passwd = getpwuid(s.st_uid);
*owner = [OFString stringWithCString: passwd->pw_name
encoding: encoding];
}
if (group != nil) {
struct group *group_ = getgrgid(s.st_gid);
*group = [OFString stringWithCString: group_->gr_name
encoding: encoding];
}
# ifdef OF_HAVE_THREADS
} @finally {
|
|
|
|
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
# ifdef OF_HAVE_THREADS
[passwdMutex lock];
@try {
# endif
of_string_encoding_t encoding =
[OFSystemInfo native8BitEncoding];
if (owner != NULL) {
struct passwd *passwd = getpwuid(s.st_uid);
*owner = [OFString stringWithCString: passwd->pw_name
encoding: encoding];
}
if (group != NULL) {
struct group *group_ = getgrgid(s.st_gid);
*group = [OFString stringWithCString: group_->gr_name
encoding: encoding];
}
# ifdef OF_HAVE_THREADS
} @finally {
|