Changeset 3779 for branches/libc-0.6/src


Ignore:
Timestamp:
Mar 22, 2012, 2:35:38 PM (13 years ago)
Author:
bird
Message:

Drop the liberty fnmatch.h, adding the GNUisms to the emx header. Fixes #193.

Location:
branches/libc-0.6/src/emx/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include/emx/fnmatch.h

    r1087 r3779  
    4040
    4141
     42#if !defined (_POSIX_SOURCE) || defined (_GnU_SOURCE) || defined(__USE_EMX)
     43/* GNU liberty compatibility */
     44# define FNM_FILE_NAME     FNM_PATHNAME
     45# define FNM_CASEFOLD      128 /* _FNM_IGNORECASE */
     46/*# define FNM_LEADING_DIR   256 -  _FNM_PATHPREFIX?? */
     47#endif
     48
    4249#if defined (__cplusplus)
    4350}
     
    4552
    4653#endif /* not _FNMATCH_H */
     54
  • branches/libc-0.6/src/emx/include/fnmatch.h

    r1506 r3779  
    1 /* fnmatch.h,v 1.3 2004/09/14 22:27:33 bird Exp */
    2 /** @file
    3  * GNU, -liberty.
    4  * @todo    Update the fnmatch code in LIBC to match this file.
    5  */
     1#include <emx/fnmatch.h>
    62
    7 /* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
    8 
    9 NOTE: The canonical source of this file is maintained with the GNU C Library.
    10 Bugs can be reported to bug-glibc@prep.ai.mit.edu.
    11 
    12 This program is free software; you can redistribute it and/or modify it
    13 under the terms of the GNU General Public License as published by the
    14 Free Software Foundation; either version 2, or (at your option) any
    15 later version.
    16 
    17 This program is distributed in the hope that it will be useful,
    18 but WITHOUT ANY WARRANTY; without even the implied warranty of
    19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20 GNU General Public License for more details.
    21 
    22 You should have received a copy of the GNU General Public License
    23 along with this program; if not, write to the Free Software
    24 Foundation, 59 Temple Place - Suite 330,
    25 Boston, MA 02111-1307, USA.  */
    26 
    27 #ifndef _FNMATCH_H
    28 
    29 #define _FNMATCH_H      1
    30 
    31 #ifdef  __cplusplus
    32 extern "C" {
    33 #endif
    34 
    35 #if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
    36 #undef  __P
    37 #define __P(args)       args
    38 #else /* Not C++ or ANSI C.  */
    39 #undef  __P
    40 #define __P(args)       ()
    41 /* We can get away without defining `const' here only because in this file
    42    it is used only inside the prototype for `fnmatch', which is elided in
    43    non-ANSI C where `const' is problematical.  */
    44 #endif /* C++ or ANSI C.  */
    45 
    46 
    47 /* We #undef these before defining them because some losing systems
    48    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
    49 #undef  FNM_PATHNAME
    50 #undef  FNM_NOESCAPE
    51 #undef  FNM_PERIOD
    52 
    53 /* Bits set in the FLAGS argument to `fnmatch'.  */
    54 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
    55 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
    56 #define FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
    57 
    58 #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
    59 #define FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
    60 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match.  */
    61 #define FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
    62 #endif
    63 
    64 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
    65 #define FNM_NOMATCH     1
    66 
    67 /* Match STRING against the filename pattern PATTERN,
    68    returning zero if it matches, FNM_NOMATCH if not.  */
    69 extern int fnmatch __P ((const char *__pattern, const char *__string,
    70                          int __flags));
    71 
    72 #ifdef  __cplusplus
    73 }
    74 #endif
    75 
    76 #endif /* fnmatch.h */
Note: See TracChangeset for help on using the changeset viewer.