summaryrefslogtreecommitdiff
path: root/libc/string/strcspn.c
blob: 0466af99b0debccad627ef2c7eeb306826b8509c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright (C) 2002     Manuel Novoa III
 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include "_string.h"

#ifdef WANT_WIDE
# define Wstrcspn wcscspn
#else
# define Wstrcspn strcspn
#endif

size_t Wstrcspn(const Wchar *s1, const Wchar *s2)
{
	register const Wchar *s;
	register const Wchar *p;

	for ( s=s1 ; *s ; s++ ) {
		for ( p=s2 ; *p ; p++ ) {
			if (*p == *s) goto done;
		}
	}
 done:
	return s - s1;
}

#ifndef WANT_WIDE
libc_hidden_def(strcspn)
#endif
'>2007-02-04 09:24:56 +0000 commit70c8f81bb83dad4c073eef246f6504fc8a8d3131 (patch) tree6744cf77ec683530b8c6468f85bf7835c5f99718 /libc/sysdeps/linux/mips/bits parentc64e7777b371e7c0d823368b0f48d92cbd268903 (diff)
sync some stuff from glibc to fix test build failure
Diffstat (limited to 'libc/sysdeps/linux/mips/bits')
-rw-r--r--libc/sysdeps/linux/mips/bits/stat.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/mips/bits/stat.h b/libc/sysdeps/linux/mips/bits/stat.h
index 0bbc84ea4..5364499a3 100644
--- a/libc/sysdeps/linux/mips/bits/stat.h
+++ b/libc/sysdeps/linux/mips/bits/stat.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +36,7 @@
#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/* Structure describing file characteristics. */
struct stat
{
@@ -65,11 +66,11 @@ struct stat
* st_ctime but we don't have it under Linux.
*/
__time_t st_atime; /* Time of last access. */
- long int __reserved0;
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- long int __reserved1;
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- long int __reserved2;
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
@@ -110,7 +111,7 @@ struct stat {
#endif /* N32 || N64 */
#ifdef __USE_LARGEFILE64
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
struct stat64
{
__dev_t st_dev;