digitalmars.D.bugs - [patch] updated reserved version list
- Thomas Kuehne (32/32) Dec 07 2004 -----BEGIN PGP SIGNED MESSAGE-----
- Thomas Kuehne (11/12) Dec 07 2004 -----BEGIN PGP SIGNED MESSAGE-----
-
Stewart Gordon
(9/10)
Dec 07 2004
- Thomas Kuehne (15/21) Dec 07 2004 -----BEGIN PGP SIGNED MESSAGE-----
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (12/18) Dec 07 2004 That doesn't make it stink less, though ?
- Regan Heath (7/19) Dec 07 2004 IIRC it's a copying of the C compilers "habits". The idea being people a...
- =?ISO-8859-15?Q?Anders_F_Bj=F6rklund?= (7/9) Dec 07 2004 Ehrm, D is a case *sensitive* language ?
- Regan Heath (8/16) Dec 07 2004 I know. That and every other reason I've heard for the current situation...
- J C Calvarese (12/31) Dec 07 2004 I think last time this subject came up I wrote that we should use all lo...
- Regan Heath (10/50) Dec 08 2004 It's never too late. Find and replace will handle this change easily.
- =?ISO-8859-15?Q?Anders_F_Bj=F6rklund?= (4/12) Dec 08 2004 You would probably love Mac OS X then...
- Regan Heath (6/15) Dec 08 2004 I've noticed, specifically /System/Library/StartupItems (I work for a
- Simon Buchan (19/26) Dec 09 2004 I suspect it has something to do with Windows being case insensitive and...
- John Reimer (2/12) Dec 07 2004 So, Unix is being used instead of Posix still?
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (10/13) Dec 07 2004 AFAIK, the DMD compiler only defines "linux" ?
- John Reimer (18/34) Dec 07 2004 Okay, then I wonder why it uses "Unix"? Why carry gdc's use of "Unix"
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (18/60) Dec 07 2004 Which does mention the "Unix platforms" that later show
- Thomas Kuehne (16/27) Dec 08 2004 -----BEGIN PGP SIGNED MESSAGE-----
- =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= (10/14) Dec 08 2004 Sounds good!
- John Reimer (5/141) Dec 08 2004 Thanks Thomas!
- Lars Ivar Igesund (4/155) Dec 08 2004 I certainly support this. The current scheme is confusing and no reason
- Regan Heath (4/23) Dec 08 2004 Why not "Darwin"? To be consistent.
- Thomas Kuehne (13/22) Dec 08 2004 -----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message 1) fixes http://svn.kuehne.cn/dstress/nocompile/command_line_version_16.d 2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8) 3) adds "D_InlineAsm" (it's a compiler feature) Thomas --- ./109/dmd/src/dmd/debcond.c 2004-11-03 15:44:36.000000000 +0100 +++ ./109X/dmd/src/dmd/debcond.c 2004-12-07 18:17:18.375980136 +0100 -112,11 +112,13 { static char* reserved[] = { - "DigitalMars", "X86", "AMD64", + "DigitalMars", + "X86", "AMD64", "IA64", "Windows", "Win32", "Win64", - "linux", + "Unix", "linux", "darwin" "LittleEndian", "BigEndian", - "none", + "D_InlineAsm", + "none", "all" }; for (unsigned i = 0; i < sizeof(reserved) / sizeof(reserved[0]); i++) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBteg33w+/yD4P9tIRAp5sAKCXy+xy1pYyPV35PYB2twdf8vyxxACfcXwv 5o4QW0nZgJHpqZUJCy2GckM= =qSD6 -----END PGP SIGNATURE-----
Dec 07 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas Kuehne schrieb am Tue, 7 Dec 2004 18:24:24 +0100:3) adds "D_InlineAsm" (it's a compiler feature)arg.. please remove this line, it's already taken care of Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBtel63w+/yD4P9tIRAt/iAJ9Y9xk/F7WsuLkmsrM3PhnFYLewVQCfRML1 gFX6us7Zd5BfRc0URJKGksM= =IhtX -----END PGP SIGNATURE-----
Dec 07 2004
Thomas Kuehne wrote: <snip>2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)<snip> Did anyone particular decide "darwin" should be in lowercase? FTM, does anyone have any idea why "linux" is lowercase, unlike the others? Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Dec 07 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Stewart Gordon schrieb am Tue, 07 Dec 2004 17:58:32 +0000:Thomas Kuehne wrote: <snip>Please, the lower case versus capital case issue for Linux has been beaten to death for ages now. I think David Friedman was the first to use "darwin" for MacOS. http://home.earthlink.net/~dvdfrdmn/d/gdc-1g.tar.bz2 Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBtfZY3w+/yD4P9tIRAj/lAJ0UICV5ftHjiwb7AsfaO8C+10USQgCbBMjs DVha0vqQ2+1uCmwNWsbef8k= =LNtO -----END PGP SIGNATURE-----2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)<snip> Did anyone particular decide "darwin" should be in lowercase? FTM, does anyone have any idea why "linux" is lowercase, unlike the others?
Dec 07 2004
Thomas Kuehne wrote:Walter.Did anyone particular decide "darwin" should be in lowercase?That doesn't make it stink less, though ? Most newcomers notice the smell, even if you get used to it after a while in here. Think it had some obscure compiler reason...FTM, does anyone have any idea why "linux" is lowercase, unlike the others?Please, the lower case versus capital case issue for Linux has been beaten to death for ages now.I think David Friedman was the first to use "darwin" for MacOS.Since the `uname` is Darwin, I think it's just a "side effect" ? (although David Friedman did a lot of Mac OS X porting efforts) The `uname` for Linux is : Linux, which makes the D version "linux". And since the `arch` is ppc, let's call it "PPC" ? :-P It's like logic. In reverse. But "Windows" and "linux" it is. --anders
Dec 07 2004
On Tue, 07 Dec 2004 19:59:22 +0100, Anders F Björklund <afb algonet.se> wrote:Thomas Kuehne wrote:IIRC it's a copying of the C compilers "habits". The idea being people are used to it. IMHO they should be case insensitive, after all when are you ever going to want "Abc" or "ABC" or "abc" to mean different things!? ReganWalter.Did anyone particular decide "darwin" should be in lowercase?That doesn't make it stink less, though ? Most newcomers notice the smell, even if you get used to it after a while in here. Think it had some obscure compiler reason...FTM, does anyone have any idea why "linux" is lowercase, unlike the others?Please, the lower case versus capital case issue for Linux has been beaten to death for ages now.
Dec 07 2004
Regan Heath wrote:IMHO they should be case insensitive, after all when are you ever going to want "Abc" or "ABC" or "abc" to mean different things!?Ehrm, D is a case *sensitive* language ? Which is a good thing I think, if nothing else to keep people from writing "Pascal"... I'll settle for the "alternative" spelling, just because I'm a little consistency freak. --anders
Dec 07 2004
On Tue, 07 Dec 2004 22:33:49 +0100, Anders F Björklund <afb algonet.se> wrote:Regan Heath wrote:I know. That and every other reason I've heard for the current situation doesn't impress me in the slightest.IMHO they should be case insensitive, after all when are you ever going to want "Abc" or "ABC" or "abc" to mean different things!?Ehrm, D is a case *sensitive* language ?Which is a good thing I think, if nothing else to keep people from writing "Pascal"... I'll settle for the "alternative" spelling, just because I'm a little consistency freak.I would not mind if it were simply consistent i.e. always lowercase or always capitalised first letter, but the current situation is not consistent. IMO adding alternatives will only confuse matters. Regan
Dec 07 2004
In article <opsinzx8ol23k2f5 ally>, Regan Heath says...On Tue, 07 Dec 2004 22:33:49 +0100, Anders F Björklund <afb algonet.se> wrote:I think last time this subject came up I wrote that we should use all lowercase across the board: version(windows) version(linux) version(posix) version(darwin) We're not at 1.0 yet, but it does seem a little late to be fixing this. But the current system is woefully inconsistent as is clearly demonstrated by this thread, so I think we need to consider adopting a consistent convention that can last. jcc7Regan Heath wrote:I know. That and every other reason I've heard for the current situation doesn't impress me in the slightest.IMHO they should be case insensitive, after all when are you ever going to want "Abc" or "ABC" or "abc" to mean different things!?Ehrm, D is a case *sensitive* language ?Which is a good thing I think, if nothing else to keep people from writing "Pascal"... I'll settle for the "alternative" spelling, just because I'm a little consistency freak.I would not mind if it were simply consistent i.e. always lowercase or always capitalised first letter, but the current situation is not consistent. IMO adding alternatives will only confuse matters. Regan
Dec 07 2004
On Wed, 8 Dec 2004 05:42:14 +0000 (UTC), J C Calvarese <jcc7 cox.net> wrote:In article <opsinzx8ol23k2f5 ally>, Regan Heath says...It's never too late. Find and replace will handle this change easily.On Tue, 07 Dec 2004 22:33:49 +0100, Anders F Björklund <afb algonet.se> wrote:I think last time this subject came up I wrote that we should use all lowercase across the board: version(windows) version(linux) version(posix) version(darwin) We're not at 1.0 yet, but it does seem a little late to be fixing this.Regan Heath wrote:I know. That and every other reason I've heard for the current situation doesn't impress me in the slightest.IMHO they should be case insensitive, after all when are you ever going to want "Abc" or "ABC" or "abc" to mean different things!?Ehrm, D is a case *sensitive* language ?Which is a good thing I think, if nothing else to keep people from writing "Pascal"... I'll settle for the "alternative" spelling, just because I'm a little consistency freak.I would not mind if it were simply consistent i.e. always lowercase or always capitalised first letter, but the current situation is not consistent. IMO adding alternatives will only confuse matters. ReganBut the current system is woefully inconsistent as is clearly demonstrated by this thread, so I think we need to consider adopting a consistent convention that can last.Agreed. My vote goes to any of the following: 1. all lowercase 2. capitalise first letter 3. all uppercase better in that it's slightly less of a pain to type. Regan
Dec 08 2004
Regan Heath wrote:Agreed. My vote goes to any of the following: 1. all lowercase 2. capitalise first letter 3. all uppercase better in that it's slightly less of a pain to type.You would probably love Mac OS X then... Paths like /System/Library/Frameworks :) --anders
Dec 08 2004
On Wed, 08 Dec 2004 23:03:05 +0100, Anders F Björklund <afb algonet.se> wrote:Regan Heath wrote:I've noticed, specifically /System/Library/StartupItems (I work for a company writing mail server software which runs on as many OS's as we can manage). ReganAgreed. My vote goes to any of the following: 1. all lowercase 2. capitalise first letter 3. all uppercase slightly better in that it's slightly less of a pain to type.You would probably love Mac OS X then... Paths like /System/Library/Frameworks :)
Dec 08 2004
On Tue, 07 Dec 2004 17:58:32 +0000, Stewart Gordon <smjg_1998 yahoo.com> wrote:Thomas Kuehne wrote: <snip>I suspect it has something to do with Windows being case insensitive and vice-versa (like with almost the SOLE exception of X, everything in linux seems to be lowercase) -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" -- "I plan on at least one critical patch every month, and I haven't been disappointed." - Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP (Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp) -- "It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey" -Wired website: "The Incredible Shrinking Comic"2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)<snip> Did anyone particular decide "darwin" should be in lowercase? FTM, does anyone have any idea why "linux" is lowercase, unlike the others? Stewart.
Dec 09 2004
On Tue, 07 Dec 2004 18:24:24 +0100, Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message 1) fixes http://svn.kuehne.cn/dstress/nocompile/command_line_version_16.d 2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)So, Unix is being used instead of Posix still?
Dec 07 2004
John Reimer wrote:AFAIK, the DMD compiler only defines "linux" ? "Unix" is being used by the GDC compiler (now) Should there be some kind of new directive, then "Posix" would be a good standard name... I think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface) Or something... Just HAVING a collective name for e.g. Linux, Mac OS X and FreeBSD would be a start. --anders2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)So, Unix is being used instead of Posix still?
Dec 07 2004
On Tue, 07 Dec 2004 20:16:55 +0100, Anders F Björklund wrote:John Reimer wrote:Okay, then I wonder why it uses "Unix"? Why carry gdc's use of "Unix" back to dmd? I assume it's to maintain compatibility between the two compiler systems. Shouldn't this be discussed first before it's presumed to be the right thing to do?AFAIK, the DMD compiler only defines "linux" ? "Unix" is being used by the GDC compiler (now)2) adds the identifiers "Unix", "darwin" and "IA64" (used by gdc-0.8)So, Unix is being used instead of Posix still?Should there be some kind of new directive, then "Posix" would be a good standard name...I agree.I think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" do fit.Or something... Just HAVING a collective name for e.g. Linux, Mac OS X and FreeBSD would be a start.I agree. Unix is too broad /and/ ambiguous a term to be used in a any specific naming scheme; and API-based names should be used if a more broad scheme is necesary. It almost looks like gdc's naming methods should be changed then. I apologize for getting repetitive about this; I just see no strict organization or methodology to where the version schemes going. :-( Later, John
Dec 07 2004
John Reimer wrote:Okay, then I wonder why it uses "Unix"?David Friedman would know for sure, but the README says:Supported Systems * GCC 3.3.x, 3.4.x * Linux (tested on Red Hat 7.2, 8) * Mac OS X 10.3.x * FreeBSD 5.2.1 * Cygwin Similar versions should work and other Unix platforms may work. Although the compiler will probably work on most 32-bit architectures, the D runtime library will still need to be updated to support them.Which does mention the "Unix platforms" that later show up in the patched code for Phobos as: "version(Unix)" Such as it is being used in std.system:// Operating system family enum Family { Win32 = 1, // Microsoft 32 bit Windows systems linux, // all linux systems Unix, // all other } version (Win32) { Family family = Family.Win32; } else version (linux) { Family family = Family.linux; } else version (Unix) { Family family = Family.Unix; } else { static assert(0); }You can download the gdc distribution and check yourself. http://home.earthlink.net/~dvdfrdmn/d/gdc-0.8.tar.bz2Why carry gdc's use of "Unix" back to dmd?Probably since it's in use in the patched code already, but it's probably not that hard to search/replace... ?No argument there. "version (Posix)" would work nice I think ? And I wouldn't cry if "Linux" and "Darwin" were added too, in addition to the current "linux" and "darwin" versions... As for architectures, the offical list is missing PPC and PPC64, but I have already reported that shortcoming here. It is also missing "GNU", as the "compiler vendor" for GDC... (although I'm not sure if GDC is an official project just yet) With official, I mean: http://www.digitalmars.com/d/version.html --andersI think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" do fit.
Dec 07 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Bj=C3=B6rklund schrieb am Dienstag, 7. Dezember 2004 21:00:oI think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)=20 I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" d=The attached patch: 1) adds "Posix" for Linux platfroms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "dar= win" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d)= Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBtt2O3w+/yD4P9tIRAtdsAKDMVaXNHD/qGfHHCLsi+LXIIwFk6gCfVhD4 vdwwoUnsE/VmCI4SCt6ssms=3D =3D6cT2 -----END PGP SIGNATURE-----fit.=20 No argument there. "version (Posix)" would work nice I think ? =20 And I wouldn't cry if "Linux" and "Darwin" were added too, in addition to the current "linux" and "darwin" versions...
Dec 08 2004
Thomas Kuehne wrote:The attached patch: 1) adds "Posix" for Linux platfroms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "Darwin" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d)Sounds good! Let's see if it catches on (i.e. what Walter thinks) I'm pretty sure that the lowercase "linux" will remain, :( for compatibility with some old C compiler or what it was. At least it seemed that way, last time this was discussed - in the context of the usage of version(Linux) in std/loader.d (there's also a long d.D thread called "versioning other OS") But whether it is offically deprecated or not, I like the new ones. --anders
Dec 08 2004
Thanks Thomas! I too hope it gains support. Later, John Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Björklund schrieb am Dienstag, 7. Dezember 2004 21:00:The attached patch: 1) adds "Posix" for Linux platfroms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "darwin" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d) Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBtt2O3w+/yD4P9tIRAtdsAKDMVaXNHD/qGfHHCLsi+LXIIwFk6gCfVhD4 vdwwoUnsE/VmCI4SCt6ssms= =6cT2 -----END PGP SIGNATURE----- ------------------------------------------------------------------------ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message diff -ur org-0.109/dmd/src/dmd/mars.c neu-0.109/dmd/src/dmd/mars.c --- org-0.109/dmd/src/dmd/mars.c 2004-12-01 01:18:22.000000000 +0100 +++ neu-0.109/dmd/src/dmd/mars.c 2004-12-08 11:30:50.513512192 +0100 -192,7 +192,8 VersionCondition::addPredefinedGlobalIdent("Win32"); #endif #if linux - VersionCondition::addPredefinedGlobalIdent("linux"); + VersionCondition::addPredefinedGlobalIdent("Posix"); + VersionCondition::addPredefinedGlobalIdent("Linux"); global.params.isLinux = 1; #endif /* linux */ VersionCondition::addPredefinedGlobalIdent("X86"); diff -ur org-0.109/dmd/src/dmd/parse.c neu-0.109/dmd/src/dmd/parse.c --- org-0.109/dmd/src/dmd/parse.c 2004-12-03 01:19:56.000000000 +0100 +++ neu-0.109/dmd/src/dmd/parse.c 2004-12-08 11:30:50.625495168 +0100 -584,9 +584,27 unsigned level = 1; Identifier *id = NULL; - if (token.value == TOKidentifier) - id = token.ident; - else if (token.value == TOKint32v) + if (token.value == TOKidentifier){ + static char* oldVersion[] = { + "Unix", "linux", "darwin" + }; + + static char* newVersion[] = { + "Posix", "Linux", "Darwin" + }; + + for(size_t i = 0; i < sizeof(oldVersion) / sizeof(oldVersion[0]); i++){ + if(strcmp(oldVersion[i], token.ident->string)==0){ + if(global.params.useDeprecated){ + token.ident->string=newVersion[i]; + }else{ + error("version identifier '%s' is deprecated, use '%s'", oldVersion[i], newVersion[i]); + } + break; + } + } + id = token.ident; + }else if (token.value == TOKint32v) level = (unsigned)token.uns64value; else error("identifier or integer expected, not %s", token.toChars()); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBttuP3w+/yD4P9tIRAkYiAJ9avP0xiowYFU0QRook2g9MLYVvwgCdG8yM ZwjgCIJ4TvLoDfpjSihRgE0= =TM6X -----END PGP SIGNATURE-----No argument there. "version (Posix)" would work nice I think ? And I wouldn't cry if "Linux" and "Darwin" were added too, in addition to the current "linux" and "darwin" versions...I think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" do fit.
Dec 08 2004
I certainly support this. The current scheme is confusing and no reason can possibly be good enough to support it. Lars Ivar Igesund John Reimer wrote:Thanks Thomas! I too hope it gains support. Later, John Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Björklund schrieb am Dienstag, 7. Dezember 2004 21:00:The attached patch: 1) adds "Posix" for Linux platfroms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "darwin" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d) Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBtt2O3w+/yD4P9tIRAtdsAKDMVaXNHD/qGfHHCLsi+LXIIwFk6gCfVhD4 vdwwoUnsE/VmCI4SCt6ssms= =6cT2 -----END PGP SIGNATURE----- ------------------------------------------------------------------------ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message diff -ur org-0.109/dmd/src/dmd/mars.c neu-0.109/dmd/src/dmd/mars.c --- org-0.109/dmd/src/dmd/mars.c 2004-12-01 01:18:22.000000000 +0100 +++ neu-0.109/dmd/src/dmd/mars.c 2004-12-08 11:30:50.513512192 +0100 -192,7 +192,8 VersionCondition::addPredefinedGlobalIdent("Win32"); #endif #if linux - VersionCondition::addPredefinedGlobalIdent("linux"); + VersionCondition::addPredefinedGlobalIdent("Posix"); + VersionCondition::addPredefinedGlobalIdent("Linux"); global.params.isLinux = 1; #endif /* linux */ VersionCondition::addPredefinedGlobalIdent("X86"); diff -ur org-0.109/dmd/src/dmd/parse.c neu-0.109/dmd/src/dmd/parse.c --- org-0.109/dmd/src/dmd/parse.c 2004-12-03 01:19:56.000000000 +0100 +++ neu-0.109/dmd/src/dmd/parse.c 2004-12-08 11:30:50.625495168 +0100 -584,9 +584,27 unsigned level = 1; Identifier *id = NULL; - if (token.value == TOKidentifier) - id = token.ident; - else if (token.value == TOKint32v) + if (token.value == TOKidentifier){ + static char* oldVersion[] = { + "Unix", "linux", "darwin" + }; + + static char* newVersion[] = { + "Posix", "Linux", "Darwin" + }; + + for(size_t i = 0; i < sizeof(oldVersion) / sizeof(oldVersion[0]); i++){ + if(strcmp(oldVersion[i], token.ident->string)==0){ + if(global.params.useDeprecated){ + token.ident->string=newVersion[i]; + }else{ + error("version identifier '%s' is deprecated, use '%s'", oldVersion[i], newVersion[i]); + } + break; + } + } + id = token.ident; + }else if (token.value == TOKint32v) level = (unsigned)token.uns64value; else error("identifier or integer expected, not %s", token.toChars()); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBttuP3w+/yD4P9tIRAkYiAJ9avP0xiowYFU0QRook2g9MLYVvwgCdG8yM ZwjgCIJ4TvLoDfpjSihRgE0= =TM6X -----END PGP SIGNATURE-----No argument there. "version (Posix)" would work nice I think ? And I wouldn't cry if "Linux" and "Darwin" were added too, in addition to the current "linux" and "darwin" versions...I think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" do fit.
Dec 08 2004
On Wed, 08 Dec 2004 11:55:07 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Björklund schrieb am Dienstag, 7. Dezember 2004 21:00:Why not "Darwin"? To be consistent. ReganThe attached patch: 1) adds "Posix" for Linux platfroms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "darwin" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d)No argument there. "version (Posix)" would work nice I think ? And I wouldn't cry if "Linux" and "Darwin" were added too, in addition to the current "linux" and "darwin" versions...I think it's a little like : Windows / Win32 ? ("operating system" vs. "application interface)I see what you are saying. But I don't think "Unix" fits into this picture correctly. "FreeBSD", "Linux", "Darwin", "AIX" -> "Posix" do fit.
Dec 08 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Regan Heath schrieb am Thu, 09 Dec 2004 10:11:18 +1300:On Wed, 08 Dec 2004 11:55:07 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:That's a typo ... The actual patch uses "Darwin" *g* Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.13 (GNU/Linux) iD8DBQFBt3b93w+/yD4P9tIRAol9AKC8I29l0X2uNsA0MSASxJ0ppM+eDQCgg3mV 35RrLfkxHEWQwh7fdf0VVWI= =3t4N -----END PGP SIGNATURE-----The attached patch: 1) adds "Posix" for Linux platforms 2) replaces "Unix", "linux" and "darwin" with "Posix", "Linux" and "darwin" 3) enables "Unix", "linux" and "darwin" in the deprecated mode (dmd -d)Why not "Darwin"? To be consistent.
Dec 08 2004