1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- src/FXFile.cpp.orig Sat Feb 5 13:10:50 2005
+++ src/FXFile.cpp Wed Feb 9 17:40:15 2005
@@ -102,7 +102,7 @@
// Get current user name
FXString FXFile::getCurrentUserName(){
#ifndef WIN32
-#ifdef FOX_THREAD_SAFE
+#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
struct passwd pwdresult,*pwd;
char buffer[1024];
if(getpwuid_r(geteuid(),&pwdresult,buffer,sizeof(buffer),&pwd)==0 && pwd) return pwd->pw_name;
@@ -180,7 +180,7 @@
// Get home directory for a given user
FXString FXFile::getUserDirectory(const FXString& user){
#ifndef WIN32
-#ifdef FOX_THREAD_SAFE
+#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
struct passwd pwdresult,*pwd;
char buffer[1024];
if(user.empty()){
@@ -1059,7 +1059,7 @@
FXString FXFile::owner(FXuint uid){
FXchar result[64];
#ifndef WIN32
-#ifdef FOX_THREAD_SAFE
+#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
struct passwd pwdresult,*pwd;
char buffer[1024];
if(getpwuid_r(uid,&pwdresult,buffer,sizeof(buffer),&pwd)==0 && pwd) return pwd->pw_name;
@@ -1077,7 +1077,7 @@
FXString FXFile::group(FXuint gid){
FXchar result[64];
#ifndef WIN32
-#ifdef FOX_THREAD_SAFE
+#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
::group grpresult;
::group *grp;
char buffer[1024];
@@ -1435,7 +1435,7 @@
// Convert file time to string as per strftime format
FXString FXFile::time(const FXchar *format,FXTime filetime){
#ifndef WIN32
-#ifdef FOX_THREAD_SAFE
+#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
time_t tmp=(time_t)FXMAX(filetime,0);
struct tm tmresult;
FXchar buffer[512];
|