Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 174401 Details for
Bug 258021
compat-gcc-32 dependency on GLIBC_2.3.4
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
simple C++ program that demonstrated g++32 dependency on GLIBC_2.3.4
regexec2.cxx (text/plain), 1.95 KB, created by
Sev Binello
on 2007-08-27 21:07:58 UTC
(
hide
)
Description:
simple C++ program that demonstrated g++32 dependency on GLIBC_2.3.4
Filename:
MIME Type:
Creator:
Sev Binello
Created:
2007-08-27 21:07:58 UTC
Size:
1.95 KB
patch
obsolete
>/* > * qegrep.c > * > * compares its standard input against the regular > * expression given (on command line), and prints > * out those lines matching that RE. > * > * > * Created by Mij <mij@bitchx.it> on Mon Dec 29 2003. > * Original source file available on http://mij.oltrelinux.com/devel/unixprg/ > */ > > /* max error message length */ >#define MAX_ERR_LENGTH 80 > /* max length of a line of text from stdin */ >#define MAX_TXT_LENGTH 600 > >#include <stdio.h> > /* for --ansi (see off_t in regex.h) */ >#include <sys/types.h> > /* for index(): */ >#include <string.h> >#include <regex.h> > > >int main(int argc, char *argv[]) { > /* will contain the regular expression */ > regex_t myre; > int err; > char err_msg[MAX_ERR_LENGTH]; > char text[MAX_TXT_LENGTH]; > > /* safe check on cmd line args */ > if ( argc < 2 || argc > 2 ) { > printf("Usage:\n\tqegrep 'RE' < file\n\tOR\n\techo \"string\" | qegrep 'RE'\n"); > return 1; > } > > /* compiles the RE. If this step fails, reveals what's wrong with the RE */ > if ( (err = regcomp(&myre, argv[1], REG_EXTENDED)) != 0 ) { > regerror(err, &myre, err_msg, MAX_ERR_LENGTH); > printf("Error analyzing regular expression '%s': %s.\n", argv[1], err_msg); > return 1; > } > > /* "executes" the RE against the text taken from stdin */ > while ( fgets(text, MAX_TXT_LENGTH, stdin) != NULL ) { > /* we rely on the fact that text contains newline chars */ > *(index(text, '\n')) = '\0'; > //NOTE - replacing if (regexec .....) with if (1) will eliminate dependency on GLIBC_2.3.4 > //when using g++32 > > // if (1) > if ( (regexec(&myre, text, 0, NULL, 0)) == 0 ) puts(text); > else if ( err != REG_NOMATCH ) { > /* this is when errors have been encountered */ > regerror(err, &myre, err_msg, MAX_ERR_LENGTH); > return 2; > } > } > > /* meaningless here. Useful in many other situations. */ > regfree(&myre); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 258021
: 174401