1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-24 11:55:43 +00:00

In BSD getopt we need to set variable "optreset" to 1 if we are going to call

getopt() for the second time.


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@162 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Roman Bogorodskiy 2005-08-24 12:05:47 +00:00
parent 84f29d62fc
commit e618a49cf4

View File

@ -4298,8 +4298,12 @@ int main(int argc, char **argv)
/* handle other command line arguments */ /* handle other command line arguments */
#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)
optind = optreset = 1;
#else
optind = 0; optind = 0;
#endif
while (1) { while (1) {
int c = getopt(argc, int c = getopt(argc,
argv, argv,