Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101877080
D10420.id27519.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
807 B
Referenced Files
None
Subscribers
None
D10420.id27519.diff
View Options
Index: usr.bin/grep/grep.c
===================================================================
--- usr.bin/grep/grep.c
+++ usr.bin/grep/grep.c
@@ -57,6 +57,15 @@
nl_catd catalog;
#endif
+#ifndef REG_NOSPEC
+/*
+ * Avoid side effects effect on other regex(3) implementations, since we have
+ * no idea what REG_NOSPEC's value (0020) will actually do in these other
+ * regcomp(3).
+ */
+#define REG_NOSPEC 0
+#endif
+
/*
* Default messags to use when NLS is disabled or no catalogue
* is found.
@@ -704,8 +713,8 @@
case GREP_BASIC:
break;
case GREP_FIXED:
- /* XXX: header mess, REG_LITERAL not defined in gnu/regex.h */
- cflags |= 0020;
+ /* No effect with glibc/libgnuregex regex(3) implementation */
+ cflags |= REG_NOSPEC;
break;
case GREP_EXTENDED:
cflags |= REG_EXTENDED;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 1:55 AM (9 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14475963
Default Alt Text
D10420.id27519.diff (807 B)
Attached To
Mode
D10420: bsdgrep trivial improvement: define REG_NOSPEC to be a no-op if not defined, use REG_NOSPEC instead of magic number
Attached
Detach File
Event Timeline
Log In to Comment