davidgiven / ack

The Amsterdam Compiler Kit
http://tack.sf.net
Other
416 stars 59 forks source link

ACK libc defines getopt () and friends, but <unistd.h> does not declare them #277

Open tkchia opened 1 year ago

tkchia commented 1 year ago

While trying to build a program of mine with ACK, I got the following errors:

"lfanew.c", line 114: (warning) implicit declaration of function getopt
"lfanew.c", line 122: optarg undefined
"lfanew.c", line 128: optind undefined

Oddly enough, it seems that ACK's libc does define getopt () and its companion variables. The errors are only happening because ACK's <unistd.h> lacks the needed declarations.

Thank you!