64-bit fixes. [jmk] --rw-rw-r-- M 107020 glenda sys 23687 Nov 19 20:17 sys/src/cmd/webcookies.c /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:25,67 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:25,67 char* dom; /* starts with . */ char* path; char* version; - char* comment; /* optional, may be nil */ + char* comment; /* optional, may be nil */ - uint expire; /* time of expiration: ~0 means when webcookies dies */ - int secure; - int explicitdom; /* dom was explicitly set */ - int explicitpath; /* path was explicitly set */ - int netscapestyle; + uint expire; /* time of expiration: ~0 means when webcookies dies */ + int secure; + int explicitdom; /* dom was explicitly set */ + int explicitpath; /* path was explicitly set */ + int netscapestyle; /* internal info */ - int deleted; - int mark; - int ondisk; + int deleted; + int mark; + int ondisk; }; struct Jar { Cookie *c; - int nc; - int mc; + int nc; + int mc; - Qid qid; - int dirty; - char *file; - char *lockfile; + Qid qid; + int dirty; + char *file; + char *lockfile; }; struct { - char *s; + char *s; int offset; int ishttp; } stab[] = { "domain", offsetof(Cookie, dom), 1, - "path", offsetof(Cookie, path), 1, - "name", offsetof(Cookie, name), 0, - "value", offsetof(Cookie, value), 0, - "comment", offsetof(Cookie, comment), 1, - "version", offsetof(Cookie, version), 1, + "path", offsetof(Cookie, path), 1, + "name", offsetof(Cookie, name), 0, + "value", offsetof(Cookie, value), 0, + "comment", offsetof(Cookie, comment), 1, + "version", offsetof(Cookie, version), 1, }; struct { /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:68,75 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:68,75 char *s; int offset; } itab[] = { - "expire", offsetof(Cookie, expire), - "secure", offsetof(Cookie, secure), + "expire", offsetof(Cookie, expire), + "secure", offsetof(Cookie, secure), "explicitdomain", offsetof(Cookie, explicitdom), "explicitpath", offsetof(Cookie, explicitpath), "netscapestyle", offsetof(Cookie, netscapestyle), /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:110,116 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:110,116 first = 1; for(j=0; jfid->file->aux){ + switch((uintptr)r->fid->file->aux){ case Xhttp: syncjar(jar); a = emalloc9p(sizeof(Aux)); /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:1039,1045 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:1039,1045 Aux *a; a = r->fid->aux; - switch((int)r->fid->file->aux){ + switch((uintptr)r->fid->file->aux){ case Xhttp: if(a->state == NeedUrl){ respond(r, "must write url before read"); /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:1071,1077 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:1071,1077 Jar *j; a = r->fid->aux; - switch((int)r->fid->file->aux){ + switch((uintptr)r->fid->file->aux){ case Xhttp: if(a->state == NeedUrl){ if(r->ifcall.count >= sizeof buf){ /n/sourcesdump/2005/1119/plan9/sys/src/cmd/webcookies.c:1157,1163 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/webcookies.c:1157,1163 a = fid->aux; if(a == nil) return; - switch((int)fid->file->aux){ + switch((uintptr)fid->file->aux){ case Xhttp: parsehttp(jar, a->inhttp, a->dom, a->path); break;