-#ifdef BUILTIN_EXCLUDE_SUPPORT
- if ((argc > 1) && strcmp(*argv,"-X") == 0) {
- char *result = NULL;
- char *cp = NULL;
- argv++;
-
- if (!use_gtar_excl) {
- error("exclusion specification not supported");
- return 1;
- }
-
- result = stralloc(*argv);
- if (*result && (cp = strrchr(result,';')))
- /* delete trailing ; */
- *cp = 0;
- if (strncmp(result, exclude_string, sizeof(exclude_string)-1) == 0)
- add_exclude(result+sizeof(exclude_string)-1);
- else if (strncmp(result, exclude_list_string,
- sizeof(exclude_list_string)-1) == 0) {
- if (access(result + sizeof(exclude_list_string)-1, R_OK) != 0) {
- fprintf(stderr,"Cannot open exclude file %s\n",cp+1);
- use_gtar_excl = 0;
- } else {
- add_exclude_file(result + sizeof(exclude_list_string)-1);
- }
- } else {
- amfree(result);
- goto usage;
- }
- amfree(result);
- argc -= 2;
- argv++;
- } else
- use_gtar_excl = 0;
-#endif