delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq159.html   search  

| Previous | Next | Up | Top |

19.1 Legal (un)restrictions on DJGPP applications

Q: Can you explain in plain English the legal restrictions of distributing programs compiled with DJGPP?

Q: Can I write commercial programs with DJGPP?


A: In most cases, you don't have to worry about any legal restrictions when you compile your programs with DJGPP. You only need to include information on how to get DJGPP in the documentation of your products.

Using the GNU C/C++ compiler doesn't make your programs subject to any restrictions. The C library which comes with DJGPP is free (unless you change the library sources, see below), which means you are free to use the stock libc.a in any way you like (but please try to comply with basic rules of courtesy.)

Some functions from the DJGPP C library are under the BSD copyright (their sources were taken from the Berkeley Software Distribution of Unix). One of these functions is malloc, which is by default linked into every DJGPP program (the startup code calls it), the others are time-related functions such as time, ctime, and asctime, and also qsort and random. The BSD copyright requires that your binary distribution displays the following acknowledgment somewhere in the docs, and in all ads that mention the features and/or use of your software:

      This product includes software developed by the University of
      California, Berkeley and its contributors.

So, if you write C programs and link them with the stock version of the DJGPP library, you only need to tell your recipients how to get the latest versions of DJGPP, mention the BSD blurb in your docs, and have absolutely nothing else to worry about.

The basic C++ iostream class library (libiostr.a) and the Standard Template Library (libstdcxx.a) which come with DJGPP allow you to use them binary-wise (i.e., without changing library sources) in your C++ programs without restrictions, unless you compile your programs with a compiler other than Gcc (which won't happen if you work with DJGPP). So C++ programs linked with -lstdcxx and/or -liostream switches are also free from any restrictions.

Only the library of additional GNU C++ classes (libgpp.a) requires that you provide your customers with source or object code of the application, so they could relink the application with future or modified versions of the C++ library. However, this library is deprecated and chances are most C++ programs won't use it. (If you intend to distribute commercial programs linked with the libgpp.a library, you are strongly advised to read the GNU Library General Public License which comes with the library, for rigorous definition of its terms.)

Two GNU packages, Flex and Bison, are also special in that using them to produce your programs doesn't place your programs under GPL or LGPL. In other words, lexers produced by Flex and parsers produced by Bison do not imply GPL/LGPL.

If you do use in your program any of the FSF sources that fall under GPL/LGPL (like some of the GCC's sources, or the GNU getopt or regex packages which come with many GNU programs), then you must comply with the terms of GNU licenses when distributing your programs; in this case your entire application becomes GPL. If that is unacceptable to you, consider using the versions of regex and getopt from the DJGPP C library (which are not as powerful, but are free from any restrictions).

You may ship any of the utilities developed specifically for DJGPP (e.g., the floating-point emulator emu387.dxe or the DPMI host cwsdpmi.exe) and the C library, as distributed by DJ Delorie, with your program with no other requirement besides telling your customers how to get DJGPP for themselves.

If you do change the sources of either the C library or the utilities distributed with the djdev package, they, and the programs developed with them, immediately fall under the GPL, the GNU License. In practice this means that you cannot distribute any binaries made with such a patched version of libc.a without offering the recipient full sources, including your own sources. However, if you find bugs in the library or the utilities and submit your patches to DJ Delorie, DJ allows to freely use and redistribute patched utilities and binaries made with the patched version of libc.a (even if no official DJGPP version was released with your patches yet).

For the precise legal terms of DJGPP distribution, see the file copying.dj via the Web (latest versions of the djdevNNN.zip package might also include it).

Note that the above says nothing about the legal aspects of contributed packages, like GRX and others; you will need to read their docs to find out.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)