-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
A sequence of errors occurred during installation when calling the 'make' command. In general, most of them seem to be related to implicit declarations, examples:
- newmgrep.c:980:61: error: implicit declaration of function 'eval_tree' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
- recursiv.c:118:3: error: implicitly declaring library function 'strcpy' with type 'char *(char *, const char *)'
[-Werror,-Wimplicit-function-declaration] - bitap.c:106:11: error: implicit declaration of function 're' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return re(fd, M, D); /* SUN: need to find a even point */
To correct this for my machine, I modified the files to either remove or move the if blocks beginning with 'ifdef_WIN32', though there is likely a better solution that doesn't affect other non-Windows operating systems. To make it successfully build on my machine I changed the following:
- asearch.c - Comment out 'ifdef_WIN32' on line 26 and 'endif' on line 30
- asearch1.c - Comment out 'ifdef_WIN32' on line 23 and 'endif' on line 26
- agrep.c - Moved 'endif' up to like 225, effectively removing the declarations outside of the if block
- bitap.c - Moved 'endif' up to like 68, effectively removing the declarations outside of the if block
- main.c - Comment out 'ifdef_WIN32' on line 23 and 'endif' on line 25
- parse.c - Comment out 'ifdef_WIN32' on line 7 and 'endif' on line 10
- preproce.c - Comment out 'ifdef_WIN32' on line 45 and 'endif' on line 51
- recursiv.c - Moved 'int exec();' outside of if block and added 'include <stdlib.h>' near top of file
- sgrep.c - Comment out 'ifdef_WIN32' on line 126 and 'endif' on line 136
- newmgrep.c - Comment out 'ifdef_WIN32' on line 122 and 'endif' on line 127
- utilite.c - Moved 'include <string.h>' outside of if block and added 'include <stdlib.h>' near top of file
- agrephlp.c - Moved 'endif' up to like 13, effectively removing the declarations outside of the if block
I may have missed a change or 2 while writing this issue, but these same actions can be used to correct other similar errors.
Metadata
Metadata
Assignees
Labels
No labels