#3631 new defect

unknown type name 'off_t' in regex.h

Reported by: Himanshu Sekhar Nayak Owned by:
Priority: normal Milestone: Indefinite
Component: tool/newlib Version:
Severity: normal Keywords: POSIX-Compliance
Cc: Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

Seems like for "off_t" in regex.h is unknown type as it doesn't have it required header file.

Here is the error:-

In file included from /home/himanshu/development/rtems/kernel/rtems/c/src/../../testsuites/psxtests/psxhdrs/regex/regcomp.c:26:0:
/home/himanshu/development/rtems/5/sparc-rtems5/include/regex.h:43:9: error: unknown type name 'off_t'

typedef off_t regoff_t;

Note this test case which works:

#include <sys/types.h> // should not be needed

#include <regex.h>

int f(void)
{

  return regcomp(NULL, "", 1);
}

Per http://pubs.opengroup.org/onlinepubs/009695399/functions/regcomp.html, the only include necessary should be <regex.h>.

Change History (1)

comment:1 Changed on Dec 3, 2018 at 4:12:52 PM by Joel Sherrill

Component: admintool/newlib
Description: modified (diff)
Keywords: POSIX-Compliance added
Milestone: Indefinite
Note: See TracTickets for help on using tickets.