From owner-freebsd-standards@FreeBSD.ORG Sun Feb 8 04:05:34 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E80E16A4D0; Sun, 8 Feb 2004 04:05:34 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1417A43D31; Sun, 8 Feb 2004 04:05:34 -0800 (PST) (envelope-from das@FreeBSD.org) Received: from freefall.freebsd.org (das@localhost [127.0.0.1]) i18C5Xbv064788; Sun, 8 Feb 2004 04:05:33 -0800 (PST) (envelope-from das@freefall.freebsd.org) Received: (from das@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i18C5Xww064784; Sun, 8 Feb 2004 04:05:33 -0800 (PST) (envelope-from das) Date: Sun, 8 Feb 2004 04:05:33 -0800 (PST) From: David Schultz Message-Id: <200402081205.i18C5Xww064784@freefall.freebsd.org> To: das@FreeBSD.org, standards@FreeBSD.org, das@FreeBSD.org Subject: Re: kern/29844: [PATCH] setpgrp does not behave as manual says X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2004 12:05:34 -0000 Synopsis: [PATCH] setpgrp does not behave as manual says Responsible-Changed-From-To: standards->das Responsible-Changed-By: das Responsible-Changed-When: Sun Feb 8 04:04:48 PST 2004 Responsible-Changed-Why: I'll take a look at this. http://www.freebsd.org/cgi/query-pr.cgi?pr=29844 From owner-freebsd-standards@FreeBSD.ORG Sun Feb 8 22:00:28 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12B2C16A4CE for ; Sun, 8 Feb 2004 22:00:28 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 046C543D1D for ; Sun, 8 Feb 2004 22:00:28 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1960Rbv042079 for ; Sun, 8 Feb 2004 22:00:27 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1960Rj2042078; Sun, 8 Feb 2004 22:00:27 -0800 (PST) (envelope-from gnats) Date: Sun, 8 Feb 2004 22:00:27 -0800 (PST) Message-Id: <200402090600.i1960Rj2042078@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Mike Heffner Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Heffner List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 06:00:28 -0000 The following reply was made to PR standards/61934; it has been noted by GNATS. From: Mike Heffner To: Wartan Hachaturow Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant Date: Mon, 09 Feb 2004 00:59:59 -0500 (EST) I'm glad you picked up this stuff up, it is part of the few remaining things to implement for mailx standards compliance. :-D I've done a quick first pass, comments are inlined. | |>Fix: | | One little note: SUS is unclear on what does "login-name part of | the address" means (in -F case). I've decided to use "the | word before @,!,%", but this is, of course, arguable. For | example, the only system I know of to support -F, AIX, | uses the whole address as a filename. | This sounds like a good choice. | | | diff -ur ./mail_HEAD.orig/extern.h ./mail_HEAD.patched/extern.h | --- ./mail_HEAD.orig/extern.h Tue Jun 25 09:24:29 2002 | +++ ./mail_HEAD.patched/extern.h Fri Jan 23 12:57:04 2004 | @@ -73,6 +73,7 @@ | char *value(const char *); | char *vcopy(const char *); | char *yankword(char *, char []); | +char *yanklogin(char *, char []); | int Fclose(FILE *); | int More(int *); | int Pclose(FILE *); | diff -ur ./mail_HEAD.orig/glob.h ./mail_HEAD.patched/glob.h | --- ./mail_HEAD.orig/glob.h Sun Mar 25 08:57:04 2001 | +++ ./mail_HEAD.patched/glob.h Thu Jan 22 14:37:39 2004 | @@ -51,6 +51,7 @@ | int sourcing; /* Currently reading variant file */ | int loading; /* Loading user definitions */ | int cond; /* Current state of conditional exc. */ | +int record_recip; /* -F flag set */ | FILE *itf; /* Input temp file buffer */ | FILE *otf; /* Output temp file buffer */ | int image; /* File descriptor for image of msg */ | diff -ur ./mail_HEAD.orig/lex.c ./mail_HEAD.patched/lex.c | --- ./mail_HEAD.orig/lex.c Sun Jun 30 09:25:06 2002 | +++ ./mail_HEAD.patched/lex.c Thu Jan 22 13:03:04 2004 | @@ -156,6 +156,105 @@ | } | | /* | + * Check the mailbox for mail to read. | + * Return -1 in case of error, 0 if there's no mail, 1 if there is. | + * This function is almost identical to setfile above, but it has | + * meaningful return codes for checkmail task. | + */ I would really rather not have the setfile() function duplicated here. Since the setfile()'s return code is only checked for error in two places, your modified setfile() should work in those cases as well. So, can you modify setfile to return a more descriptive error code like in your checkmail and use it instead for the -e option? Also, the fprintf that displays "No mail for ..." should not be printed when using the -e option. SuSv3 states that when using the -e option, nothing should be printed. | +int | +checkmail(name) | + char *name; | +{ | +} | + | +/* | * Incorporate any new mail that has arrived since we first | * started reading mail. | */ | diff -ur ./mail_HEAD.orig/mail.1 ./mail_HEAD.patched/mail.1 | --- ./mail_HEAD.orig/mail.1 Thu Jan 9 04:08:33 2003 | +++ ./mail_HEAD.patched/mail.1 Mon Jan 26 14:43:16 2004 | @@ -46,15 +46,22 @@ | .Op Fl s Ar subject | .Op Fl c Ar cc-addr | .Op Fl b Ar bcc-addr | +.Op Fl F | .Ar to-addr ... | .Op Fl Ar sendmail-option ... | .Nm | .Op Fl EiInNv | +.Op Fl F | .Fl f | .Op Ar name | .Nm | .Op Fl EiInNv | +.Op Fl F | .Op Fl u Ar user | +.Nm | +.Op Fl e | +.Nm | +.Op Fl H The -H option can be used in the receive modes and doesn't have to be separate. You can add it to the second and third usage lines. | @@ -123,6 +125,24 @@ | case 'd': | debug++; | break; | + case 'e': | + /* | + * User wants to check mail and exit. | + */ | + check_mode++; | + break; | + case 'H': | + /* | + * User wants a header summary only. | + */ | + header_sum_mode++; | + break; | + case 'F': | + /* | + * User wants to record messages to files | + * named after first recipient username. | + */ | + record_recip++; A break is needed here. | case 's': | /* | * Give a subject field for sending from | @@ -189,11 +209,13 @@ | break; | case '?': | fprintf(stderr, "\ | -Usage: %s [-EiInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr | ...\n\ | +Usage: %s [-EiInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-F] to-addr | ...\n\ | %*s [- sendmail-options ...]\n\ | - %s [-EiInNv] -f [name]\n\ | - %s [-EiInNv] [-u user]\n",__progname, strlen(__progname), "", | - __progname, __progname); | + %s [-EiInNv] [-F] -f [name]\n\ | + %s [-EiInNv] [-F] [-u user]\n\ | + %s -e\n\ | + %s -H\n",__progname, strlen(__progname), "", | + __progname, __progname, __progname, __progname); | exit(1); Same thing for -H in the usage summary. | } | } | @@ -240,6 +262,38 @@ | */ | exit(senderr); | } | + | + if(check_mode) { | + if (ef == NULL) | + ef = "%"; | + if (checkmail(ef) <= 0) { | + exit(1); /* Either an error has occured, or no mail */ | + } else { | + exit(0); | + } | + /* Should exit anyway */ | + exit(1); Can you replace this exit with a /*NOTREACHED*/. | + } | + | + if (header_sum_mode) { | + if (ef == NULL) | + ef = "%"; | + if (setfile(ef) < 0) | + exit(1); /* error already reported */ | + if (setjmp(hdrjmp) == 0) { | + if ((prevint = signal(SIGINT, SIG_IGN)) != SIG_IGN) | + (void)signal(SIGINT, hdrstop); | + if (value("quiet") == NULL) | + printf("Mail version %s. Type ? for help.\n", | + version); | + announce(); | + (void)fflush(stdout); | + (void)signal(SIGINT, prevint); | + } | + exit(0); | + } | + | + Instead of duplicating this code from below, can you add something like: if (header_sum_mode) exit(0); before the call to commands? | /* | * Ok, we are reading mail. | * Decide whether we are editing a mailbox or reading | diff -ur ./mail_HEAD.orig/names.c ./mail_HEAD.patched/names.c | --- ./mail_HEAD.orig/names.c Sun Jun 30 09:25:06 2002 | +++ ./mail_HEAD.patched/names.c Mon Jan 26 13:51:04 2004 | @@ -210,6 +210,79 @@ | } | | /* | + * Grab a single login name (liberal word) | + * Throw away things between ()'s, take anything between <>, | + * and look for words before metacharacters %, @, !. | + */ | +char * | +yanklogin(ap, wbuf) | + char *ap, wbuf[]; | +{ | + char *cp, *cp2, *cp_temp; | + int n; | + | + cp = ap; | + for (;;) { | + if (*cp == '\0') | + return (NULL); | + if (*cp == '(') { | + int nesting = 0; | + | + while (*cp != '\0') { | + switch (*cp++) { | + case '(': | + nesting++; | + break; | + case ')': | + --nesting; | + break; | + } | + if (nesting <= 0) | + break; | + } | + } else if (*cp == ' ' || *cp == '\t' || *cp == ',') | + cp++; | + else | + break; | + } | + | + /* | + * Now, let's go forward till we meet the needed character, | + * and step one word back. | + */ | + | + /* First, remember current point. */ | + cp_temp = cp; | + n = 0; | + | + /* | + * Note that we look ahead in a cycle. This is safe, since | + * non-end of string is checked first. | + */ | + while(*cp != '\0' && strchr("@%!", *(cp + 1)) == NULL) | + cp++; | + | + /* | + * Now, start stepping back to the first non-word character, | + * while counting the number of symbols in a word. | + */ | + while(cp != cp_temp && strchr(" \t,<>", *(cp - 1)) == NULL) { | + n++; | + cp--; | + } | + | + /* Finally, grab the word forward. */ | + cp2 = wbuf; | + while(n >= 0) { | + *cp2++=*cp++; | + n--; | + } | + | + *cp2 = '\0'; | + return (cp); | +} | + | +/* | * For each recipient in the passed name list with a / | * in the name, append the message to the end of the named file | * and remove him from the recipient list. | diff -ur ./mail_HEAD.orig/send.c ./mail_HEAD.patched/send.c | --- ./mail_HEAD.orig/send.c Sun Jun 30 09:25:06 2002 | +++ ./mail_HEAD.patched/send.c Fri Jan 23 12:56:28 2004 | @@ -303,9 +303,10 @@ | int printheaders; | { | char *cp; | + char *nbuf; | int pid; | char **namelist; | - struct name *to; | + struct name *to, *nsto; | FILE *mtf; | | /* | @@ -354,6 +355,18 @@ | to = elide(to); | if (count(to) == 0) | goto out; | + if (record_recip) { | + /* | + * Before fixing the header, save old To:. | + * We do this because elide above has sorted To: list, and | + * we would like to save message in a file named by the first | + * recipient the user has entered, not the one being the first | + * after sorting happened. | + */ | + if ((nsto = malloc(sizeof(struct name))) == NULL) | + err(1, "Out of memory"); | + bcopy(hp->h_to, nsto, sizeof(struct name)); | + } | fixhead(hp, to); | if ((mtf = infix(hp, mtf)) == NULL) { | fprintf(stderr, ". . . message lost, sorry.\n"); | @@ -369,8 +382,21 @@ | printf("\n"); | goto out; | } | - if ((cp = value("record")) != NULL) | - (void)savemail(expand(cp), mtf); | + if (record_recip) { | + /* | + * Extract first recipient username from saved To: and use it | + * as a filename. | + */ | + if ((nbuf = malloc(strlen(detract(nsto, 0)) + 1)) == NULL) | + err(1, "Out of memory"); | + if ((cp = yanklogin(detract(nsto, 0), nbuf)) != NULL) | + (void)savemail(expand(nbuf), mtf); | + free(nbuf); | + free(nsto); | + } else { | + if ((cp = value("record")) != NULL) | + (void)savemail(expand(cp), mtf); | + } | /* | * Fork, set up the temporary mail file as standard | * input for "mail", and exec with the user list we generated Cheers, Mike -- Mike Heffner From owner-freebsd-standards@FreeBSD.ORG Sun Feb 8 22:50:22 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEE8316A4D0 for ; Sun, 8 Feb 2004 22:50:22 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B34D343D2F for ; Sun, 8 Feb 2004 22:50:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i196oMbv057147 for ; Sun, 8 Feb 2004 22:50:22 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i196oMBp057146; Sun, 8 Feb 2004 22:50:22 -0800 (PST) (envelope-from gnats) Date: Sun, 8 Feb 2004 22:50:22 -0800 (PST) Message-Id: <200402090650.i196oMBp057146@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Wartan Hachaturow Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Wartan Hachaturow List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 06:50:23 -0000 The following reply was made to PR standards/61934; it has been noted by GNATS. From: Wartan Hachaturow To: Mike Heffner Cc: Wartan Hachaturow , FreeBSD-gnats-submit@FreeBSD.org Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant Date: Mon, 9 Feb 2004 09:37:35 +0300 On Mon, Feb 09, 2004 at 12:59:59AM -0500, Mike Heffner wrote: > I've done a quick first pass, comments are inlined. Okay, thanks for looking at this :) I'll fix the issues you're pointed at, and submit a new version of the patch. > checkmail and use it instead for the -e option? Also, the fprintf that > displays "No mail for ..." should not be printed when using the -e option. > SuSv3 states that when using the -e option, nothing should be printed. Well, I've interpreted the phrase "The mailx utility shall write nothing and exit with a successful return code if there is mail to read" like that "one should not print anything in "there is mail" case". Of course, since most prospective use of -e is in scripts, printing in "no mail" case is, perhaps, futile :) -- Regards, Wartan. "Be different: conform." From owner-freebsd-standards@FreeBSD.ORG Mon Feb 9 11:01:40 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E4C816A4DD for ; Mon, 9 Feb 2004 11:01:40 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBDF043D1F for ; Mon, 9 Feb 2004 11:01:39 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) i19J1dbv083168 for ; Mon, 9 Feb 2004 11:01:39 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i19J1dvd083162 for freebsd-standards@freebsd.org; Mon, 9 Feb 2004 11:01:39 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 9 Feb 2004 11:01:39 -0800 (PST) Message-Id: <200402091901.i19J1dvd083162@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 19:01:40 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- s [2001/01/23] misc/24590 standards timezone function not compatible witn Sin o [2002/02/25] bin/35307 standards standard include files are not standard c o [2003/03/05] bin/48958 standards The type 'bool' has different sizes for C o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions p [2003/06/05] standards/52972standards /bin/sh arithmetic not POSIX compliant o [2003/06/20] standards/53554standards interval timers not cleared in fork() o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2003/09/15] standards/56906standards Several math(3) functions fail to set err o [2003/12/31] standards/60772standards _Bool and bool should be unsigned o [2004/02/05] standards/62388standards sys/resource.h does not pull in dependenc 10 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi o [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant s [2002/03/18] standards/36076standards Implementation of POSIX fuser command o [2002/06/13] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] misc/40378 standards stdlib.h gives needless warnings with -an p [2002/08/12] standards/41576standards POSIX compliance of ln(1) o [2002/10/23] standards/44425standards getcwd() succeeds even if current dir has o [2002/12/09] standards/46119standards Priority problems for SCHED_OTHER using p o [2002/12/23] standards/46504standards Warnings in headers o [2003/06/22] standards/53613standards FreeBSD doesn't define EPROTO o [2003/06/24] bin/53682 standards [PATCH] add fuser(1) utitity o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/24] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/07/31] standards/55112standards glob.h, glob_t's gl_pathc should be "size o [2003/09/04] standards/56476standards cd9660 unicode support simple hack o [2003/09/27] standards/57295standards [patch] make does not include cmd line va o [2003/10/12] standards/57911standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname o [2003/11/29] standards/59797standards Implement C99's round[f]() math fucntions p [2003/12/26] standards/60597standards FreeBSD's /usr/include lacks of cpio.h o [2004/01/26] standards/61934standards [PATCH] FreeBSD's mailx not completely SU 22 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Feb 9 11:03:25 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00D9D16A4CE for ; Mon, 9 Feb 2004 11:03:25 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F35E943D1F for ; Mon, 9 Feb 2004 11:03:24 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.10/8.12.10) with ESMTP id i19J3Obv085262 for ; Mon, 9 Feb 2004 11:03:24 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i19J3OGN085254 for standards@freebsd.org; Mon, 9 Feb 2004 11:03:24 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 9 Feb 2004 11:03:24 -0800 (PST) Message-Id: <200402091903.i19J3OGN085254@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 19:03:25 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [1995/01/11] i386/105 standards Distributed libm (msun) has non-standard o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2000/12/05] kern/23304 standards POSIX clock_gettime, clock_getres return s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public 4 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Feb 9 12:40:46 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E1DD16A4CE for ; Mon, 9 Feb 2004 12:40:46 -0800 (PST) Received: from host.server-23.net (host.server-23.net [64.191.95.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14A4043D1F for ; Mon, 9 Feb 2004 12:40:46 -0800 (PST) (envelope-from samy@kerneled.com) Received: from [212.116.200.205] (helo=beastie.freebsd.local) by host.server-23.net with asmtp (Exim 4.24) id 1AqICq-0001VM-MW for standards@FreeBSD.org; Mon, 09 Feb 2004 15:40:37 -0500 Date: Mon, 9 Feb 2004 23:41:15 +0300 From: Samy Al Bahra To: standards@FreeBSD.org Message-Id: <20040209234115.3c82e245.samy@kerneled.com> Organization: Kerneled X-Mailer: Sylpheed version 0.9.5-gtk2-20030906 (GTK+ 2.2.1; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.server-23.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kerneled.com Subject: timezone in time.h X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 20:40:46 -0000 http://www.opengroup.org/onlinepubs/007904975/basedefs/time.h.html timezone is defined as a long, a lot of time keeping applications (in this part of the world at the least) depend on this variable maintaining the value difference between UTC and the local standard time. Is there any chance we could move our timezone function to something else? and stick to a timezone variable? or provide an alternative name but similar functionality to this? Anyone working on this already? -- +-----------------------------------+ | Samy Al Bahra | samy@kerneled.com | |-----------------------------------| | B3A7 F5BE B2AE 67B1 AC4B | | 0983 956D 1F4A AA54 47CB | |-----------------------------------| | http://www.kerneled.com | +-----------------------------------+ From owner-freebsd-standards@FreeBSD.ORG Mon Feb 9 22:40:17 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA7F416A4CE for ; Mon, 9 Feb 2004 22:40:17 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D570C43D1F for ; Mon, 9 Feb 2004 22:40:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1A6eHbv088062 for ; Mon, 9 Feb 2004 22:40:17 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1A6eHbo088061; Mon, 9 Feb 2004 22:40:17 -0800 (PST) (envelope-from gnats) Date: Mon, 9 Feb 2004 22:40:17 -0800 (PST) Message-Id: <200402100640.i1A6eHbo088061@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Mike Heffner Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Heffner List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 06:40:18 -0000 The following reply was made to PR standards/61934; it has been noted by GNATS. From: Mike Heffner To: Wartan Hachaturow Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: standards/61934: [PATCH] FreeBSD's mailx not completely SUSv3-compliant Date: Tue, 10 Feb 2004 01:38:15 -0500 (EST) On 09-Feb-2004 Wartan Hachaturow wrote: | On Mon, Feb 09, 2004 at 12:59:59AM -0500, Mike Heffner wrote: | | |> checkmail and use it instead for the -e option? Also, the fprintf that |> displays "No mail for ..." should not be printed when using the -e |> option. |> SuSv3 states that when using the -e option, nothing should be printed. | | Well, I've interpreted the phrase "The mailx utility shall write nothing | and exit with a successful return code if there is mail to read" like | that "one should not print anything in "there is mail" case". | Of course, since most prospective use of -e is in scripts, printing | in "no mail" case is, perhaps, futile :) | I think the "no mail" case is valid and we shouldn't print anything. However, I do believe we should still leave in the err[x]() messages for fatal conditions. Mike -- Mike Heffner From owner-freebsd-standards@FreeBSD.ORG Thu Feb 12 22:26:13 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E47C016A4D1 for ; Thu, 12 Feb 2004 22:26:13 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2977A43D45 for ; Thu, 12 Feb 2004 22:26:13 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.10/8.12.10) with ESMTP id i1D6QBMO053803 for ; Fri, 13 Feb 2004 09:26:12 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.10/8.12.10/Submit) id i1D6QBol053798 for freebsd-standards@freebsd.org; Fri, 13 Feb 2004 09:26:11 +0300 (MSK) (envelope-from ache) Date: Fri, 13 Feb 2004 09:26:11 +0300 From: Andrey Chernov To: freebsd-standards@freebsd.org Message-ID: <20040213062611.GA53787@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , freebsd-standards@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i Subject: test, ignore it X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 06:26:14 -0000 From owner-freebsd-standards@FreeBSD.ORG Fri Feb 13 09:40:52 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D0E616A4CE for ; Fri, 13 Feb 2004 09:40:52 -0800 (PST) Received: from laika.ifs.tuwien.ac.at (laika.ifs.tuwien.ac.at [128.131.167.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DC4243D39 for ; Fri, 13 Feb 2004 09:40:52 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from fafoe.narf.at (unknown [212.186.3.235]) by laika.ifs.tuwien.ac.at (Postfix) with ESMTP id D794F20B5; Fri, 13 Feb 2004 18:42:48 +0100 (CET) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id E74C140B8; Fri, 13 Feb 2004 18:40:47 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 79C3A2F4; Fri, 13 Feb 2004 18:40:45 +0100 (CET) Date: Fri, 13 Feb 2004 18:40:45 +0100 From: Stefan Farfeleder To: Samy Al Bahra Message-ID: <20040213174041.GA629@wombat.fafoe.narf.at> Mail-Followup-To: Samy Al Bahra , standards@FreeBSD.org References: <20040209234115.3c82e245.samy@kerneled.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040209234115.3c82e245.samy@kerneled.com> User-Agent: Mutt/1.5.6i cc: standards@FreeBSD.org Subject: Re: timezone in time.h X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 17:40:52 -0000 On Mon, Feb 09, 2004 at 11:41:15PM +0300, Samy Al Bahra wrote: > http://www.opengroup.org/onlinepubs/007904975/basedefs/time.h.html > > timezone is defined as a long, a lot of time keeping applications (in > this part of the world at the least) depend on this variable maintaining > the value difference between UTC and the local standard time. > > Is there any chance we could move our timezone function to something > else? and stick to a timezone variable? or provide an alternative name > but similar functionality to this? Anyone working on this already? There's only a single reference to timezone() in the whole source tree, src/contrib/sendmail/src/arpadate.c, and the code in that file is #ifdef'ed out. Just for fun I built and installed a world without timezone(), as expected it succeeded. NetBSD already warns that timezone() will eventually disappear in its man page, maybe we should follow them and remove timezone() in 6-current. Cheers, Stefan From owner-freebsd-standards@FreeBSD.ORG Sat Feb 14 15:50:24 2004 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECCFD16A4D2 for ; Sat, 14 Feb 2004 15:50:23 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC69843D2D for ; Sat, 14 Feb 2004 15:50:21 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1ENoLbv032229 for ; Sat, 14 Feb 2004 15:50:21 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1ENoLLe032228; Sat, 14 Feb 2004 15:50:21 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 14 Feb 2004 15:50:21 -0800 (PST) Resent-Message-Id: <200402142350.i1ENoLLe032228@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Farfeleder Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7DF716A4CE; Sat, 14 Feb 2004 15:41:50 -0800 (PST) Received: from laika.ifs.tuwien.ac.at (laika.ifs.tuwien.ac.at [128.131.167.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8773F43D2D; Sat, 14 Feb 2004 15:41:50 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from fafoe.narf.at (unknown [212.186.3.235]) by laika.ifs.tuwien.ac.at (Postfix) with ESMTP id BB0AE20A1; Sun, 15 Feb 2004 00:43:48 +0100 (CET) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id 9431040EE; Sun, 15 Feb 2004 00:41:45 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id D438832A; Sun, 15 Feb 2004 00:41:43 +0100 (CET) Message-Id: <20040214234143.D438832A@wombat.fafoe.narf.at> Date: Sun, 15 Feb 2004 00:41:43 +0100 (CET) From: Stefan Farfeleder To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stefan@fafoe.narf.at cc: phk@FreeBSD.org Subject: standards/62858: malloc(0) not C99 compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Stefan Farfeleder List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2004 23:50:24 -0000 >Number: 62858 >Category: standards >Synopsis: malloc(0) not C99 compliant >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 14 15:50:21 PST 2004 >Closed-Date: >Last-Modified: >Originator: Stefan Farfeleder >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD wombat.fafoe.narf.at 5.2-CURRENT FreeBSD 5.2-CURRENT #13: Thu Feb 5 23:10:05 CET 2004 stefan@wombat.fafoe.narf.at:/usr/home/stefan/freebsd/obj/usr/home/stefan/freebsd/src/sys/WOMBAT i386 >Description: A recent discussion in the newsgroup comp.std.c (Subject: Re: Memory question) revealed that ISO/IEC 9899:1999 does not allow malloc(0) to return the same non-null pointer each time it is called. # 7.20.3 Memory management functions # The order and contiguity of storage allocated by successive calls to the calloc, # malloc, and realloc functions is unspecified. The pointer returned if the allocation # succeeds is suitably aligned so that it may be assigned to a pointer to any type of object # and then used to access such an object or an array of such objects in the space allocated # (until the space is explicitly deallocated). The lifetime of an allocated object extends # from the allocation until the deallocation. Each such allocation shall yield a pointer to an ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # object disjoint from any other object. The pointer returned points to the start (lowest byte ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # address) of the allocated space. If the space cannot be allocated, a null pointer is # returned. If the size of the space requested is zero, the behavior is implementation- # defined: either a null pointer is returned, or the behavior is as if the size were some ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # nonzero value, except that the returned pointer shall not be used to access an object. ^^^^^^^^^^^^^ The C89 wording about an "unique pointer" was dropped. >How-To-Repeat: This strictly conforming C99 program fails due to malloc()'s non-compliance: #include #include int main(void) { void *p, *q; p = malloc(0); q = malloc(0); assert(p != q || p == NULL); return (0); } >Fix: Either enabling malloc()'s V flag by default or adding 'if (size == 0) size = 1;' should make malloc() compliant. >Release-Note: >Audit-Trail: >Unformatted: