Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 89533 | Differences between
and this patch

Collapse All | Expand All

(-)src.orig/plugins/compilergcc/depslib/src/headers.c (-3 / +3 lines)
Lines 40-51 Link Here
40
	    printf("header scan %s\n", file);
40
	    printf("header scan %s\n", file);
41
41
42
	if (!hdrre)
42
	if (!hdrre)
43
		hdrre = regcomp("^[ 	]*#[ 	]*include[ 	]*([<\"])([^\">]*)([\">]).*$");
43
		hdrre = my_regcomp("^[ 	]*#[ 	]*include[ 	]*([<\"])([^\">]*)([\">]).*$");
44
	re = hdrre;
44
	re = hdrre;
45
45
46
	while (fgets(buf, sizeof(buf), f))
46
	while (fgets(buf, sizeof(buf), f))
47
	{
47
	{
48
		if (regexec(re, buf) && re->startp[3])
48
		if (my_regexec(re, buf) && re->startp[3])
49
		{
49
		{
50
			char buf2[MAXSYM];
50
			char buf2[MAXSYM];
51
51
Lines 147-153 Link Here
147
147
148
void donehdrs(void)
148
void donehdrs(void)
149
{
149
{
150
	redone(hdrre);
150
	my_redone(hdrre);
151
	hdrre = 0;
151
	hdrre = 0;
152
	hashdone(headerhash);
152
	hashdone(headerhash);
153
	headerhash = 0;
153
	headerhash = 0;
(-)src.orig/plugins/compilergcc/depslib/src/regexp.c (-11 / +11 lines)
Lines 156-162 Link Here
156
#define	UCHARAT(p)	((int)*(p)&CHARBITS)
156
#define	UCHARAT(p)	((int)*(p)&CHARBITS)
157
#endif
157
#endif
158
158
159
#define	FAIL(m)	{ regerror(m); return(NULL); }
159
#define	FAIL(m)	{ my_regerror(m); return(NULL); }
160
#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
160
#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
161
161
162
/*
162
/*
Lines 212-218 Link Here
212
 * of the structure of the compiled regexp.
212
 * of the structure of the compiled regexp.
213
 */
213
 */
214
regexp *
214
regexp *
215
regcomp( const char *exp )
215
my_regcomp( const char *exp )
216
{
216
{
217
	register regexp *r;
217
	register regexp *r;
218
	register char *scan;
218
	register char *scan;
Lines 791-797 Link Here
791
 - regexec - match a regexp against a string
791
 - regexec - match a regexp against a string
792
 */
792
 */
793
int
793
int
794
regexec(
794
my_regexec(
795
	register regexp *prog,
795
	register regexp *prog,
796
	register const char *string )
796
	register const char *string )
797
{
797
{
Lines 799-811 Link Here
799
799
800
	/* Be paranoid... */
800
	/* Be paranoid... */
801
	if (prog == NULL || string == NULL) {
801
	if (prog == NULL || string == NULL) {
802
		regerror("NULL parameter");
802
		my_regerror("NULL parameter");
803
		return(0);
803
		return(0);
804
	}
804
	}
805
805
806
	/* Check validity of program. */
806
	/* Check validity of program. */
807
	if (UCHARAT(prog->program) != MAGIC) {
807
	if (UCHARAT(prog->program) != MAGIC) {
808
		regerror("corrupted program");
808
		my_regerror("corrupted program");
809
		return(0);
809
		return(0);
810
	}
810
	}
811
811
Lines 1070-1076 Link Here
1070
			return(1);	/* Success! */
1070
			return(1);	/* Success! */
1071
			break;
1071
			break;
1072
		default:
1072
		default:
1073
			regerror("memory corruption");
1073
			my_regerror("memory corruption");
1074
			return(0);
1074
			return(0);
1075
			break;
1075
			break;
1076
		}
1076
		}
Lines 1082-1088 Link Here
1082
	 * We get here only if there's trouble -- normally "case END" is
1082
	 * We get here only if there's trouble -- normally "case END" is
1083
	 * the terminating point.
1083
	 * the terminating point.
1084
	 */
1084
	 */
1085
	regerror("corrupted pointers");
1085
	my_regerror("corrupted pointers");
1086
	return(0);
1086
	return(0);
1087
}
1087
}
1088
1088
Lines 1122-1128 Link Here
1122
		}
1122
		}
1123
		break;
1123
		break;
1124
	default:		/* Oh dear.  Called inappropriately. */
1124
	default:		/* Oh dear.  Called inappropriately. */
1125
		regerror("internal foulup");
1125
		my_regerror("internal foulup");
1126
		count = 0;	/* Best compromise. */
1126
		count = 0;	/* Best compromise. */
1127
		break;
1127
		break;
1128
	}
1128
	}
Lines 1277-1283 Link Here
1277
		p = "WORDZ";
1277
		p = "WORDZ";
1278
		break;
1278
		break;
1279
	default:
1279
	default:
1280
		regerror("corrupted opcode");
1280
		my_regerror("corrupted opcode");
1281
		break;
1281
		break;
1282
	}
1282
	}
1283
	if (p != NULL)
1283
	if (p != NULL)
Lines 1319-1332 Link Here
1319
#endif
1319
#endif
1320
1320
1321
void
1321
void
1322
regerror( const char *s )
1322
my_regerror( const char *s )
1323
{
1323
{
1324
	printf( "re error %s\n", s );
1324
	printf( "re error %s\n", s );
1325
}
1325
}
1326
1326
1327
/* TNB */
1327
/* TNB */
1328
void
1328
void
1329
redone(regexp *re)
1329
my_redone(regexp *re)
1330
{
1330
{
1331
	if (re)
1331
	if (re)
1332
		free((char *) re);
1332
		free((char *) re);
(-)src.orig/plugins/compilergcc/depslib/src/regexp.h (-4 / +4 lines)
Lines 18-27 Link Here
18
	char program[1];	/* Unwarranted chumminess with compiler. */
18
	char program[1];	/* Unwarranted chumminess with compiler. */
19
} regexp;
19
} regexp;
20
20
21
regexp *regcomp( const char *exp );
21
regexp *my_regcomp( const char *exp );
22
int regexec( regexp *prog, const char *string );
22
int my_regexec( regexp *prog, const char *string );
23
void regerror( const char *s );
23
void my_regerror( const char *s );
24
void redone( regexp *prog ); /* TNB */
24
void my_redone( regexp *prog ); /* TNB */
25
25
26
/*
26
/*
27
 * The first byte of the regexp internal "program" is actually this magic
27
 * The first byte of the regexp internal "program" is actually this magic

Return to bug 89533