Slashdot Mirror


Winelib Hobbled by Exception-Handling Patent

davidwr writes "UKBuilder.com reports that Borland's structured exception handling (SEH) patent affects Winelib. Winelib allows you to compile Windows-targeted code to run natively on Linux. Because of the patent, gcc does not include support for SEH, which is widely used in the MS-Windows world. There are workarounds, but you won't like them."

67 of 409 comments (clear)

  1. Who Next? by geomon · · Score: 4, Interesting

    I'm sure that Wine was looking for a Microsoft-based patent attack, but this one probably caught many off guard.

    Who else may have submarine patents might affect the development of Wine?

    --
    "Rocky Rococo, at your cervix!"
    1. Re:Who Next? by Curtman · · Score: 4, Interesting

      Makes you wonder if Eben Moglen did anybody a favour in bringing people's attention to Wine's potential patent problems. With patents its best not to even look for them. This just gives Borland ideas I'm sure. They don't have any products to sell these days do they? Why not expand into the litigation market.

      Its great that there are lawyers willing to spend time on OSS projects, but they just dumped a whole pile of hurt on Wine if Borland pursues this.

    2. Re:Who Next? by wallykeyster · · Score: 5, Insightful
      Its great that there are lawyers willing to spend time on OSS projects, but they just dumped a whole pile of hurt on Wine if Borland pursues this.

      How do you figure? TFA simply says that gcc can't implement the features because Borland has a patent. This means that people wanting to use Winelib must remove the SEH portions of their code in order for it to compile. This is a story about a shortcoming of gcc and Winelib because so many Windows C++ developers use SEH instead of sticking to standard C++. I see no threat of lawsuit from Borland or any potential for it.

    3. Re:Who Next? by Red+Alastor · · Score: 4, Insightful

      Borland use winelibs in their Linux Delphi/C++ Builder version called Kylix so they don't have to rewrite all the Windows native code.

      By suing the Wine folks, they'd shoot themselves in the foot.

      --
      Slashdot anagrams to "Sad Sloth"
    4. Re:Who Next? by absinthminded64 · · Score: 3, Insightful

      It seems to me after I RTFA that the wine group actively identified this as being a problem and pursued corrective measures. The article also mentions that PostgreSQL replaced some of their functionality recently to avoid conflicting with an existing IBM patent even though IBM declares that it will not use it's patent war chest against any OSS projects. I think this sends a clear signal that the community is aggressively looking for this type of thing. I've no idea how Borland has been doing financially over the past few years but it definitely seems worthwhile to ensure that smaller companies dont have something like this to use against us. A small company claiming to own rights to significant portions of the linux kernel, or even patents covering something widely used within could really cause a black eye. I also think it's safe to say that SCO has inadvertently shown the other players how voiced, and loyal the OSS crowd is. This is sucky news but it is encouraging to know we're looking for this type of thing. With Microsoft patenting breathing and other bodily functions (Windows seems to be proficient at one or more bodily functions) independent developers have to be very discouraged.

  2. Donation please... by __aaclcg7560 · · Score: 4, Interesting

    This is where Borland needs to step in by giving the patent (or providing a legal exception) to the OSS community.

  3. Borland's still around? by CyberSnyder · · Score: 4, Funny

    Guess I've been doing too much Unix...

  4. Ugly workaround? by evil-osm · · Score: 5, Funny

    There are workarounds, but you won't like them.

    Use Windows? (ducks)

    --


    E.

    Never rub another man's rhubarb - The Joker
    1. Re:Ugly workaround? by Anonymous Coward · · Score: 2, Informative

      According to the article, either avoid structured exception handling altogether or use Microsoft's compiler to build the projects.

    2. Re:Ugly workaround? by Dan512 · · Score: 5, Funny

      While listening to the wineconf presentations I heard one guy talking about a scheme using goto statements.

    3. Re:Ugly workaround? by happyfrogcow · · Score: 2, Funny

      While listening to the wineconf presentations I heard one guy talking about a scheme using goto statements.

      Scheme with goto statements! That would be brilliantly evil!

  5. Is that ironic by MajorDick · · Score: 4, Informative

    Since Borland USED Winelib in Kylix.....

    Amazing how thing like this rear their head AFTER a company that holds the Patent actually used the app in their OWN product, can you say STINGY

  6. Stupid software patents by Cyphertube · · Score: 4, Insightful

    Again, I hate software patents. There's no point.

    Most of what you'd want to protect is covered by copyright. If it can't be covered by copyright, well, then it's something so basic (like "the dog is big") that it's almost impossible to express something without doing it that way.

    Again, this is where the idea of a software patent is stupid. Don't allow people to do things in ways that you really couldn't cover with copyright?

    Ok, now I find myself back to the argument that source code is speech, and hence not patentable.

    --
    Linux - because it doesn't leave that Steve Ballmer aftertaste.
  7. GCC list discussion by Bananenrepublik · · Score: 5, Informative

    Of course this was discussed on the gcc list, the thread starts here.

    Links to an implementation of this can be found in this mail, the legality of this implementation is discussed in the followup.

    The inevitable prior-art discussion begins here.

  8. Or better... by cduffy · · Score: 4, Insightful

    More likely is that Intel would arrange (ie. throw some money, tech, patent licenses, whatever) at Borland in return for such a thing. Borland doesn't have any motivation to make stack-based SEH available to free x86-targeting compilers [the patent's irrelevant on RISC], but Intel arguably does.

  9. no, it's legally interesting by cahiha · · Score: 4, Interesting

    Winelib is covered by the LGPL. If Borland has shipped Winelib in Kylix, they may already have given people a license to use the code. Perhaps they can wiggle out of that, but they can't continue to ship Winelib if they claim a patent on something in it.

    1. Re:no, it's legally interesting by rogueuk · · Score: 4, Insightful

      But I thought the SEH isn't a part of winelib because of this. It's not a question of the code already existing, it hasn't been written yet and can't be written due to this patent.

    2. Re:no, it's legally interesting by Anonymous Coward · · Score: 2, Informative

      Except that the "not implemented in gcc" implies this feature is not yet in winelib and won't be soon. So they wouldn't have distributed a version of winelib that contains an implementation of the patented algorithm(s).

    3. Re:no, it's legally interesting by rogueuk · · Score: 2, Insightful

      either way it was never included so the grandparent post about borland and kylix is moot

    4. Re:no, it's legally interesting by fm6 · · Score: 2, Informative
      That doesn't make any difference. The problem is not that you and I can't use SEH. The problem is that SEH isn't a feature of GCC, because like all GPL products, it can't include software obtained under a "non-free" patents. The GPL sez,
      We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
      So basically, Borland would have to give a free license for SEH to the GCC project, which would also apply to everybody who used GCC. If that doesn't happen, the only way GCC could offer SEH is to abandon the GPL. Not likely!
  10. Make a "Plugin?" by Erik_the_Awful · · Score: 2, Interesting

    I am not a developer, but how difficult is it to create a space in Wine for a SEC patent legal module to "plug in" to Wine? Winers could either use Wine without SEC or purchase a licenced module. Of course, some good hearted soul would release the source code, and then those who wanted to run the module illegally could do so as well. (Did I say that out loud?)

  11. This is good news for open source. by jimbro2k · · Score: 4, Insightful
    From TFA: ""Having your FOSS project depend on a non-free tool can be a big problem in terms of adoption."

    Even worse, this makes it clear that using patent-encumbered software has a genuinely unpleasant viral effect on all your software.

    The pro-patent folks will eventually realize that the best solution is to avoid ALL patent-encumbered software COMPLETELY -- and look even more skeptically at all proprietary software, too. This will have the opposite effect of what they had intended.

    --
    There is not nearly enough love in the world, but there is far too much trust.
    1. Re:This is good news for open source. by metlin · · Score: 2, Insightful

      Dream on.

      They'd rather spend and hope that they can litigate someone and make money off it, rather than come to some sort of oh-angelic-realization.

      They're in it for the money and for the greed, if they had any remnance of altruism or understanding, they'd have realized it a long time ago, with or without situations.

      If anything, it would go worse, not better.

  12. Re:Wait a minute... by Anonymous Coward · · Score: 3, Interesting

    gcc also doesn't support register allocation with interference graphs just because of a patent.

  13. Thanks! by jwthompson2 · · Score: 2, Funny

    There are workarounds, but you won't like them.
    Thanks Marvin!

    --
    Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree. -Martin Luther
  14. What patent? by Anonymous Coward · · Score: 5, Informative

    This is the patent in question.

    1. Re:What patent? by Anonymous Coward · · Score: 5, Interesting

      Since the patent postdates Windows NT 3.1, and even references the NT SEH implementation, it must be possible to implement NT-compatible SEH without infringing the patent.

    2. Re:What patent? by Anonymous Coward · · Score: 2, Interesting

      Or Microsoft licensed it?

    3. Re:What patent? by hmckee · · Score: 3, Informative
      I lifted the following text from http://www.mega-tokyo.com/osfaq2/index.php/Doing%2 0a%20kernel%20in%20C++
      Note that, on x86, VC++ and most other PC compilers use a stack-based unwinding and handling mechanism known as SEH, common to OS/2, Windows and Windows NT and described in detail in a famous MSJ article, http://www.microsoft.com/msj/0197/Exception/Except ion.aspx. GCC and most other UNIX compilers, instead, use the same table-based mechanism that is the rule on RISC architectures on x86 too. Also note that any use of stack-based SEH may or may not be covered by USPTO patent #5,628,016, held by Borland International, Inc. SEH on RISC architectures is table-based, thus unaffected by the patent)
      Further searching for info on table based implementation reveals http://blogs.msdn.com/oldnewthing/archive/2004/01/ 14/58579.aspx that this would break compatibility with Windows. In other words, if you want to use SEH, you're screwed without Borland's help.
  15. Solution: by Anonymous Coward · · Score: 2, Funny

    IIRC there is a version of DeCSS that works similarly:

    1. Take function.c, where function.c is the patented software.

    2. Add a /* */ style comment at the end of the file.

    3. gzip the file

    4. Write a program that evalautes the entire contents of the file as a single number, and check if that number is prime.

    5. If it's not, increment the crap inside the comment, repeat steps 3 and 4 and check again for prime. Eventually, you will find a prime.

    Now, you have a prime number, that if you run gzip on it, will product a file, function.c ,that can then be compiled.

    Since you can't copyright a number this works for DeCSS vs the DMCA.

    Patent law and copyright law are different so this may not apply, but still, wouldn't Fedora be allowed to distribute a prime number in their distribution? How could that be illegal? Then, it's up to the end user to actually unzip it and use it. It's the end user then that is violating the patent. Catch that!

    1. Re:Solution: by Theatetus · · Score: 2, Interesting

      It works for DeCSS because that algorithm's so ridiculously short. It would be hard to express a longer program as a number.

      --
      All's true that is mistrusted
    2. Re:Solution: by Gogogoch · · Score: 3, Funny

      Hey - why not do this with the MS Windows XP distribution ISO file?

      Lets see. XP is probably about 650Mb, so that's 5.6x10^12 bits. Let's round down for GZIP and call it 10^12 bits.

      So we just need a prime in the order of 2^(10^12). That can't be hard to do, can it? Just because the highest prime so far is in the order of 2^(10^7) just means that those mathematicians have been slacking it a bit! Lazy bums! And no doubt their software is lousy and totally inefficient. I'm sure Slashdotters could fix that.

      But why bother with those pesky prime numbers anyway? Why not just gzip it, stick it on a CD and explain that it does not contain a gzip file of someone else's IP, but is in fact a particularly interesting finite number of about 300 million hexadecimal digits. That it just happens to evaluate, via the mathematical GZIP operator, into another large hexadecimal number resembling someone else's IP is pure coincidence! I'd go for that. Seems reasonable to me.

      But why bother with GZIP? Just copy the original - we know it will fit on a CD - and the argument still holds! Brilliant! Ebay here I come!

      Does anyone have a list of email addresses I could use to see if anyone is interested in buying a very special, large, very large, hexadecimal number with unusually useful evaluation properties? :-)

  16. You won't like them. by Tenebrious1 · · Score: 2, Funny

    There are workarounds, but you won't like them.

    Wow, sounds like he's depressed, like he has a pain in all the diodes down his left side or something.

    --
    -- If god wanted me to have a sig, he'd have given me a sense of humor.
  17. Of course by einhverfr · · Score: 4, Interesting

    I am sure that Borland might appreciate the opportunity to strike back at Microsoft in a substantial way.

    --

    LedgerSMB: Open source Accounting/ERP
  18. Ask Nicely by Doc+Ruby · · Score: 4, Insightful

    Next, a wave of Slashdotters will hassle Borland to release the patent, or exempt Wine. The objective is worthy, the self-organized social wave of independent activists is meaningful. But the style will most likely be counterproductive.

    I recently advised a graphic designer/artist friend whose Flash app (advertising a minor celebrity pool player) drew the ire of an OSS "advocate". They demanded that the Flash movie be replaced with something that didn't require any "closed source" software to use it. My friend and I replied politely with their cost:benefit analysis (>95% of desktops can use Flash), the fact that Flash is an open standard (SWF), and the reality of making choices that can't please everyone, so the best alternative is chosen. The "advocate" devolved into namecalling and refusal to accept any of the designer/artist's reasons as valid. Which not only lost that private argument on facts, but alienated any possiblity of the designer/artist exploring OSS possibilities, as long as reliable old Flash still works.

    If you're going to request that Borland release its constraints on Winelib, remember that you catch more flies with sugar than with vinegar. And that invitations to a company to join the OSS "community" makes you an ambassador from your community. Which demands high performance in charm and persuasion, rather than represent the community as a barbarian horde.

    --

    --
    make install -not war

    1. Re:Ask Nicely by RealAlaskan · · Score: 4, Insightful
      First, I agree with your ``ask nicely'' message. As another post pointed out, Intel and especially AMD would benefit by having better free compilers (they are complementary goods to their CPUs), so maybe we should be asking them to buy and contribute this patent. Nicely, of course.

      Second:

      I recently advised a graphic designer/artist friend whose Flash app (advertising a minor celebrity pool player) ...

      Don't ever let him get rid of that Flash. I've found that when I see a webpage that invites me to download Flash, I can just close that tab: there's nothing there for me to see. That's saved me a great deal of time and bandwidth which I might have wasted if those sites had used animated gifs instead.

    2. Re:Ask Nicely by RealAlaskan · · Score: 2, Insightful
      I wonder if you misunderstood me. My comment wasn't intended as criticism of your friend or his choices for his web site, and I certainly don't want him to change his ways. I doubt that he and I have any interests in common, and if google misdirects me there some day, his Flash will tell me: ``Move along, there's nothing here for you.''

      Every invention has at least two effects: the intended one and the other(s). For Flash, the intended effect is letting visually-oriented people do their thing. The unintended effect is shielding the rest of us from their thing, either by not installing Flash (my choice) or blocking it.

      It's for you to say whether your life is incomplete without the minor celebrity pool player ad.

      I've found that my life is substantially more complete without things which are best presented via Flash. Your friend is doing a great job by putting his ads in Flash, not least because I'll never see them. Tell him he needn't change on my account.

      I'm a Linux/Libre software zealot who's 100% in favor of Flash. By not having it installed, I miss out on all the things on which I want to miss out.

  19. There's an uber-workaround by Anonymous Coward · · Score: 5, Interesting
    The uber-workaround for software patents is to have the code copyrighted and "owned" in Europe. Europe (as of now) has no software patents. The code can be developed anywhere, but the copyright must be transfered to some European entity and it must be distributed from Europe.

    Remember, patents don't mean you can't code it. You can code it. You can use it for personal non-commercial use. You can distribute the code. But you can't use it commercially, distribute binaries, or sell it.

    So the coders can continue doing their merry work, producing code that would violate patents were it compiled and distributed, and the distributors can continue merrily distributing the code in Europe.

    The only people who are left out of this are Americans who would have to buy licenses from Borland to use the code in the US. That's fine; Americans should either pay according to their laws or change their laws.

    But we shouldn't let American laws affect the rest of the world where they don't apply.

    We need to start doing this for all open source software. There is no way to avoid trampling on patents if you're writing any fairly large or complex piece of software these days, especially any software that involves codecs, pre-existing APIs, and pre-existing file formats. Well, just about any useful piece of large software involves such things. Rather than getting into a hissy-fit on Slashdot every time some patent issue is discovered, open source developers should just plan for the problem and plan to bypass it.

    The patent situation is not like the copyright situation. Copyright laws are roughly similar everywhere in the world and they are enforcable everywhere in the world. There are wide divergences in patent law around the world and most of the world is not burdened by America's folly in this regard. Why should developers bear the burden of one country's legal folly? Answer: developers shouldn't, and should simply pick the right jurisdiction for hosting the project.

    This isn't some radical idea here. MPlayer, for example, could not possibly exist as a US-based project. US coders can and do contribute to it, but it's based in Hungary, where it's safe.

    1. Re:There's an uber-workaround by RealAlaskan · · Score: 4, Insightful
      The uber-workaround for software patents is to have the code copyrighted and "owned" in Europe. Europe (as of now) has no software patents.

      ``As of now.'' Something about your proposal is worrying me, but as of now I can't put my finger on it.

      Yes, it's a good, sensible plan for today, but there's this terrible little flaw which keeps it from being a long term solution.

    2. Re:There's an uber-workaround by perrin · · Score: 4, Informative

      > Europe (as of now) has no software patents.

      Wrong. The European Patent Office (EPO) has issued thousands of software patents. There are just doubts as to their enforcability, and several member countries do not accept them at all. This is what the new EU directive (CIID) is all about.

  20. C++ Standard? by wallykeyster · · Score: 3, Insightful

    Since this is a patented technology used in other compilers, I assume Borland licenses it but it can't be part of the C++ standard. This just seems to me like another great example of problems introduced when programmers rely on things that are not part of the standard. Whether it is Microsoft's custom portions of Java (which meant Java apps suddenly were no longer compatible with Sun's JVM) or vendor extensions to error handling, if you use a tool that does not meet defined standards, then you develop software that is much less useful (it may implement something cool but it has a more limited audience and an almost guaranteed shortened lifespan).

    1. Re:C++ Standard? by Anonymous Coward · · Score: 3, Informative

      The Structured Exception Handling in question is purely for C, and is unrelated to exceptions in C++ or Java or any other language's implementation of them. It's hardly even the only C-based implementation around, so there's no shortage of source-compatible solutions. It is the one Windows uses, however, so binary compatibility would seem to demand it. However, I don't know if SEH even works across a DLL boundary -- usually its usage is even confined to a single compilation unit.

  21. Why now? by sugarmotor · · Score: 2, Informative

    The patent is at

    http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PT O1&Sect2=HITOFF&d=PALL&p=1&u=/netahtml/srchnum.htm &r=1&f=G&l=50&s1=5,628,016.WKU.&OS=PN/5,628,016&RS =PN/5,628,016

    The Patent Number is 5,628,016

    There are two dates:

    May 6, 1997

    and

    Filed: June 15, 1994

    I assume the 1997 date is the "granted" date. Why is this problem surfacing now, almost ten years later??

    Stephan

    --
    http://stephan.sugarmotor.org
  22. Re:wine by DrJonesAC2 · · Score: 2, Funny

    Because Even Emulators Rock

  23. OS/2, Prior Art by NullProg · · Score: 3, Interesting

    From Microsoft,

    In digging through obscure .H and .INC files to piece together what constitutes Win32 SEH, one of the best sources of information turned out to be the IBM OS/2 header files (particularly BSEXCPT.H). This shouldn't be too surprising if you've been in this business for a while. The SEH mechanisms described here were defined back when Microsoft was still working on OS/2. For this reason, you'll find SEH under Win32 and OS/2 to be remarkably similar.

    Article here:
    A Crash Course on the Depths of Win32(TM) Structured Exception Handling;

    Enjoy,

    --
    It's just the normal noises in here.
  24. Seems like much ado, about nothing, to me. by unicorn · · Score: 2, Insightful

    So all that's broken here, is the ability to complile code, that was written for Windows, into *nix binaries. That's all.

    Is there really that much Windows code, getting ported to *nix? Seems like virtually all FOSS development flows the other way.

    Large commercial companies that develop for Windows first, will have the resources to fix the code to compile the other direction.

    And is WINE/WINELIB really a good solution? By taking something written for a particular platform, and just recompiling it straight over to a new platform aren't you going to end up with horribly unoptimized code no matter what? Rewriting the code to use non Windows specific calls will buy you a LOT of speed, and whatnot, I would think.

    --
    "Politicians are interested in people. Not that this is always a virtue. Fleas are interested in dogs." P.J. O'Rourke
  25. Let's Quit Whining and Fix this by TFGeditor · · Score: 2, Funny

    I know most of us here assembled are sick of all this software licensing crap. Slashdotter jokes notwithstanding, we are some of the most intelligent people on the planet. What say we combine that intellect and come up with a way to combat all this software patent madness?

    First suggestion: Elect a steering committee to form an organization/lobbying group.

    What do you think?

    --
    Ignorance is curable, stupid is forever.
    1. Re:Let's Quit Whining and Fix this by kclittle · · Score: 2, Insightful
      I think... show me the MONEY. There is money -- *lots* of it -- in patents, be they atom-centric or bit-centric. That's their intent; reward the inventor for inventing.

      So, if you plan on 'combating' sw patents, you're going to need ... MONEY. Righteous indignation ain't gonna cut it.

      --
      Generally, bash is superior to python in those environments where python is not installed.
  26. Re:what does the pattent cover? by merlin_jim · · Score: 2, Interesting

    AFAIK, SEH is a method for doing structured exception handling in any language.

    C++, Java, whatever... they all have exceptions. How does the compiler actually HANDLE the exception? SEH is a patent for how to put that exception information on the stack in an x86 environment.

    It's pretty specific and pretty proprietary; If you ask me this is an example of a good software patent for once. I'm sure SEH took a lot of work for the folks at Borland (and Microsoft?) to get working right. This isn't like Amazon's Oneclick patent; SEH is difficult and non-obvious.

    --
    I am disrespectful to dirt! Can you see that I am serious?!
  27. Huh? by Grendel+Drago · · Score: 4, Funny

    Man, I wish I knew what that meant. It sounds pretty frickin' sweet.

    --grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
  28. VMS was doing this in the 80's by valderost · · Score: 4, Informative

    Hopefully somebody investigates OpenVMS as potential prior art here. The OpenVMS Condition Handling Facility provides substantially the same exception-handling functionality as SEH and has had much of it since the 80's. http://h71000.www7.hp.com/doc/72final/5841/5841pro _038.html#chf_vaxalpha

  29. Except even MPlayer isn't safe by rklrkl · · Score: 3, Informative
    "US coders can and do contribute to it [MPlayer], but it's based in Hungary, where it's safe."

    Funny, but its current home page doesn't exactly give me warm and fuzzy "safe" feelings. Methinks you chose a bad example there :-)

  30. Isn't that the point? by hanshotfirst · · Score: 4, Interesting
    The point of patents (and copyrights) is to guarantee financial gain for the inventor of a product for a certain period of time before the design or material is released to the public domain.

    Now, discussions whether that should apply to physical inventions only or software is a topic I'm not getting into here.

    I'm not going to touch how long those patents or copyrights should be - that war rages in enough other threads.

    The financial gain for the inventor/creator is part of the motivation for inventing/creating. As much as I dislike MS, they are entitled to the rights afforded by their patents. Like it or not software is patentable around here, so we are stuck with the consequences.

    -2, unpopular concept

    --
    Why, oh why, didn't I take the Blue Pill?
    1. Re:Isn't that the point? by zerblat · · Score: 2, Insightful
      Perhaps that's the point of patents in today's perverted world. However, the original idea was that patents would encourage and stimulate invention and sharing of ideas. Instead of everyone trying to hide their methods from their competitors, the patent system gives inventors exclusive rights to their inventions in exchange for sharing information about the invention.

      However, the patent system doesn't guarentee financial gain for anyone (except for patent lawyers, that is). In some areas (e.g. medical research) the patent system works great and is necessary for a lot of the research to be commercially feasible. In other areas (CS) it rarely does any good, but instead causes lots of problems and actually inhibits innovation.

      --
      Please alter my pants as fashion dictates.
  31. An Alternative? by eskwayrd · · Score: 2, Interesting

    How about someone from GCC and/or Wine contact Borland and ask how much a license would cost to include SEH in these products? Or, ask them how much they'd be willing to part with the patent for?

    If it's feasible, organize a fundraising effort from the OSS community, buy the license/patent from Borland, and immediately release the code under the appropriate xGPL. Many OSS contributors are corporations with a fair bit of money, so I see this as being at least worth discussing.

    If nothing else, this is a straightforward way to 'play fair', rather than all the wrangling about submarine patents and how the patent system is so obviously broken. I personally agree with these sentiments, but we've never going to get anywhere yelling about a currently unsolvable problem. Rather than bash Borland in this instance, why not give them a chance to demonstrate how reasonable they could be?

    --
    eskwayrd = m^2c^4
  32. Only for porting windows apps to linux .... by scharkalvin · · Score: 4, Interesting

    Since this problem only affects porting existing windows code to Linux, it could be solved by
    using the MS tools and linking the app with winlib.
    Before you flame this, consider who would be doing this....someone who has a closed source application already working on Windows and wants to sell his application to the Linux market. IIRC, winlib is licensed under the LGPL, so this approach would be legal. (and this is EXACTLY how Coral ported Wordperfect 2000 from windows to Linux).

  33. FUD? by MarkusQ · · Score: 4, Informative

    until 4.0, gcc's backend was entirely and deliberately undocumented
    My first thought was, gee, that's not been my experience--as I recall, although it was complicated, it was rather well documented. So I did a bit of Google and found that other people seemed to agree with me (i.e., they say things like "Furthermore, compared to the other compiler projects, GCC offered the most comprehensive documentation for backend porters." and so forth).

    The only thing I could find that even sort of suport your claim was RMS's thing about not wanting the backend to drift into becoming an LGPL black-box (thus chilling the development of new GPL'd front ends).

    So, do you care to back your claim up?

    --MarkusQ

  34. Re:Stupid software patents-quoth the lawyer. by dgatwood · · Score: 2, Insightful
    Maybe the "I hate patents" and the "I hate copyright" people can get together and hammer out an agreement, because as it stands, you both are talking against each other.

    Both groups make the same points for the same reason: the terms on patents and copyrights are ridiculously long---far too long to avoid interfering with the continued evolution of technology. Patents in the field of computing should be at MOST three years, not twenty.

    Twenty years makes sense for some physical inventions because it may take several years to go from a working design to mass manufacturing. For software, five years later, a product is not only old news, more than 90% of the time, it has been completely superceded by other products on the market and is no longer even being manufactured. Having the same patent term for computer software as for physical inventions is patently ridiculous (no pun intended).

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  35. Re:Wait a minute... by Dan+Berlin · · Score: 3, Informative

    This is completely untrue and misinformed. The original patent on graph coloring has expired (or will expire soon), and IBM granted the right to use it in any GPL'd software anyway. Rice University also granted the use of the patent on Preston Brigg's improvements to GPL'd software. So GCC could, and in fact has, implemented graph coloring register allocation (see the new-regalloc branch), over 2 years ago.

  36. Past tense by Micah · · Score: 2, Interesting

    That should be in the past tense. Kylix is toast. Has been for a year or two. Borland screwed the pooch royally with it.

    Reason #372 to never trust anything important to a proprietary platform.

  37. Software Patents by psychofox · · Score: 2, Interesting
    Man, I HATE software patents, with a passion.

    I used to work for a large bank, the largest investment bank in the world in fact. A couple of years ago they sent an internal memo around proclaiming that they had just lodged their first patent and were well proud of it. They said something like "we have another several hundred in the pipeline". I wrote an semi-anonymous email back to the global head of the division of IT where I work, basically saying that that he'd better be ready to reap the whirlwind once all the banks started realising that they could patent ridiculously simple concepts (like using a PDA with realtime updates to enhance the productivity of specialists on the floor of the exchange, which was we had apparently 'invented').

    I never heard another thing about software patents and a few months go I left.

  38. Non sequitur by alexo · · Score: 3, Informative


    > This is a story about a shortcoming of gcc and Winelib because so many
    > Windows C++ developers use SEH instead of sticking to standard C++.


    There are a lot of things that standard C++ does not cover:
    UI, Device I/O, Threading, Synchronization, Async I/O, Interprocess Communications, Virtual Memory management, Registry access, Networking, etc.
    For that, you must use the underlying OS features (either directly or via a library that abstracts it).

    SEH is one such element. It allows you to catch "system" exceptions such as access violations. It is an OS feature that standard C++ does not address.

    Quoting form the MSDN:
    [The] difference is that the structured exception handling model is referred to as "asynchronous" in that exceptions occur secondary to the normal flow of control. The C++ exception handling mechanism is fully "synchronous," which means that exceptions occur only when they are thrown.

    1. Re:Non sequitur by Pseudonym · · Score: 3, Insightful

      Don't knock the idea of registries just because Microsoft can't implement them properly.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  39. Enough alrady. by nrlightfoot · · Score: 2, Funny

    Let's just start our own country and be done with all these stupid laws.

    --
    what sig?
  40. Good point, Borland is Wine friendly, so... by Weaselmancer · · Score: 4, Insightful

    ...here's an idea that maybe nobody has tried yet.

    Ask them.

    Rather than do the collective F/OSS thing and lose our minds about a software patent that's in the way...how about asking Borland if we may write something their patent covers?

    Has it at least been tried yet?

    Yes, software patents are evil. And yes, exception handling has tons of prior art. And still yes, this is freaking obvious. But still. It's only a problem if they complain, and they're less likely to do so if we just simply do the good manners thing and ask first.

    --
    Weaselmancer
    rediculous.
  41. Re:A different interpretation of SEH? by rikennedy · · Score: 2, Interesting

    It's neither the SEH syntax nor how the compiler works with the SEH syntax that's patented. In fact, the patent has nothing whatsoever to do with syntax.

    The C++ language specification describes something that it calls "exceptions." It describes what is supposed to happen when you say throw X, and it says what happens when you say catch (Y). What the specification does not say is how a compiler implementer is supposed to make a program do what the specification says the program should do. The specification doesn't say, for instance, that i = 2 must be translated into the (Intel) machine code mov eax, 2, and it doesn't say what machine code the compiler should generate for throw X. Those choices are left to the compiler implementers, such as Microsoft, Borland, and the authors of GCC.

    The patent describes how Borland managed to implement part of the C++ language by using Windows Structured Exception Handling.

    (I think I should point out that there may be other kinds of exception-handling that are also structured, but the term "SEH" in this context refers to the particular way that exceptions work in Windows (and OS/2). An earlier comment refered to Matt Pietrek's 1997 Microsoft Systems Journal article, A Crash Course on the Depths of Win32(TM) Structured Exception Handling. Readers of that article will notice that there's really very little in it about C++. Instead, it describes how Microsoft's __try, __finally, and __except work, not the C++ try and catch. That's because Windows SEH and C++ exceptions are completely separate concepts. You can have each without the other. It's just unfortunate that they both use the term "exception," so many people think it's all the same thing. The Microsoft extensions allow the programmer to hook into the OS's SEH facilities.)

    The patent does not cover SEH itself. For anyone reading the patent, you need to realize that nearly half the text of the patent is dedicated solely to background information. It gives an overview of what exceptions are; it briefly describes another way of implementing C++ exceptions by using special return codes that compiler-generated code interprets after every function returns; it goes to great length describing how SEH works in OS/2 and Windows.

    Eventually, the patent document gets to the meat of the patent, describing exactly how Borland devised a way to use the native OS exception facilities to implement C++'s notion of exceptions. It's certainly not the only way to implement the feature, but it seems like a pretty good way, so I can see why someone would want to patent it.

    (We now enter the part of my post that I'm unsure about; I welcome clarifications anyone cares to give.)

    Now, how does this all apply to GCC and Winelib? I'm not really sure; I've never used Wine or Winelib. Winelib is for taking source code written to target Windows and instead compiling it for Linux without having to change all the code, right? The way I see it, unless that source code was taking advantage of SEH directly, there should be nothing to change. Direct use of SEH is just foolish; it's very complicated, and you're liable to get it wrong. Instead, the code should be using language features like throw and catch, which GCC is free to implement however it wants, or the code should be using API functions like RaiseException, which Winelib is free implement however it wants (but which should probably be compatible with how GCC implements exceptions).

    And Wine itself is to make already-compiled Windows programs run on Linux, right? So its job is different from Winelib's. Wine needs to not only implement API functions, but also mimic various OS behavior that the programs will be expecting. Specifically, it needs to mimic Windows SEH so that the programs can raise and handle exceptions properly. I figure

    --
    Rob
  42. Re:Enough already. by plaxion · · Score: 2, Funny

    Great idea, but er... what would be our new country's native language? C? Perl?

    *ducks*