summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPort.h
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2006-09-07 09:17:33 (GMT)
committervasiljevic <zv@archiware.com>2006-09-07 09:17:33 (GMT)
commit8d7192b9bb9fcda7acb42ef68a34c1a743902686 (patch)
tree24a87d9260aeac9825379096d9dfb97726dcc486 /unix/tclUnixPort.h
parenta997d1ebf0d281c2f1e2d4351b2c08ef1411cf8e (diff)
downloadtcl-8d7192b9bb9fcda7acb42ef68a34c1a743902686.zip
tcl-8d7192b9bb9fcda7acb42ef68a34c1a743902686.tar.gz
tcl-8d7192b9bb9fcda7acb42ef68a34c1a743902686.tar.bz2
Rewritten MT-safe wrappers to return ptrs to TSD storage.
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r--unix/tclUnixPort.h37
1 files changed, 14 insertions, 23 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 533f205..285533b 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.53 2006/09/06 16:12:14 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.54 2006/09/07 09:17:33 vasiljevic Exp $
*/
#ifndef _TCLUNIXPORT
@@ -652,31 +652,22 @@ EXTERN int pthread_getattr_np _ANSI_ARGS_((pthread_t, pthread_attr_t *));
# endif /* HAVE_PTHREAD_ATTR_GET_NP */
#endif /* TCL_THREADS */
-
/*
- * 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>
-MODULE_SCOPE int
-TclpGetPwNam(const char *name, struct passwd *pwbuf, char *buf, size_t buflen,
- struct passwd **pwbufp);
-MODULE_SCOPE int
-TclpGetPwUid(uid_t uid, struct passwd *pwbuf, char *buf, size_t buflen,
- struct passwd **pwbufp);
-MODULE_SCOPE int
-TclpGetGrNam(const char *name, struct group *gbuf, char *buf, size_t buflen,
- struct group **gbufp);
-MODULE_SCOPE int
-TclpGetGrGid(gid_t gid, struct group *gbuf, char *buf, size_t buflen,
- struct group **gbufp);
-
-MODULE_SCOPE struct hostent *
-TclpGetHostByName(const char *name, struct hostent *hbuf, char *buf,
- size_t buflen, int *h_errnop);
-
-MODULE_SCOPE struct hostent *
-TclpGetHostByAddr(const char *addr, int length, int type, struct hostent *hbuf,
- char *buf, size_t buflen, int *h_errnop);
+
+MODULE_SCOPE struct passwd* TclpGetPwNam(const char *name);
+MODULE_SCOPE struct group* TclpGetGrNam(const char *name);
+MODULE_SCOPE struct passwd* TclpGetPwUid(uid_t uid);
+MODULE_SCOPE struct group* TclpGetGrGid(gid_t gid);
+MODULE_SCOPE struct hostent* TclpGetHostByName(const char *name);
+MODULE_SCOPE struct hostent* TclpGetHostByAddr(const char *addr, int length, int type);
#endif /* _TCLUNIXPORT */