[gccsdk] [Bug 220] New: glob() returning wrong value when no files match

bugzilla-daemon at riscos.info bugzilla-daemon at riscos.info
Mon Jun 13 07:31:53 PDT 2011


           Summary: glob() returning wrong value when no files match
           Product: GCC/GCCSDK
           Version: other
          Platform: Other
        OS/Version: RISC OS
            Status: NEW
          Severity: normal
          Priority: P1
         Component: C compiler
        AssignedTo: John.Tytgat at aaug.net
        ReportedBy: duncan_moore at ntlworld.com
   Estimated Hours: 0.0

GCC 4.1.1 Release 2, VRPC RISC OS 4.39

When no files match and GLOB_NOCHECK is not used, glob() returns the wrong
For example,

#include <stdio.h>
#include <glob.h>
int main (void) {
  glob_t file_list;
  printf("GLOB_NOMATCH  = %i\n", GLOB_NOMATCH);
  printf("glob() return = %i\n", glob("no_matching_files",0,NULL,&file_list));
  return 0;


glob() return = 0

The glob() return value should be GLOB_NOMATCH, i.e. it should give:

glob() return = 3

Configure bugmail: http://www.riscos.info/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the gcc mailing list