top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

passing glob an argument in GCC

0 votes
187 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 LinkedIn 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?
...