Leandros / WindowsHModular

A modular Windows.h Header. Licensed under Public Domain & MIT.
https://arvid.io
The Unlicense
378 stars 36 forks source link

License problems #8

Open LynnKirby opened 5 years ago

LynnKirby commented 5 years ago

You're copying directly from the Windows SDK but the license only allows use of those headers and not modification or public distribution. Projects like mingw, Wine, and ReactOS avoid this problem by either doing a clean-room re-implementation or using the MSDN docs.

I was hoping to use this library this in a public-domain project I'm working on, but obviously the copyright violation prevents me. I'm going to continue with my original plan of writing a miniature public domain Windows.h for my own use. If you like, I will send patches that I know are not contaminated by the Microsoft license. With enough incremental changes the entire library would be fixed.

Leandros commented 5 years ago

I haven't been copying from the Windows SDK. All of this comes directly from either logging certain values or looking them up on MDN.

LynnKirby commented 5 years ago

Why does the readme say

This project contains parts of the Microsoft Windows SDK. They're licensed under Microsofts EULA.

and every file

Copyright (c) Microsoft Corporation. All rights reserved.

?

Leandros commented 5 years ago

Safety precautions.

r-lyeh commented 5 years ago

Errrmm.. is it false then? If so, I can see LynnKirby's point. What about a rewriting like,

// This project takes inspiration from Microsoft Windows SDK, which is licensed under Microsofts EULA.
// Microsoft Windows SDK is Copyright (c) Microsoft Corporation (All rights reserved).

which is true, and you keep your PD license over it.

Leandros commented 5 years ago

The license situation here is not exactly clear. How would I license something which I pulled out the source by printf(1)'ing it? Is it licensed under the terms of the header? Is it unlicensed? If I take it out of the docs, is it licensed under the new MIT license? What were the license terms before the Microsoft docs moved to Github? I took large parts from there.

LynnKirby commented 5 years ago

How would I license something which I pulled out the source by printf(1)'ing it? Is it licensed under the terms of the header?

Your actions would be bound by the Software License Terms. They permit use "to design, develop and test your programs that run on a Microsoft operating system". This can reasonably be interpreted as allowing use of the output of Windows libraries for interoperation. The terms also forbid reverse engineering but this kind of black-box testing is generally not considered reverse engineering.

Since we're probably talking about a #defined number, the value is either not copyright protected or falls under fair use. For the EU, see SAS Institute Inc v World Programming Ltd. In Germany specifically, UrhG § 69a and 69d. For the US, see Computer Associates International, Inc. v. Altai, Inc.

If I take it out of the docs, is it licensed under the new MIT license? What were the license terms before the Microsoft docs moved to Github?

Technically if you take it from the docs website right now you are still bound by the website Terms of Use. You could look up the historical one on archive.org but they've basically been the same for decades so the current one would be either identical or close enough for reference.

The MIT license would only apply when using the source from GitHub. The simplest and safest way of dealing with the MIT license situation would be to:

  1. Remove references to Windows SDK. Just have a Microsoft copyright statement without anything else.
  2. Remove the Unlicense because it is incompatible with the MIT license.

You could also argue the code you're using is not copyright protected or falls under fair use. This is what ReactOS, Wine, etc. do. This is also what you must do to continue using code under the website TOU.

Leandros commented 5 years ago

Awesome, to quickly recap your suggestion:

Is this correct?

r-lyeh commented 5 years ago

Cant believe somebody has to change his software license to something else just because printf'ing some values are "protected" by the license of a random binary. Did ReactOS, Wine and similar projects have to re-license to MIT ever? World is going nuts. In any case, MIT-0 is less crap than MIT, as it has no clauses (does not enforce you to put legals in visible parts of the documentation/software).

Leandros commented 5 years ago

These days you need to be a lawyer to use/write (open source) software. It's absolutely ridiculous.

waldnercharles commented 5 years ago

Has this issue been resolved? I'm curious what the actual license here is. And, if I'd like to contribute, what's the best way to do so without violating Microsoft's license?

So far I've just been referencing MSDN...

Leandros commented 5 years ago

I don't think it's been resolved 100% but it's currently licensed under the same terms as Microsofts header.

Jimmio92 commented 4 years ago

Just wanted to leave a wholehearted "fuck Microsoft's license". In the end, you're using it to make software for their platform, which is a potential financial gain for them. Potential financial gain outweighs someone making available a portion of their freely available header(s) in a different format, surely.

You're still using their API and are bound to the terms of that, no matter which way you access it. Hell, you could access it with pointer offsets only and it'd still be valid, so I really think the legality of this is a moot point as it'd never hold up in court, but I am not a lawyer, and the United States' legal system is a complex, stupid beast... so ymmv.

Thank you for making this project because you know Microsoft never will.