DOS C Runtime Libraries provide, along with errno, a list of system
errors. They are, however, quite useless across compilers as this
document shows.

#include <stdlib.h>
#include <stdio.h>

main()
{
int i;

      for (i = 0; i < sys_nerr; i++)
      printf("%d %s\n",i,sys_errlist[i]);
}

Watcom 11.0:

0 No error
1 No such file or directory
2 Arg list too big
3 Exec format error
4 Bad file number
5 Not enough memory
6 Permission denied
7 File exists
8 Cross-device link
9 Invalid argument
10 File table overflow
11 Too many open files
12 No space left on device
13 Argument too large
14 Result too large
15 Resource deadlock would occur
16 System call interrupted
17 Child does not exist
18 Resource unavailable, try again
19 Device or resource busy
20 File too large
21 I/O error
22 Is a directory
23 Not a directory
24 Too many links
25 Block device required
26 Not a character device
27 No such device or address
28 Not owner
29 Broken pipe
30 Read-only file system
31 Illegal seek
32 No such process
33 Text file busy
34 Bad address
35 Filename too long
36 No such device
37 No locks available in system
38 Unknown system call
39 Directory not empty

Microsoft 8.00c:

0 Error 0
1 
2 No such file or directory
3 
4 
5 
6 
7 Arg list too long
8 Exec format error
9 Bad file number
10 
11 
12 Not enough memory
13 Permission denied
14 
15 
16 
17 File exists
18 Cross-device link
19 
20 
21 
22 Invalid argument
23 
24 Too many open files
25 
26 
27 
28 No space left on device
29 
30 
31 
32 
33 Math argument
34 Result too large
35 
36 Resource deadlock would occur

Borland 3.11:

0 Error 0
1 Invalid function number
2 No such file or directory
3 Path not found
4 Too many open files
5 Permission denied
6 Bad file number
7 Memory arena trashed
8 Not enough memory
9 Invalid memory block address
10 Invalid environment
11 Invalid format
12 Invalid access code
13 Invalid data
14 
15 No such device
16 Attempted to remove current directory
17 Not same device
18 No more files
19 Invalid argument
20 Arg list too big
21 Exec format error
22 Cross-device link
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 Math argument
34 Result too large
35 File already exists
36 Possible deadlock
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
