summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-06 02:17:05 (GMT)
committerstanton <stanton>1999-04-06 02:17:05 (GMT)
commit7bce547a3080e2bbdd0ab8930f1729d9ba6ba585 (patch)
tree2954fb8bdf22680a662211fbcb8e3bdc23849e71
parent9ae479fb5b8b7c0b174049b3890dd53c4c485d3d (diff)
downloadtk-7bce547a3080e2bbdd0ab8930f1729d9ba6ba585.zip
tk-7bce547a3080e2bbdd0ab8930f1729d9ba6ba585.tar.gz
tk-7bce547a3080e2bbdd0ab8930f1729d9ba6ba585.tar.bz2
* unix/configure.in:
* unix/tclUnixPort.h: Applied patch for OS/390 to handle lack of sys/param.h. [Bug: 1725] * unix/configure.in: Fixed BSD/OS 4.* configuration to support shared libraries properly. [Bug: 1730]
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkCanvPs.c8
-rw-r--r--unix/configure.in14
3 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8dbc832..13216b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-04-05 <stanton@scriptics.com>
+
+ * unix/configure.in:
+ * generic/tkCanvPs.c: Added configure test for pw_gecos field in
+ pwd to support OS/390. [Bug: 1724]
+
1999-04-02 <stanton@scriptics.com>
* tests/text.test:
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index fc8a0a5..61afcae 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvPs.c,v 1.1.4.2 1998/09/30 02:16:44 stanton Exp $
+ * RCS: @(#) $Id: tkCanvPs.c,v 1.1.4.3 1999/04/06 02:17:06 stanton Exp $
*/
#include "tkInt.h"
@@ -124,7 +124,7 @@ static CONST char * CONST prolog[]= {
\n\
% This is a standard prolog for Postscript generated by Tk's canvas\n\
% widget.\n\
-% RCS: @(#) $Id: tkCanvPs.c,v 1.1.4.2 1998/09/30 02:16:44 stanton Exp $\n\
+% RCS: @(#) $Id: tkCanvPs.c,v 1.1.4.3 1999/04/06 02:17:06 stanton Exp $\n\
\n\
% The definitions below just define all of the variables used in\n\
% any of the procedures here. This is needed for obscure reasons\n\
@@ -711,7 +711,7 @@ TkCanvPostscriptCmd(canvasPtr, interp, argc, argv)
Tcl_AppendResult(canvasPtr->interp, "%!PS-Adobe-3.0 EPSF-3.0\n",
"%%Creator: Tk Canvas Widget\n", (char *) NULL);
-#if !(defined(__WIN32__) || defined(MAC_TCL))
+#ifdef HAVE_PW_GECOS
if (!Tcl_IsSafe(interp)) {
struct passwd *pwPtr = getpwuid(getuid()); /* INTL: Native. */
Tcl_AppendResult(canvasPtr->interp, "%%For: ",
@@ -719,7 +719,7 @@ TkCanvPostscriptCmd(canvasPtr, interp, argc, argv)
(char *) NULL);
endpwent();
}
-#endif /* __WIN32__ || MAC_TCL */
+#endif /* HAVE_PW_GECOS */
Tcl_AppendResult(canvasPtr->interp, "%%Title: Window ",
Tk_PathName(canvasPtr->tkwin), "\n", (char *) NULL);
time(&now);
diff --git a/unix/configure.in b/unix/configure.in
index 7547129..e325b25 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.1.4.16 1999/03/30 02:08:03 redman Exp $
+# RCS: @(#) $Id: configure.in,v 1.1.4.17 1999/04/06 02:17:06 stanton Exp $
TK_VERSION=8.1
TK_MAJOR_VERSION=8
@@ -199,6 +199,18 @@ AC_UID_T
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME
+#-------------------------------------------
+# In OS/390 struct pwd has no pw_gecos field
+#-------------------------------------------
+
+AC_MSG_CHECKING([pw_gecos in struct pwd])
+AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
+AC_MSG_RESULT($tk_ok)
+if test $tk_ok = yes; then
+ AC_DEFINE(HAVE_PW_GECOS)
+fi
+
#--------------------------------------------------------------------
# Locate the X11 header files and the X11 library archive. Try
# the ac_path_x macro first, but if it doesn't find the X stuff