summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPort.h
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2006-09-07 08:50:35 (GMT)
committervasiljevic <zv@archiware.com>2006-09-07 08:50:35 (GMT)
commit6bf316cc8d180ece75a2b6b0af4594401fde93de (patch)
tree630550c33708da4db9bfae0e0d0e97e56d313261 /unix/tclUnixPort.h
parent48340de4f3c6a13746e2c082d9ed8cf5c42b8a99 (diff)
downloadtcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.zip
tcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.tar.gz
tcl-6bf316cc8d180ece75a2b6b0af4594401fde93de.tar.bz2
Rewritten MT-safe wrappers to return ptrs to TSD storage
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r--unix/tclUnixPort.h36
1 files changed, 14 insertions, 22 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 52fa194..46d14fa 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.15 2006/09/06 13:08:30 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.16 2006/09/07 08:50:36 vasiljevic Exp $
*/
#ifndef _TCLUNIXPORT
@@ -687,30 +687,22 @@ typedef int TclpMutex;
/*
- * Compatibility calls
+ * Set of MT-safe implementations of some
+ * known-to-be-MT-unsafe library calls.
+ * Instead of returning pointers to the
+ * static storage, those return pointers
+ * to the TSD data.
*/
+
#include <pwd.h>
#include <grp.h>
-EXTERN int
-TclpGetPwNam(const char *name, struct passwd *pwbuf, char *buf, size_t buflen,
- struct passwd **pwbufp);
-EXTERN int
-TclpGetPwUid(uid_t uid, struct passwd *pwbuf, char *buf, size_t buflen,
- struct passwd **pwbufp);
-EXTERN int
-TclpGetGrNam(const char *name, struct group *gbuf, char *buf, size_t buflen,
- struct group **gbufp);
-EXTERN int
-TclpGetGrGid(gid_t gid, struct group *gbuf, char *buf, size_t buflen,
- struct group **gbufp);
-
-EXTERN struct hostent *
-TclpGetHostByName(const char *name, struct hostent *hbuf, char *buf,
- size_t buflen, int *h_errnop);
-
-EXTERN struct hostent *
-TclpGetHostByAddr(const char *addr, int length, int type, struct hostent *hbuf,
- char *buf, size_t buflen, int *h_errnop);
+
+EXTERN struct passwd* TclpGetPwNam(const char *name);
+EXTERN struct group* TclpGetGrNam(const char *name);
+EXTERN struct passwd* TclpGetPwUid(uid_t uid);
+EXTERN struct group* TclpGetGrGid(gid_t gid);
+EXTERN struct hostent* TclpGetHostByName(const char *name);
+EXTERN struct hostent* TclpGetHostByAddr(const char *addr, int length, int type);
#include "tclPlatDecls.h"
#include "tclIntPlatDecls.h"