head	1.2;
access;
symbols
	RELEASE_8_3_0:1.2
	RELEASE_9_0_0:1.2
	RELEASE_7_4_0:1.2
	RELEASE_8_2_0:1.2
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.2
	RELEASE_6_1_0:1.2
	RELEASE_5_5_0:1.2
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.2
	RELEASE_4_11_0:1.2
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1
	RELEASE_4_8_0:1.1
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1
	RELEASE_5_0_DP1:1.1
	RELEASE_4_5_0:1.1
	RELEASE_4_4_0:1.1
	RELEASE_4_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2004.11.19.21.36.45;	author mi;	state Exp;
branches;
next	1.1;

1.1
date	2001.02.07.22.36.12;	author mi;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Upgrade devel/tcllib from 1.6 to 1.7 and www/tclhttpd from 3.4.2 to 3.5.1.
Update dependency lines in amsn and tclxml.
@
text
@--- src/limit.c	Thu May  1 19:42:14 2003
+++ src/limit.c	Fri Nov 19 13:21:15 2004
@@@@ -9,6 +9,5 @@@@
 
 
-static int  LimitCmd _ANSI_ARGS_((ClientData clientData,
-            Tcl_Interp *interp, int argc, char *argv[]));
+Tcl_ObjCmdProc  LimitCmd;
 
 #undef TCL_STORAGE_CLASS
@@@@ -29,9 +28,8 @@@@
  */
 int
-LimitCmd(ClientData data, Tcl_Interp *interp, int argc, char *argv[])
+LimitCmd(ClientData data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 {
-    int max;
-    char buf[32];
     struct rlimit limit;
+    Tcl_Obj *limObj[2];
     Tcl_ResetResult(interp);
     if (getrlimit(RLIMIT_NOFILE, &limit) < 0) {
@@@@ -40,12 +38,18 @@@@
     }
     if (argc > 1) {
-    Tcl_GetInt(interp, argv[1], (int *)&limit.rlim_cur);
+        long	rlim_cur;
+
+        if (Tcl_GetLongFromObj(interp, objv[1], &rlim_cur) != TCL_OK)
+            return TCL_ERROR;
+        limit.rlim_cur = rlim_cur;
         if (setrlimit(RLIMIT_NOFILE, &limit) < 0) {
-        Tcl_AppendResult(interp, "NOFILE: ", Tcl_PosixError(interp), NULL);
-        return TCL_ERROR;
-    }
+            Tcl_AppendResult(interp, "NOFILE: ", Tcl_PosixError(interp), NULL);
+            return TCL_ERROR;
+        }
     }
     /* bad, bad style, direct writing to interp->result */
-    sprintf(interp->result, "%d %d", limit.rlim_cur, limit.rlim_max);
+    limObj[0] = Tcl_NewLongObj((long)limit.rlim_cur);
+    limObj[1] = Tcl_NewLongObj((long)limit.rlim_max);
+    Tcl_SetObjResult(interp, Tcl_NewListObj(2, limObj));
     return TCL_OK;
 }
@@@@ -71,5 +75,5 @@@@
     #endif
 
-    Tcl_CreateCommand(interp, "limit", LimitCmd, NULL, NULL);
+    Tcl_CreateObjCommand(interp, "limit", LimitCmd, NULL, NULL);
     code = Tcl_PkgProvide(interp, "limit", "1.0");
     if (code != TCL_OK) {
@


1.1
log
@Bring to the latest version. Link all of the little external libraries
needed by the tclhttpd into one file. I submitted this back in December,
but nobody cared since. Now I can commit this myself :)

PR:		ports/23310
Submitted by:	mi
@
text
@d1 12
a12 3
--- src/limit.c	Thu May 11 02:00:43 2000
+++ src/limit.c	Fri Dec  1 20:04:58 2000
@@@@ -20,7 +20,6 @@@@
d22 3
a24 1
@@@@ -31,3 +30,4 @@@@
d26 6
a31 3
-	Tcl_GetInt(interp, argv[1], (int *)&limit.rlim_cur);
+	if (Tcl_GetLongFromObj(interp, objv[1], (long *)&limit.rlim_cur)
+		!= TCL_OK) return TCL_ERROR;
d33 6
a38 1
@@@@ -37,3 +37,5 @@@@
d40 1
d46 4
a49 2
@@@@ -54,3 +56,3 @@@@
 {
d52 2
a53 46
     Tcl_PkgProvide(interp, "limit", "1.0");
--- src/setuid.c	Tue Oct  6 20:12:11 1998
+++ src/setuid.c	Fri Dec  1 20:05:52 2000
@@@@ -7,2 +7,3 @@@@
 #include <sys/types.h>
+#include <unistd.h>
 
--- src/utime.c	Tue Oct  6 20:12:11 1998
+++ src/utime.c	Fri Dec  1 20:14:21 2000
@@@@ -20,13 +20,8 @@@@
 int
-UtimeCmd(ClientData data, Tcl_Interp *interp, int argc, char *argv[])
+UtimeCmd(ClientData data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 {
     struct utimbuf u = {0, 0};
+    char *file;
 
     Tcl_ResetResult(interp);
-    if (argc > 3) {
-	Tcl_GetInt(interp, argv[3], &u.actime);	/* new access time */
-    }
-    if (argc > 2) {
-	Tcl_GetInt(interp, argv[2], &u.modtime);	/* new modify time */
-    }
     if (argc > 4 || argc <= 1) {
@@@@ -35,4 +30,13 @@@@
     }
-    if (utime(argv[1], &u) < 0) {
-	Tcl_AppendResult(interp, "utime: ", argv[1], Tcl_PosixError(interp), NULL);
+    if (argc > 3) {
+	if (Tcl_GetLongFromObj(interp, objv[3], (long *)&u.actime)
+		!= TCL_OK) return TCL_ERROR;	/* new access time */
+    }
+    if (argc > 2) {
+	if (Tcl_GetLongFromObj(interp, objv[2], (long *)&u.modtime)
+		!= TCL_OK) return TCL_ERROR;	/* new modify time */
+    }
+    file = Tcl_GetString(objv[1]);
+    if (utime(file, &u) < 0) {
+	Tcl_AppendResult(interp, "utime: ", file, Tcl_PosixError(interp), NULL);
 	return TCL_ERROR;
@@@@ -55,3 +59,3 @@@@
 {
-    Tcl_CreateCommand(interp, "utime", UtimeCmd, NULL, NULL);
+    Tcl_CreateObjCommand(interp, "utime", UtimeCmd, NULL, NULL);
     Tcl_PkgProvide(interp, "utime", "1.0");
@

