Errno.h a bit of Unix / Linux history

SCO and Tux symbol with Jedi sword

Errno.h is a header file (.h of header) from the standard C language library in which macros are defined to display errors. Those who know C will know about it and will know how useful it is to display the error codes produced by the system on the screen, along with a description associated with the error.

The errno variable tells us if any system calls failed (system call). For example:

#include <stdio.h&>
#include <fcntl.h&>
#include <stdlib.h>
#include <string.h>
#include <errno.h>  //Cabeceras de bibliotecas includes en el programa
const char *NOM_FICHERO= “/tmp/ejemplo.txt”;  //Supuesto fichero que no existe
int main (int argc, char **argv)
{
                int fd = 0;
                printf(“Abriendo %s…\n”, NOM_FICHERO);
                fd = open(NOM_FICHERO, O_RDONLY, 0644);
                if (fd&lt;0) {
                perror(“Error abriendo fichero”);   //Nos muestra los mensajes de error
                printf(“Error abriendo fichero: %s\n”, strerror(errno));
                }
return EXIT_SUCCESS;
}

The truth is that errno.h is just an excuse to introduce the following paragraphs that I write now. And it is that many will remember the wars of SCO vs. Linux, since the SCO company, due to the struggles of the Unix licenses, opened a crusade against IBM, Novell, etc., accusing them of having transferred Unix code to the Linux kernel.

SCO on December 19, 2003 published notices to certain companies claiming that the errno.h file was copied verbatim from Unix for use on Linux without proper authorization. the same Linus Torvalds He denied this and indicated that he himself rewrote the code for the Linux version of errno.h.

Whether it is true or not, SCO lost the lawsuits imposed in court one by one and ended up closing the open cases in favor of the pro-Linux companies. The companies involved were sinners, according to SCO, of having transferred parts of Unix code (specifically of the AT&T Unix System V) to Linux.

Curious as well as suspicious of these attacks, especially considering that Microsoft was the owner of 25% of SCO for a few years, since Microsoft gave its operating system Xenix (version of Unix licensed by Microsoft) to SCO and among the agreements was the purchase of shares. In fact, there are emails that were intercepted between the two companies alerting Microsoft to the great potential of Linux and the threat it represented.


The content of the article adheres to our principles of editorial ethics. To report an error click here.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.