From owner-freebsd-standards Mon Mar 3 9:30:23 2003 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 A462C37B634 for ; Mon, 3 Mar 2003 09:30:20 -0800 (PST) Received: from sinamail.com (61-221-29-145.HINET-IP.hinet.net [61.221.29.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC79943FE1 for ; Mon, 3 Mar 2003 09:30:06 -0800 (PST) (envelope-from suppergeorge@sinamail.com) From: star@yahoo.com.tw To: freebsd-standards@FreeBSD.org Subject: =?ISO-8859-1?B?prO+97d8p0HEQLdOpWi5wbjVttw/Pw==?= Reply-To: suppergeorge@sinamail.com Date: 04 Mar 2003 01:35:14 +0800 MIME-Version: 1.0 Content-Type: text/html Content-Transfer-Encoding: 8bit Message-Id: <20030303173006.AC79943FE1@mx1.FreeBSD.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 為什麼有人會比你成功10倍
主旨: 這或許是您正在尋找的機會喔
這或許是您正在找的機會哦!
對不起!打擾了,如果因此造成您的困擾,請直接刪除本信及點選下方「不想再收信」,我們會將您的資料刪除!

為什麼有人會比你成功10倍,收入多100倍、甚至多1000倍,難道他有比你多聰明這麼多嗎?
答案肯定不是的!
想一想!那些收入比我們高很多,生活比我們好很多的人!
他們到底做了什麼是我們所不知道的事?
而我們到底做錯了什麼、又錯過了什麼?
想不想知道人家怎麼做倒的!
你相信「時間=金錢」、還是「時間>金錢」

舉例:

我們一天工作8小時,一年工作365天,一輩子工作30年!那我們一輩子的總工作時數?
8小時*365天*30年=87,600小時
如果你的時薪100元,你一輩子賺876萬元!
如果你的時薪150元,你一輩子賺1314萬元!
如果你的時薪200元,你一輩子賺1752萬元!
看起來好像很多,看清楚!一年工作365天,要工作30年!而且不吃不喝!
這樣的收入,足夠三餐溫飽;買車子、房子勉強夠用;別忘了,還有子女的教育費、自己的養老金、還有『夢想』等待實現!
這樣的一輩子,你甘心嗎?
身為員工的你,每天辛苦為的是什麼?家庭、小孩?你有沒有想過,你上班一輩子,將來你的小孩能承接你的職位繼續做下去嗎?(除非你自己是老闆)
想不想改變自己及下一代的一生?

不想再收信(Unsubscribe)

 

To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Mar 3 9:30:25 2003 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 7592837B40C for ; Mon, 3 Mar 2003 09:30:21 -0800 (PST) Received: from sinamail.com (61-221-29-145.HINET-IP.hinet.net [61.221.29.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDC2544015 for ; Mon, 3 Mar 2003 09:30:11 -0800 (PST) (envelope-from suppergeorge@sinamail.com) From: star@yahoo.com.tw To: standards@FreeBSD.ORG Subject: =?ISO-8859-1?B?prO+97d8p0HEQLdOpWi5wbjVttw/Pw==?= Reply-To: suppergeorge@sinamail.com Date: 04 Mar 2003 01:35:18 +0800 MIME-Version: 1.0 Content-Type: text/html Content-Transfer-Encoding: 8bit Message-Id: <20030303173011.BDC2544015@mx1.FreeBSD.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 為什麼有人會比你成功10倍
主旨: 這或許是您正在尋找的機會喔
這或許是您正在找的機會哦!
對不起!打擾了,如果因此造成您的困擾,請直接刪除本信及點選下方「不想再收信」,我們會將您的資料刪除!

為什麼有人會比你成功10倍,收入多100倍、甚至多1000倍,難道他有比你多聰明這麼多嗎?
答案肯定不是的!
想一想!那些收入比我們高很多,生活比我們好很多的人!
他們到底做了什麼是我們所不知道的事?
而我們到底做錯了什麼、又錯過了什麼?
想不想知道人家怎麼做倒的!
你相信「時間=金錢」、還是「時間>金錢」

舉例:

我們一天工作8小時,一年工作365天,一輩子工作30年!那我們一輩子的總工作時數?
8小時*365天*30年=87,600小時
如果你的時薪100元,你一輩子賺876萬元!
如果你的時薪150元,你一輩子賺1314萬元!
如果你的時薪200元,你一輩子賺1752萬元!
看起來好像很多,看清楚!一年工作365天,要工作30年!而且不吃不喝!
這樣的收入,足夠三餐溫飽;買車子、房子勉強夠用;別忘了,還有子女的教育費、自己的養老金、還有『夢想』等待實現!
這樣的一輩子,你甘心嗎?
身為員工的你,每天辛苦為的是什麼?家庭、小孩?你有沒有想過,你上班一輩子,將來你的小孩能承接你的職位繼續做下去嗎?(除非你自己是老闆)
想不想改變自己及下一代的一生?

不想再收信(Unsubscribe)

 

To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Mar 6 6:28:53 2003 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 18A6737B401; Thu, 6 Mar 2003 06:28:53 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFDB343F3F; Thu, 6 Mar 2003 06:28:52 -0800 (PST) (envelope-from roam@FreeBSD.org) Received: from freefall.freebsd.org (roam@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h26ESqNS067666; Thu, 6 Mar 2003 06:28:52 -0800 (PST) (envelope-from roam@freefall.freebsd.org) Received: (from roam@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h26ESqhO067662; Thu, 6 Mar 2003 06:28:52 -0800 (PST) Date: Thu, 6 Mar 2003 06:28:52 -0800 (PST) From: Peter Pentchev Message-Id: <200303061428.h26ESqhO067662@freefall.freebsd.org> To: roam@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: bin/48958: The type 'bool' has different sizes for C and C++ Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: The type 'bool' has different sizes for C and C++ Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: roam Responsible-Changed-When: Thu Mar 6 06:23:01 PST 2003 Responsible-Changed-Why: Over to the -standards list to take a look at this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=48958 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Mar 6 10:49:53 2003 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 B491D37B401; Thu, 6 Mar 2003 10:49:50 -0800 (PST) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00C5C43F3F; Thu, 6 Mar 2003 10:49:49 -0800 (PST) (envelope-from corecode@corecode.ath.cx) Received: from fwd08.sul.t-online.de by mailout05.sul.t-online.com with smtp id 18r0R9-0004ww-03; Thu, 06 Mar 2003 19:49:47 +0100 Received: from pride.uni.stoert.net (320050403952-0001@[217.82.60.93]) by fmrl08.sul.t-online.com with esmtp id 18r0Qu-1fCq4eC; Thu, 6 Mar 2003 19:49:32 +0100 Received: from terrorfish.uni.stoert.net (terrorfish.uni.stoert.net [10.150.180.178]) by pride.uni.stoert.net (Postfix) with ESMTP id 764B0130C06; Thu, 6 Mar 2003 19:49:32 +0100 (CET) Received: from terrorfish.uni.stoert.net (localhost [127.0.0.1]) by terrorfish.uni.stoert.net (8.12.7/8.12.7) with ESMTP id h26InodN067787; Thu, 6 Mar 2003 19:49:50 +0100 (CET) (envelope-from corecode@terrorfish.uni.stoert.net) Received: (from corecode@localhost) by terrorfish.uni.stoert.net (8.12.7/8.12.7/Submit) id h26Innjw067782; Thu, 6 Mar 2003 19:49:49 +0100 (CET) (envelope-from corecode) Date: Thu, 6 Mar 2003 19:49:45 +0100 From: "Simon 'corecode' Schubert" To: standards@freebsd.org Cc: Mike Barcroft , markm@freebsd.org Subject: Re: cvs commit: src/sys/sys stat.h Message-Id: <20030306194945.126c092f.corecode@corecode.ath.cx> In-Reply-To: <200302262010.h1QKAsMT007004@repoman.freebsd.org> References: <200302262010.h1QKAsMT007004@repoman.freebsd.org> Reply-To: standards@freebsd.org, corecode@corecode.ath.cx X-Mailer: Sylpheed version 0.8.10claws93 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.n.n8Fy3e('0fOY" X-Sender: 320050403952-0001@t-dialin.net Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=.n.n8Fy3e('0fOY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Lately Mike Barcroft told: > mike 2003/02/26 12:10:54 PST > > Modified files: > sys/sys stat.h > Log: > Change spelling of `u_int' to `unsigned int' in the POSIX case. if this catched the POSIX case it would be good. bad thing is it doesn't catch it. imagine: % cat < stattest.c #define _XOPEN_SOURCE 600 #include #include EOF % cc -c stattest.c In file included from stattest.c:4: /usr/include/sys/stat.h:127: syntax error before "u_int" /usr/include/sys/stat.h:158: syntax error before "u_int" problem here is: _XOPEN_SOURCE defines _POSIX_C_SOURCE but NOT _POSIX_SOURCE which is being checked for in many places in the source tree: % grep -r '#if.*_POSIX_SOURCE' /usr/include | wc -l 73 a possible fix could be: Index: sys/sys/cdefs.h =================================================================== RCS file: /home/ncvs/src/sys/sys/cdefs.h,v retrieving revision 1.68 diff -u -r1.68 cdefs.h --- sys/sys/cdefs.h 21 Oct 2002 20:50:30 -0000 1.68 +++ sys/sys/cdefs.h 6 Mar 2003 17:35:23 -0000 @@ -341,6 +341,8 @@ #define _POSIX_C_SOURCE 198808 #endif #ifdef _POSIX_C_SOURCE +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 #if _POSIX_C_SOURCE >= 200112 #define __POSIX_VISIBLE 200112 #define __ISO_C_VISIBLE 1999 but as i'm writing this patch shows other (mis?)usage of _POSIX_SOURCE: [snip math.h] #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) #define M_E 2.7182818284590452354 /* e */ [...] now stuff breaks here. what's the proper fix? changing all headers so that _POSIX_SOURCE isn't used anymore (only _POSIX_VISIBLE and/or _POSIX_C_SOURCE)? cheers simon ps: please cc me as i'm not subscribed. reply-to headers set tho -- /"\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --=.n.n8Fy3e('0fOY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+Z5hNr5S+dk6z85oRAurKAKD1rcPV5eU9TJ1igy5Yxv7Q2VJtSwCfWKx4 3Peu5stNFxtrGl6v3+qryp4= =ZJSJ -----END PGP SIGNATURE----- --=.n.n8Fy3e('0fOY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Mar 6 17:24:52 2003 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 3B7E937B401; Thu, 6 Mar 2003 17:24:44 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CE6343FB1; Thu, 6 Mar 2003 17:24:43 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id DC9A29C4C; Thu, 6 Mar 2003 20:11:45 -0500 (EST) Date: Thu, 6 Mar 2003 20:11:45 -0500 From: Mike Barcroft To: standards@freebsd.org, corecode@corecode.ath.cx Cc: markm@freebsd.org Subject: Re: cvs commit: src/sys/sys stat.h Message-ID: <20030306201145.M70629@espresso.bsdmike.org> References: <200302262010.h1QKAsMT007004@repoman.freebsd.org> <20030306194945.126c092f.corecode@corecode.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <20030306194945.126c092f.corecode@corecode.ath.cx>; from corecode@corecode.ath.cx on Thu, Mar 06, 2003 at 07:49:45PM +0100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Simon 'corecode' Schubert writes: > Lately Mike Barcroft told: > > > mike 2003/02/26 12:10:54 PST > > > > Modified files: > > sys/sys stat.h > > Log: > > Change spelling of `u_int' to `unsigned int' in the POSIX case. > > if this catched the POSIX case it would be good. bad thing is it doesn't > catch it. imagine: [...] Yes, I know, it was just a quick fix to unbreak world. Here's a patch I haven't committed yet (I want to review the specification again). Best regards, Mike Barcroft --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="stat.diff" Add missing types, update standard namespaces, and use variable types that don't require . Index: stat.h =================================================================== RCS file: /work/repo/src/sys/sys/stat.h,v retrieving revision 1.32 diff -u -r1.32 stat.h --- stat.h 26 Feb 2003 20:10:54 -0000 1.32 +++ stat.h 27 Feb 2003 16:17:18 -0000 @@ -45,11 +45,48 @@ #include #include +/* XXX missing blkcnt_t, blksize_t, dev_t. */ + #ifndef _FFLAGS_T_DECLARED -typedef __fflags_t fflags_t; /* file flags */ +typedef __fflags_t fflags_t; #define _FFLAGS_T_DECLARED #endif +#ifndef _GID_T_DECLARED +typedef __gid_t gid_t; +#define _GID_T_DECLARED +#endif + +#ifndef _INO_T_DECLARED +typedef __ino_t ino_t; +#define _INO_T_DECLARED +#endif + +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; +#define _MODE_T_DECLARED +#endif + +#ifndef _NLINK_T_DECLARED +typedef __nlink_t nlink_t; +#define _NLINK_T_DECLARED +#endif + +#ifndef _OFF_T_DECLARED +typedef __off_t off_t; +#define _OFF_T_DECLARED +#endif + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + +#ifndef _UID_T_DECLARED +typedef __uid_t uid_t; +#define _UID_T_DECLARED +#endif + #if !defined(_KERNEL) && !defined(_POSIX_SOURCE) /* * XXX we need this for struct timespec. We get miscellaneous namespace @@ -62,31 +99,31 @@ #include #endif -#ifdef _KERNEL +#ifdef _KERNEL /* XXX __dev_t should be in . */ #define __dev_t udev_t #else #define __dev_t dev_t #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE struct ostat { - u_int16_t st_dev; /* inode's device */ + __uint16_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ mode_t st_mode; /* inode protection mode */ nlink_t st_nlink; /* number of hard links */ - u_int16_t st_uid; /* user ID of the file's owner */ - u_int16_t st_gid; /* group ID of the file's group */ - u_int16_t st_rdev; /* device type */ - int32_t st_size; /* file size, in bytes */ + __uint16_t st_uid; /* user ID of the file's owner */ + __uint16_t st_gid; /* group ID of the file's group */ + __uint16_t st_rdev; /* device type */ + __int32_t st_size; /* file size, in bytes */ struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ - int32_t st_blksize; /* optimal blocksize for I/O */ - int32_t st_blocks; /* blocks allocated for file */ + __int32_t st_blksize; /* optimal blocksize for I/O */ + __int32_t st_blocks; /* blocks allocated for file */ fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ + __uint32_t st_gen; /* file generation number */ }; -#endif /* !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ struct stat { __dev_t st_dev; /* inode's device */ @@ -96,7 +133,7 @@ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ @@ -109,12 +146,12 @@ long st_ctimensec; /* nsec of last file status change */ #endif off_t st_size; /* file size, in bytes */ - int64_t st_blocks; /* blocks allocated for file */ - u_int32_t st_blksize; /* optimal blocksize for I/O */ + __int64_t st_blocks; /* blocks allocated for file */ + __uint32_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ - int32_t st_lspare; -#ifndef _POSIX_SOURCE + __uint32_t st_gen; /* file generation number */ + __int32_t st_lspare; +#if __BSD_VISIBLE struct timespec st_birthtimespec; /* time of file creation */ /* * Explicitly pad st_birthtimespec to 16 bytes so that the size of @@ -124,8 +161,8 @@ * to cover up to 64 bits on 32-bit machines. We assume that * CHAR_BIT is 8... */ - u_int :(8 / 2) * (16 - (int)sizeof(struct timespec)); - u_int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); #else time_t st_birthtime; /* time of file creation */ long st_birthtimensec; /* nsec of file creation */ @@ -134,12 +171,12 @@ #endif }; -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE struct nstat { __dev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ - u_int32_t st_mode; /* inode protection mode */ - u_int32_t st_nlink; /* number of hard links */ + __uint32_t st_mode; /* inode protection mode */ + __uint32_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __dev_t st_rdev; /* device type */ @@ -147,22 +184,22 @@ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ off_t st_size; /* file size, in bytes */ - int64_t st_blocks; /* blocks allocated for file */ - u_int32_t st_blksize; /* optimal blocksize for I/O */ + __int64_t st_blocks; /* blocks allocated for file */ + __uint32_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ + __uint32_t st_gen; /* file generation number */ struct timespec st_birthtimespec; /* time of file creation */ /* * See above about the following padding. */ - u_int :(8 / 2) * (16 - (int)sizeof(struct timespec)); - u_int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); }; #endif #undef __dev_t -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define st_atime st_atimespec.tv_sec #define st_mtime st_mtimespec.tv_sec #define st_ctime st_ctimespec.tv_sec @@ -171,7 +208,7 @@ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define S_ISTXT 0001000 /* sticky bit */ #endif @@ -180,7 +217,7 @@ #define S_IWUSR 0000200 /* W for owner */ #define S_IXUSR 0000100 /* X for owner */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR #define S_IEXEC S_IXUSR @@ -196,7 +233,7 @@ #define S_IWOTH 0000002 /* W for other */ #define S_IXOTH 0000001 /* X for other */ -#ifndef _POSIX_SOURCE +#if __XSI_VISIBLE #define S_IFMT 0170000 /* type of file mask */ #define S_IFIFO 0010000 /* named pipe (fifo) */ #define S_IFCHR 0020000 /* character special */ @@ -205,22 +242,26 @@ #define S_IFREG 0100000 /* regular */ #define S_IFLNK 0120000 /* symbolic link */ #define S_IFSOCK 0140000 /* socket */ -#define S_IFWHT 0160000 /* whiteout */ #define S_ISVTX 0001000 /* save swapped text even after use */ #endif +#if __BSD_VISIBLE +#define S_IFWHT 0160000 /* whiteout */ +#endif #define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */ #define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */ #define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */ #define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */ #define S_ISFIFO(m) (((m) & 0170000) == 0010000) /* fifo or socket */ -#ifndef _POSIX_SOURCE +#if __POSIX_VISIBLE >= 200112 #define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */ #define S_ISSOCK(m) (((m) & 0170000) == 0140000) /* socket */ +#endif +#if __XSI_VISIBLE #define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */ #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ /* 7777 */ #define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) @@ -260,27 +301,31 @@ #define NOUNLINK (UF_NOUNLINK | SF_NOUNLINK) #endif -#endif /* !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ #ifndef _KERNEL __BEGIN_DECLS -int chmod(const char *, mode_t); -int fstat(int, struct stat *); -int mkdir(const char *, mode_t); -int mkfifo(const char *, mode_t); -int stat(const char *, struct stat *); -mode_t umask(mode_t); - -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE int chflags(const char *, unsigned long); -int lchflags(const char *, int); +#endif +int chmod(const char *, mode_t); +#if __BSD_VISIBLE int fchflags(int, unsigned long); int fchmod(int, mode_t); +#endif +int fstat(int, struct stat *); +#if __BSD_VISIBLE +int lchflags(const char *, int); int lchmod(const char *, mode_t); +#endif +#if __POSIX_VISIBLE >= 200112 int lstat(const char *, struct stat *); #endif +int mkdir(const char *, mode_t); +int mkfifo(const char *, mode_t); +int stat(const char *, struct stat *); +mode_t umask(mode_t); __END_DECLS - #endif /* !_KERNEL */ #endif /* !_SYS_STAT_H_ */ --bg08WKrSYDhXBjb5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Mar 6 22:34:23 2003 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 2B07A37B401; Thu, 6 Mar 2003 22:34:22 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E80043FCB; Thu, 6 Mar 2003 22:34:21 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h276YFLT060517; Thu, 6 Mar 2003 22:34:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h276YFdH060516; Thu, 6 Mar 2003 22:34:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Thu, 6 Mar 2003 22:34:15 -0800 From: David Schultz To: standards@FreeBSD.ORG Cc: obrien@FreeBSD.ORG Subject: gdtoa import this weekend, future directions Message-ID: <20030307063415.GA60214@HAL9000.homeunix.com> Mail-Followup-To: standards@FreeBSD.ORG, obrien@FreeBSD.ORG References: <20030221085508.GA55786@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030221085508.GA55786@HAL9000.homeunix.com> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This took me longer than expected due to obscure bugs in the vendor source, but I've finally pulled everything together. To recap, gdtoa is a library for string->float and float->string conversion. Our libc presently uses its predecessor from 3BSD, which lacks support for hexadecimal floating point constants, floats, and long doubles. I'd like to do the import this weekend. I've tested extensively on i386, and I've verified buildworlds and basic functionality on ia64 and sparc64. I do not plan to immediately integrate long double support into printf because there are multiple outstanding bugs in our printf implementation's floating point support, and I haven't decided whether to repair or replace yet. As it is, my test cases are crashing in printf on ia64 without any of my changes. The initial import will only add strtof() and strtold() and the associated documentation. As per Garret's suggestion, I would like to soon add some interfaces that are not standardized, but perhaps not all of the features gdtoa provides. (In particular, strtor{f,d,ld} can be emulated by setting the rounding direction before calling the standard functions, so maybe we don't need to bother with those for now.) I would like to add: int strtofi(const char *nptr, char **endptr, float *lo, float *hi); int strtodi(const char *nptr, char **endptr, double *lo, double *hi); int strtoldi(const char *nptr, char **endptr, long double *lo, long double *hi); These routines are like strtod(), but they efficiently compute two floating point numbers that tightly bound the actual value of the parsed string. The vendor implementation returns an integer constant that classifies the number as zero, normal, NaN, etc. Since we already have fpclassify() and a separate set of manifest constants for that, I suggest defining the return value of our version to be zero if the converted value can be represented exactly (in which case 'hi' is also zero) and nonzero otherwise. (I have chosen different function names to reflect that.) Alternatively, we could just add more manifest constants and use the vendor's version. Comments and suggestions are appreciated. The code is in http://www.FreeBSD.ORG/~das/gdtoa/ . The files are described below: gdtoa.tgz latest vendor source; will appear on the netlib mirrors within a few days gdtoa.diff patches against vendor source libc_gdtoa.diff patches against the rest of the tree: do a 'mkdir lib/libc/{gdtoa,powerpc/stdlib}' first To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Mar 7 0:30:50 2003 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 8D2B837B401; Fri, 7 Mar 2003 00:30:49 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5645E43F75; Fri, 7 Mar 2003 00:30:48 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h278UmSd019703; Fri, 7 Mar 2003 00:30:48 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h278UlU4002430; Fri, 7 Mar 2003 00:30:47 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h278UlMb002429; Fri, 7 Mar 2003 00:30:47 -0800 (PST) (envelope-from marcel) Date: Fri, 7 Mar 2003 00:30:47 -0800 From: Marcel Moolenaar To: David Schultz Cc: standards@FreeBSD.ORG Subject: Re: gdtoa import this weekend, future directions Message-ID: <20030307083047.GA2386@dhcp01.pn.xcllnt.net> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030307063415.GA60214@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030307063415.GA60214@HAL9000.homeunix.com> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Mar 06, 2003 at 10:34:15PM -0800, David Schultz wrote: > haven't decided whether to repair or replace yet. As it is, my > test cases are crashing in printf on ia64 without any of my > changes. If you give me your testcases I can take a look at the crashes on ia64. Instructions is applicable are appreciated. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Mar 7 22:41:22 2003 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 140DD37B405 for ; Fri, 7 Mar 2003 22:41:20 -0800 (PST) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AF3043F85 for ; Fri, 7 Mar 2003 22:41:19 -0800 (PST) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([151.200.235.142]) by pop015.verizon.net (InterMail vM.5.01.05.27 201-253-122-126-127-20021220) with ESMTP id <20030308064118.MANA14460.pop015.verizon.net@kokeb.ambesa.net>; Sat, 8 Mar 2003 00:41:18 -0600 Date: Sat, 8 Mar 2003 01:41:17 -0500 From: Mike Makonnen To: freebsd-standards@freebsd.org Cc: Mark Murray Subject: PR: misc/48993 strptime behaviour X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop015.verizon.net from [151.200.235.142] at Sat, 8 Mar 2003 00:41:18 -0600 Message-Id: <20030308064118.MANA14460.pop015.verizon.net@kokeb.ambesa.net> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello folks, The submitter says some third party software he installed failed because it expected the tm_wday and tm_yday of the tm structure to be automatically filled in by strptime(3) (Apparently, this is the behaviour on linux). Our implementation fills them in if the %s (number of seconds since the Epoch) or %Z (time zone name) specifiers are used. Otherwise, it fills in only the fields specified in the format string. I think it's preferable to have them filled in automatically all the time and not just sometimes, but I'm not sure if this would be a violation of some unix standard. Can anyone shed some light on what the behaviour is supposed to be? If there are no issues I will commit the following patch. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 Index: stdtime/strptime.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdtime/strptime.c,v retrieving revision 1.30 diff -u -r1.30 strptime.c --- stdtime/strptime.c 16 Feb 2003 17:29:11 -0000 1.30 +++ stdtime/strptime.c 7 Mar 2003 18:09:24 -0000 @@ -521,17 +521,18 @@ struct tm * __restrict tm) { char *ret; + time_t t; if (__isthreaded) _pthread_mutex_lock(&gotgmt_mutex); got_GMT = 0; ret = _strptime(buf, fmt, tm); - if (ret && got_GMT) { - time_t t = timegm(tm); + if (ret) { + t = got_GMT ? timegm(tm) : mktime(tm); localtime_r(&t, tm); - got_GMT = 0; } + got_GMT = 0; if (__isthreaded) _pthread_mutex_unlock(&gotgmt_mutex); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Sat Mar 8 1:22:35 2003 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 E0F2937B401; Sat, 8 Mar 2003 01:22:33 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id D903E43FBF; Sat, 8 Mar 2003 01:22:31 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA14637; Sat, 8 Mar 2003 20:22:29 +1100 Date: Sat, 8 Mar 2003 20:22:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: David Schultz Cc: standards@FreeBSD.ORG, Subject: Re: gdtoa import this weekend, future directions In-Reply-To: <20030307063415.GA60214@HAL9000.homeunix.com> Message-ID: <20030308201519.X9873-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 6 Mar 2003, David Schultz wrote: > This took me longer than expected due to obscure bugs in the > vendor source, but I've finally pulled everything together. To > recap, gdtoa is a library for string->float and float->string > conversion. Our libc presently uses its predecessor from 3BSD, > which lacks support for hexadecimal floating point constants, > floats, and long doubles. Looks good (I didn't look at any details). > int strtofi(const char *nptr, char **endptr, float *lo, float *hi); > int strtodi(const char *nptr, char **endptr, double *lo, double *hi); > int strtoldi(const char *nptr, char **endptr, long double *lo, > long double *hi); > > These routines are like strtod(), but they efficiently compute two > floating point numbers that tightly bound the actual value of the > parsed string. The vendor implementation returns an integer > constant that classifies the number as zero, normal, NaN, etc. > Since we already have fpclassify() and a separate set of manifest > constants for that, I suggest defining the return value of our > version to be zero if the converted value can be represented > exactly (in which case 'hi' is also zero) and nonzero otherwise. > (I have chosen different function names to reflect that.) > Alternatively, we could just add more manifest constants and use > the vendor's version. Comments and suggestions are appreciated. I wouldn't change or reduce gdtoa's interfaces except as necessary to prevent references to the parts that we need (mainly strtold() and printf/scanf support) dragging in the whole library. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Sat Mar 8 13:11:28 2003 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 AA58A37B404; Sat, 8 Mar 2003 13:11:22 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 428B043FB1; Sat, 8 Mar 2003 13:11:21 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h28LBGLT070240; Sat, 8 Mar 2003 13:11:16 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h28LBFmH070239; Sat, 8 Mar 2003 13:11:15 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Sat, 8 Mar 2003 13:11:15 -0800 From: David Schultz To: Bruce Evans Cc: standards@FreeBSD.ORG, obrien@FreeBSD.ORG Subject: Re: gdtoa import this weekend, future directions Message-ID: <20030308211115.GA66622@HAL9000.homeunix.com> Mail-Followup-To: Bruce Evans , standards@FreeBSD.ORG, obrien@FreeBSD.ORG References: <20030307063415.GA60214@HAL9000.homeunix.com> <20030308201519.X9873-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030308201519.X9873-100000@gamplex.bde.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Bruce Evans : > > int strtofi(const char *nptr, char **endptr, float *lo, float *hi); > > int strtodi(const char *nptr, char **endptr, double *lo, double *hi); > > int strtoldi(const char *nptr, char **endptr, long double *lo, > > long double *hi); > > > > These routines are like strtod(), but they efficiently compute two > > floating point numbers that tightly bound the actual value of the > > parsed string. The vendor implementation returns an integer > > constant that classifies the number as zero, normal, NaN, etc. > > Since we already have fpclassify() and a separate set of manifest > > constants for that, I suggest defining the return value of our > > version to be zero if the converted value can be represented > > exactly (in which case 'hi' is also zero) and nonzero otherwise. > > (I have chosen different function names to reflect that.) > > Alternatively, we could just add more manifest constants and use > > the vendor's version. Comments and suggestions are appreciated. > > I wouldn't change or reduce gdtoa's interfaces except as necessary > to prevent references to the parts that we need (mainly strtold() > and printf/scanf support) dragging in the whole library. The package contains a few large core routines, principally gdtoa and strtod, and numerous short wrappers around them that provide easier to use interfaces. The marginal cost for adding the extras is small, but I want to make sure that these things are generally useful and that they fit well with the rest of our math routines. In addition to the standard strto*, which look at libc's idea of the rounding direction, there are strtor* versions that take the rounding direction as an extra argument, and strtoI* versions (described above) that compute the interval into which the number falls. All of the nonstandard functions are slightly awkward in that they return a floating point number by manipulating the location pointed to by an extra argument that they take; the return value is as follows: enum { /* return values from strtodg */ STRTOG_Zero = 0, STRTOG_Normal = 1, STRTOG_Denormal = 2, STRTOG_Infinite = 3, STRTOG_NaN = 4, STRTOG_NaNbits = 5, STRTOG_NoNumber = 6, STRTOG_Retmask = 7, /* The following may be or-ed into one of the above values. */ STRTOG_Neg = 0x08, STRTOG_Inexlo = 0x10, STRTOG_Inexhi = 0x20, STRTOG_Inexact = 0x30, STRTOG_Underflow= 0x40, STRTOG_Overflow = 0x80 }; I could incorporate the strtoI* and strtor* functions as is, and stick the above constants in stdlib.h (appropriately ifdef'd, of course). But then we would have interfaces that convert from strings to floating point, but not exactly like strtod(), and that classify floating point numbers, but not exactly like fpclassify(). The duplication seems a bit kludgy, but I'm perfectly willing to add the functions either way, since they're so trivial. I'm not planning to add them immediately, but if someone has their heart set on any particular interface, please let me know. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message