top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

passing glob an argument in GCC

0 votes
18 views

Hi, I'm uncertain what an argument to glob should be.

int glob (const char *pattern, int flags, int (*errfunc) (const char
*filename, int error-code), glob_t *vector-ptr)

It takes a pointer to a function called errfunc. Now I've read the docs but
they give no mention of a function called errfunc, so I think I have to
write it myself. What should it look like? What should it do?

posted May 14, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote
 
Best answer

glob() is not part of GCC and assuming your question is not about GCC.

The glob(3) man page explains it clearly. errfunc is not a function that exists already, it's the name of one of the parameters in the glob prototype, you have to pass an argument (or NULL) matching the signature:
int (*errfunc) (const char *epath, int eerrno)

answer May 14, 2013 by anonymous
Similar Questions
+1 vote

I'm on /dev/sda7. I want to install gcc with C++ support in /dev/sda2.

  1. Is it possible to install gcc in /dev/sda2?
  2. What are the dependencies to install gcc? Or which packages should I install there in /dev/sda2 before installing gcc?
  3. What is cross compiler? How can I install gcc as cross compiler? When do we need to install gcc as cross compiler?
  4. Can someone explain the method of installing cross compiled gcc?
0 votes

I am looking for detailed description of optimization flags that are provided by GCC compiler ?


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...