Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rename.c:78:4: error: #error No getopt functions
- #error No getopt functions
- ^
- rename.c: In function ‘main’:
- rename.c:118:19: error: array type has incomplete element type
- struct option lopt[] = {
- ^
- rename.c:132:15: error: ‘strstr’ undeclared (first use in this function)
- StrStr = strstr;
- ^
- rename.c:132:15: note: each undeclared identifier is reported only once for each function it appears in
- rename.c:133:15: error: ‘strncmp’ undeclared (first use in this function)
- StrnCmp = strncmp;
- ^
- rename.c:135:5: warning: implicit declaration of function ‘getopt_long’ [-Wimplicit-function-declaration]
- while ((c = getopt_long(argc, argv, sopt, lopt, NULL)) != EOF) {
- ^
- rename.c:159:21: error: ‘optarg’ undeclared (first use in this function)
- if (setpattern(optarg))
- ^
- rename.c:164:6: warning: implicit declaration of function ‘geteuid’ [-Wimplicit-function-declaration]
- if (geteuid() != 0) {
- ^
- rename.c:197:7: error: ‘optind’ undeclared (first use in this function)
- if ((optind + 2) > argc) {
- ^
- rename.c:203:2: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
- } else if (strcmp(argv[optind], argv[optind+1]))
- ^
- rename.c:214:5: warning: implicit declaration of function ‘getcwd’ [-Wimplicit-function-declaration]
- if (getcwd(cwd, SVRBUF) == NULL) {
- ^
- rename.c:214:29: warning: comparison between pointer and integer [enabled by default]
- if (getcwd(cwd, SVRBUF) == NULL) {
- ^
- rename.c:233:3: warning: implicit declaration of function ‘chdir’ [-Wimplicit-function-declaration]
- chdir(cwd);
- ^
- rename.c:118:19: warning: unused variable ‘lopt’ [-Wunused-variable]
- struct option lopt[] = {
- ^
- rename.c: In function ‘change_name’:
- rename.c:292:5: warning: implicit declaration of function ‘strncpy’ [-Wimplicit-function-declaration]
- strncpy(new, oldname, SVRBUF);
- ^
- rename.c:292:5: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
- rename.c:323:2: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
- n -= strlen(p) - pnlen;
- ^
- rename.c:323:7: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- n -= strlen(p) - pnlen;
- ^
- rename.c:347:2: warning: implicit declaration of function ‘chown’ [-Wimplicit-function-declaration]
- if (chown(new, pwd->pw_uid, pwd->pw_gid) < 0)
- ^
- rename.c: In function ‘match_regexpr’:
- rename.c:373:2: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
- strncpy(tmp, str + pmatch->rm_eo, SVRBUF);
- ^
- rename.c:377:7: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- n -= strlen(str);
- ^
- rename.c:379:2: warning: implicit declaration of function ‘strncat’ [-Wimplicit-function-declaration]
- strncat(str, tmp, n);
- ^
- rename.c:379:2: warning: incompatible implicit declaration of built-in function ‘strncat’ [enabled by default]
- rename.c: In function ‘match_pattern’:
- rename.c:395:2: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
- strncpy(tmp, p + pnlen, SVRBUF);
- ^
- rename.c: In function ‘match_backward’:
- rename.c:422:10: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- rs = strlen(str) - pnlen;
- ^
- rename.c:431:6: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
- strncpy(str, subst, l);
- ^
- rename.c:443:6: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
- strncpy(tmp, p + pnlen, SVRBUF);
- ^
- rename.c: In function ‘setpattern’:
- gcc -Wall -O3 -DHAVE_CONFIG_H -DVERSION=\"1.3\" -D_FORTIFY_SOURCE=2 -c -o misc.o misc.c
- rename.c:471:10: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- pnlen = strlen(pattern);
- ^
- rename.c:500:16: error: ‘strncasecmp’ undeclared (first use in this function)
- StrnCmp = strncasecmp;
- ^
- In file included from /usr/include/stdlib.h:492:0,
- from rename.c:29:
- rename.c: In function ‘do_rename’:
- rename.c:543:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- new = alloca(strlen(oldp) + strlen(newp) + 5);
- ^
- rename.c:544:2: warning: implicit declaration of function ‘strcpy’ [-Wimplicit-function-declaration]
- strcpy(new, newp);
- ^
- rename.c:544:2: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
- rename.c:551:2: warning: implicit declaration of function ‘strcat’ [-Wimplicit-function-declaration]
- strcat(new, oldp);
- ^
- rename.c:551:2: warning: incompatible implicit declaration of built-in function ‘strcat’ [enabled by default]
- In file included from /usr/include/stdlib.h:492:0,
- from rename.c:29:
- rename.c:553:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
- new = alloca(strlen(newp) + 1);
- ^
- rename.c:554:2: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
- strcpy(new, newp);
- ^
- rename.c:569:6: warning: implicit declaration of function ‘read’ [-Wimplicit-function-declaration]
- read(0, buf, 64);
- ^
- make: *** [rename.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement