initial import
[ICEs.git] / bfin-strcmp / test.i.2
1 typedef long unsigned int size_t;
2 typedef unsigned short __kernel_dev_t;
3 typedef unsigned long __kernel_ino_t;
4 typedef unsigned short __kernel_mode_t;
5 typedef unsigned short __kernel_nlink_t;
6 typedef long __kernel_off_t;
7 typedef int __kernel_pid_t;
8 typedef unsigned int __kernel_ipc_pid_t;
9 typedef unsigned int __kernel_uid_t;
10 typedef unsigned int __kernel_gid_t;
11 typedef unsigned int __kernel_size_t;
12 typedef int __kernel_ssize_t;
13 typedef int __kernel_ptrdiff_t;
14 typedef long __kernel_time_t;
15 typedef long __kernel_suseconds_t;
16 typedef long __kernel_clock_t;
17 typedef int __kernel_daddr_t;
18 typedef char * __kernel_caddr_t;
19 typedef unsigned short __kernel_uid16_t;
20 typedef unsigned short __kernel_gid16_t;
21 typedef unsigned int __kernel_uid32_t;
22 typedef unsigned int __kernel_gid32_t;
23 typedef unsigned short __kernel_old_uid_t;
24 typedef unsigned short __kernel_old_gid_t;
25 typedef long long __kernel_loff_t;
26 typedef __kernel_dev_t __kernel_old_dev_t;
27 typedef struct {
28 int __val[2];
29 } __kernel_fsid_t;
30 typedef unsigned char __u_char;
31 typedef unsigned short int __u_short;
32 typedef unsigned int __u_int;
33 typedef unsigned long int __u_long;
34 typedef signed char __int8_t;
35 typedef unsigned char __uint8_t;
36 typedef signed short int __int16_t;
37 typedef unsigned short int __uint16_t;
38 typedef signed int __int32_t;
39 typedef unsigned int __uint32_t;
40 __extension__ typedef signed long long int __int64_t;
41 __extension__ typedef unsigned long long int __uint64_t;
42 __extension__ typedef long long int __quad_t;
43 __extension__ typedef unsigned long long int __u_quad_t;
44 __extension__ typedef __u_quad_t __dev_t;
45 __extension__ typedef unsigned int __uid_t;
46 __extension__ typedef unsigned int __gid_t;
47 __extension__ typedef unsigned long int __ino_t;
48 __extension__ typedef __u_quad_t __ino64_t;
49 __extension__ typedef unsigned int __mode_t;
50 __extension__ typedef unsigned int __nlink_t;
51 __extension__ typedef long int __off_t;
52 __extension__ typedef __quad_t __off64_t;
53 __extension__ typedef int __pid_t;
54 __extension__ typedef struct { int __val[2]; } __fsid_t;
55 __extension__ typedef long int __clock_t;
56 __extension__ typedef unsigned long int __rlim_t;
57 __extension__ typedef __u_quad_t __rlim64_t;
58 __extension__ typedef unsigned int __id_t;
59 __extension__ typedef long int __time_t;
60 __extension__ typedef unsigned int __useconds_t;
61 __extension__ typedef long int __suseconds_t;
62 __extension__ typedef int __daddr_t;
63 __extension__ typedef long int __swblk_t;
64 __extension__ typedef int __key_t;
65 __extension__ typedef int __clockid_t;
66 __extension__ typedef void * __timer_t;
67 __extension__ typedef long int __blksize_t;
68 __extension__ typedef long int __blkcnt_t;
69 __extension__ typedef __quad_t __blkcnt64_t;
70 __extension__ typedef unsigned long int __fsblkcnt_t;
71 __extension__ typedef __u_quad_t __fsblkcnt64_t;
72 __extension__ typedef unsigned long int __fsfilcnt_t;
73 __extension__ typedef __u_quad_t __fsfilcnt64_t;
74 __extension__ typedef long int __ssize_t;
75 typedef __off64_t __loff_t;
76 typedef __quad_t *__qaddr_t;
77 typedef char *__caddr_t;
78 __extension__ typedef int __intptr_t;
79 __extension__ typedef unsigned int __socklen_t;
80 typedef __kernel_ipc_pid_t __ipc_pid_t;
81 struct __sched_param
82 {
83 int __sched_priority;
84 };
85 struct _pthread_fastlock
86 {
87 long int __status;
88 int __spinlock;
89 };
90 typedef struct _pthread_descr_struct *_pthread_descr;
91 typedef struct __pthread_attr_s
92 {
93 int __detachstate;
94 int __schedpolicy;
95 struct __sched_param __schedparam;
96 int __inheritsched;
97 int __scope;
98 size_t __guardsize;
99 int __stackaddr_set;
100 void *__stackaddr;
101 size_t __stacksize;
102 } pthread_attr_t;
103 typedef struct
104 {
105 struct _pthread_fastlock __c_lock;
106 _pthread_descr __c_waiting;
107 } pthread_cond_t;
108 typedef struct
109 {
110 int __dummy;
111 } pthread_condattr_t;
112 typedef unsigned int pthread_key_t;
113 typedef struct
114 {
115 int __m_reserved;
116 int __m_count;
117 _pthread_descr __m_owner;
118 int __m_kind;
119 struct _pthread_fastlock __m_lock;
120 } pthread_mutex_t;
121 typedef struct
122 {
123 int __mutexkind;
124 } pthread_mutexattr_t;
125 typedef int pthread_once_t;
126 typedef unsigned long int pthread_t;
127 typedef struct __STDIO_FILE_STRUCT FILE;
128 typedef struct __STDIO_FILE_STRUCT __FILE;
129 struct timespec
130 {
131 __time_t tv_sec;
132 long int tv_nsec;
133 };
134 struct sched_param
135 {
136 int __sched_priority;
137 };
138 extern int clone (int (*__fn) (void *__arg), void *__child_stack,
139 int __flags, void *__arg, ...) __attribute__ ((__nothrow__));
140 typedef unsigned long int __cpu_mask;
141 typedef struct
142 {
143 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
144 } cpu_set_t;
145 extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
146 __attribute__ ((__nothrow__));
147 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
148 extern int sched_setscheduler (__pid_t __pid, int __policy,
149 __const struct sched_param *__param) __attribute__ ((__nothrow__));
150 extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
151 extern int sched_yield (void) __attribute__ ((__nothrow__));
152 extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
153 extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
154 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
155 typedef __clock_t clock_t;
156 typedef __time_t time_t;
157 typedef __clockid_t clockid_t;
158 typedef __timer_t timer_t;
159 struct tm
160 {
161 int tm_sec;
162 int tm_min;
163 int tm_hour;
164 int tm_mday;
165 int tm_mon;
166 int tm_year;
167 int tm_wday;
168 int tm_yday;
169 int tm_isdst;
170 long int tm_gmtoff;
171 __const char *tm_zone;
172 };
173 struct itimerspec
174 {
175 struct timespec it_interval;
176 struct timespec it_value;
177 };
178 struct sigevent;
179 extern clock_t clock (void) __attribute__ ((__nothrow__));
180 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
181 extern double difftime (time_t __time1, time_t __time0)
182 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
183 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
184 extern size_t strftime (char *__restrict __s, size_t __maxsize,
185 __const char *__restrict __format,
186 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
187 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
188 extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
189 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
190 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
191 extern struct tm *localtime_r (__const time_t *__restrict __timer,
192 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
193 extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
194 extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
195 extern char *asctime_r (__const struct tm *__restrict __tp,
196 char *__restrict __buf) __attribute__ ((__nothrow__));
197 extern char *ctime_r (__const time_t *__restrict __timer,
198 char *__restrict __buf) __attribute__ ((__nothrow__));
199 extern char *tzname[2];
200 extern void tzset (void) __attribute__ ((__nothrow__));
201 extern int daylight;
202 extern long int timezone;
203 extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
204 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
205 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
206 extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
207 extern int nanosleep (__const struct timespec *__requested_time,
208 struct timespec *__remaining);
209 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
210 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
211 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
212 __attribute__ ((__nothrow__));
213 extern int timer_create (clockid_t __clock_id,
214 struct sigevent *__restrict __evp,
215 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
216 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
217 extern int timer_settime (timer_t __timerid, int __flags,
218 __const struct itimerspec *__restrict __value,
219 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
220 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
221 __attribute__ ((__nothrow__));
222 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
223 typedef int __sig_atomic_t;
224 typedef struct
225 {
226 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
227 } __sigset_t;
228 typedef __sigset_t sigset_t;
229 enum
230 {
231 PTHREAD_CREATE_JOINABLE,
232 PTHREAD_CREATE_DETACHED
233 };
234 enum
235 {
236 PTHREAD_INHERIT_SCHED,
237 PTHREAD_EXPLICIT_SCHED
238 };
239 enum
240 {
241 PTHREAD_SCOPE_SYSTEM,
242 PTHREAD_SCOPE_PROCESS
243 };
244 enum
245 {
246 PTHREAD_MUTEX_ADAPTIVE_NP,
247 PTHREAD_MUTEX_RECURSIVE_NP,
248 PTHREAD_MUTEX_ERRORCHECK_NP,
249 PTHREAD_MUTEX_TIMED_NP
250 };
251 enum
252 {
253 PTHREAD_PROCESS_PRIVATE,
254 PTHREAD_PROCESS_SHARED
255 };
256 struct _pthread_cleanup_buffer
257 {
258 void (*__routine) (void *);
259 void *__arg;
260 int __canceltype;
261 struct _pthread_cleanup_buffer *__prev;
262 };
263 enum
264 {
265 PTHREAD_CANCEL_ENABLE,
266 PTHREAD_CANCEL_DISABLE
267 };
268 enum
269 {
270 PTHREAD_CANCEL_DEFERRED,
271 PTHREAD_CANCEL_ASYNCHRONOUS
272 };
273 extern int pthread_create (pthread_t *__restrict __threadp,
274 __const pthread_attr_t *__restrict __attr,
275 void *(*__start_routine) (void *),
276 void *__restrict __arg) __attribute__ ((__nothrow__));
277 extern pthread_t pthread_self (void) __attribute__ ((__nothrow__));
278 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
279 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
280 extern int pthread_join (pthread_t __th, void **__thread_return);
281 extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
282 extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__));
283 extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__));
284 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
285 int __detachstate) __attribute__ ((__nothrow__));
286 extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
287 int *__detachstate) __attribute__ ((__nothrow__));
288 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
289 __const struct sched_param *__restrict
290 __param) __attribute__ ((__nothrow__));
291 extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
292 __attr,
293 struct sched_param *__restrict __param)
294 __attribute__ ((__nothrow__));
295 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
296 __attribute__ ((__nothrow__));
297 extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
298 __attr, int *__restrict __policy)
299 __attribute__ ((__nothrow__));
300 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
301 int __inherit) __attribute__ ((__nothrow__));
302 extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
303 __attr, int *__restrict __inherit)
304 __attribute__ ((__nothrow__));
305 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
306 __attribute__ ((__nothrow__));
307 extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
308 int *__restrict __scope) __attribute__ ((__nothrow__));
309 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
310 void *__stackaddr) __attribute__ ((__nothrow__));
311 extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
312 __attr, void **__restrict __stackaddr)
313 __attribute__ ((__nothrow__));
314 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
315 size_t __stacksize) __attribute__ ((__nothrow__));
316 extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
317 __attr, size_t *__restrict __stacksize)
318 __attribute__ ((__nothrow__));
319 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
320 __const struct sched_param *__param)
321 __attribute__ ((__nothrow__));
322 extern int pthread_getschedparam (pthread_t __target_thread,
323 int *__restrict __policy,
324 struct sched_param *__restrict __param)
325 __attribute__ ((__nothrow__));
326 extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
327 __const pthread_mutexattr_t *__restrict
328 __mutex_attr) __attribute__ ((__nothrow__));
329 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
330 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
331 extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
332 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__));
333 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__));
334 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__));
335 extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
336 __restrict __attr,
337 int *__restrict __pshared) __attribute__ ((__nothrow__));
338 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
339 int __pshared) __attribute__ ((__nothrow__));
340 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
341 __const pthread_condattr_t *__restrict
342 __cond_attr) __attribute__ ((__nothrow__));
343 extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
344 extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
345 extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__));
346 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
347 pthread_mutex_t *__restrict __mutex);
348 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
349 pthread_mutex_t *__restrict __mutex,
350 __const struct timespec *__restrict
351 __abstime);
352 extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__));
353 extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__));
354 extern int pthread_condattr_getpshared (__const pthread_condattr_t *
355 __restrict __attr,
356 int *__restrict __pshared) __attribute__ ((__nothrow__));
357 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
358 int __pshared) __attribute__ ((__nothrow__));
359 extern int pthread_key_create (pthread_key_t *__key,
360 void (*__destr_function) (void *)) __attribute__ ((__nothrow__));
361 extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
362 extern int pthread_setspecific (pthread_key_t __key,
363 __const void *__pointer) __attribute__ ((__nothrow__));
364 extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
365 extern int pthread_once (pthread_once_t *__once_control,
366 void (*__init_routine) (void));
367 extern int pthread_setcancelstate (int __state, int *__oldstate);
368 extern int pthread_setcanceltype (int __type, int *__oldtype);
369 extern int pthread_cancel (pthread_t __cancelthread);
370 extern void pthread_testcancel (void);
371 extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer,
372 void (*__routine) (void *),
373 void *__arg) __attribute__ ((__nothrow__));
374 extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
375 int __execute) __attribute__ ((__nothrow__));
376 extern int pthread_sigmask (int __how,
377 __const __sigset_t *__restrict __newmask,
378 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
379 extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
380 extern int pthread_atfork (void (*__prepare) (void),
381 void (*__parent) (void),
382 void (*__child) (void)) __attribute__ ((__nothrow__));
383 extern void pthread_kill_other_threads_np (void) __attribute__ ((__nothrow__));
384 typedef struct {
385 __off_t __pos;
386 } __STDIO_fpos_t;
387 typedef struct {
388 __off64_t __pos;
389 } __STDIO_fpos64_t;
390 typedef __off64_t __offmax_t;
391 struct __STDIO_FILE_STRUCT {
392 unsigned short __modeflags;
393 unsigned char __ungot[2];
394 int __filedes;
395 unsigned char *__bufstart;
396 unsigned char *__bufend;
397 unsigned char *__bufpos;
398 unsigned char *__bufread;
399 unsigned char *__bufgetc_u;
400 unsigned char *__bufputc_u;
401 struct __STDIO_FILE_STRUCT *__nextopen;
402 int __user_locking;
403 pthread_mutex_t __lock;
404 };
405 extern int __fgetc_unlocked(FILE *__stream);
406 extern int __fputc_unlocked(int __c, FILE *__stream);
407 extern FILE *__stdin;
408 extern FILE *__stdout;
409 typedef __builtin_va_list __gnuc_va_list;
410 typedef __STDIO_fpos_t fpos_t;
411 extern FILE *stdin;
412 extern FILE *stdout;
413 extern FILE *stderr;
414 extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
415 extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
416 extern FILE *tmpfile (void);
417 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
418 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
419 extern char *tempnam (__const char *__dir, __const char *__pfx)
420 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
421 extern int fclose (FILE *__stream);
422 extern int fflush (FILE *__stream);
423 extern int fflush_unlocked (FILE *__stream);
424 extern FILE *fopen (__const char *__restrict __filename,
425 __const char *__restrict __modes);
426 extern FILE *freopen (__const char *__restrict __filename,
427 __const char *__restrict __modes,
428 FILE *__restrict __stream);
429 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
430 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
431 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
432 int __modes, size_t __n) __attribute__ ((__nothrow__));
433 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
434 size_t __size) __attribute__ ((__nothrow__));
435 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
436 extern int fprintf (FILE *__restrict __stream,
437 __const char *__restrict __format, ...);
438 extern int printf (__const char *__restrict __format, ...);
439 extern int sprintf (char *__restrict __s,
440 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
441 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
442 __gnuc_va_list __arg);
443 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
444 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
445 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
446 extern int snprintf (char *__restrict __s, size_t __maxlen,
447 __const char *__restrict __format, ...)
448 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
449 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
450 __const char *__restrict __format, __gnuc_va_list __arg)
451 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
452 extern int fscanf (FILE *__restrict __stream,
453 __const char *__restrict __format, ...);
454 extern int scanf (__const char *__restrict __format, ...);
455 extern int sscanf (__const char *__restrict __s,
456 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
457 extern int fgetc (FILE *__stream);
458 extern int getc (FILE *__stream);
459 extern int getchar (void);
460 extern int getc_unlocked (FILE *__stream);
461 extern int getchar_unlocked (void);
462 extern int fgetc_unlocked (FILE *__stream);
463 extern int fputc (int __c, FILE *__stream);
464 extern int putc (int __c, FILE *__stream);
465 extern int putchar (int __c);
466 extern int fputc_unlocked (int __c, FILE *__stream);
467 extern int putc_unlocked (int __c, FILE *__stream);
468 extern int putchar_unlocked (int __c);
469 extern int getw (FILE *__stream);
470 extern int putw (int __w, FILE *__stream);
471 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
472 extern char *gets (char *__s);
473 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
474 extern int puts (__const char *__s);
475 extern int ungetc (int __c, FILE *__stream);
476 extern size_t fread (void *__restrict __ptr, size_t __size,
477 size_t __n, FILE *__restrict __stream);
478 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
479 size_t __n, FILE *__restrict __s);
480 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
481 size_t __n, FILE *__restrict __stream);
482 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
483 size_t __n, FILE *__restrict __stream);
484 extern int fseek (FILE *__stream, long int __off, int __whence);
485 extern long int ftell (FILE *__stream);
486 extern void rewind (FILE *__stream);
487 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
488 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
489 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
490 extern int feof (FILE *__stream) __attribute__ ((__nothrow__));
491 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__));
492 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
493 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
494 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
495 extern void perror (__const char *__s);
496 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__));
497 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
498 extern FILE *popen (__const char *__command, __const char *__modes);
499 extern int pclose (FILE *__stream);
500 extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
501 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
502 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__));
503 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
504 extern void *memcpy (void *__restrict __dest,
505 __const void *__restrict __src, size_t __n)
506 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
507 extern void *memmove (void *__dest, __const void *__src, size_t __n)
508 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
509 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
510 int __c, size_t __n)
511 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
512 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
513 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
514 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
515 extern void *memchr (__const void *__s, int __c, size_t __n)
516 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
517 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
518 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
519 extern char *strncpy (char *__restrict __dest,
520 __const char *__restrict __src, size_t __n)
521 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
522 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
523 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
524 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
525 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
526 extern int strcmp (__const char *__s1, __const char *__s2)
527 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
528 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
529 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
530 extern int strcoll (__const char *__s1, __const char *__s2)
531 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
532 extern size_t strxfrm (char *__restrict __dest,
533 __const char *__restrict __src, size_t __n)
534 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
535 extern char *strdup (__const char *__s)
536 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
537 extern char *strchr (__const char *__s, int __c)
538 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
539 extern char *strrchr (__const char *__s, int __c)
540 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
541 extern size_t strcspn (__const char *__s, __const char *__reject)
542 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
543 extern size_t strspn (__const char *__s, __const char *__accept)
544 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
545 extern char *strpbrk (__const char *__s, __const char *__accept)
546 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
547 extern char *strstr (__const char *__haystack, __const char *__needle)
548 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
549 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
550 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
551 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
552 char **__restrict __save_ptr)
553 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
554 extern size_t strlen (__const char *__s)
555 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
556 extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
557 extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen)
558 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
559 extern char * strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("_" "__glibc_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
560 extern void bcopy (__const void *__src, void *__dest, size_t __n)
561 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
562 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
563 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
564 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
565 extern char *index (__const char *__s, int __c)
566 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
567 extern char *rindex (__const char *__s, int __c)
568 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
569 extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
570 extern int strcasecmp (__const char *__s1, __const char *__s2)
571 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
572 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
573 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
574 extern char *strsep (char **__restrict __stringp,
575 __const char *__restrict __delim)
576 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
577 extern size_t strlcat(char *__restrict dst, const char *__restrict src,
578 size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
579 extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
580 size_t n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
581 const char *it = "<UNSET>";
582 size_t errors = 0;
583 char one[50];
584 char two[50];
585 static void
586 check (int thing, int number)
587 {
588 if (!thing)
589 {
590 printf("%s flunked test %d\n", it, number);
591 ++errors;
592 }
593 else if (0)
594 {
595 printf("%s test %d ok\n", it, number);
596 }
597 }
598 static void
599 equal (const char *a, const char *b, int number)
600 {
601 check(a != ((void *)0) && b != ((void *)0) && (strcmp((a), (b)) == 0), number);
602 }
603 int _strcmp(const char *cs, const char *ct)
604 {
605 int __res1, __res2;
606 __asm__
607 ("1:\t%2 = B[%0++] (Z);\n\t"
608 "%3 = B[%1++] (Z);\n\t"
609 "CC = %2 == %3;\n\t"
610 "if ! cc jump 2f;\n\t"
611 "CC = %2;\n\t"
612 "if cc jump 1b (bp);\n\t"
613 "jump.s 3f;\n"
614 "2:\t%2 = %2 - %3;\n"
615 "3:\n"
616 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
617 : : "CC");
618 return __res1;
619 }
620 void
621 test_strcmp (void)
622 {
623 it = "strcmp";
624 {
625 char buf1[0x40], buf2[0x40];
626 int i, j;
627 j = i = 0;
628 {
629 int k;
630 buf1[i] = buf1[0x3f] = 0;
631 buf2[j] = buf2[0x3f] = 0;
632 k = 0;
633 {
634 ;
635 ;
636 buf1[i+k] = 'A' + i + k;
637 buf1[i+k+1] = 0;
638 ;
639 ;
640 check (_strcmp (buf1+i,buf2+j) > 0, 2);
641 return;
642 }
643 }
644 }
645 }
646 int main(int argc, char *argv[])
647 {
648 int status;
649 test_strcmp ();
650 if (errors == 0)
651 {
652 status = 0;
653 printf("TEST PASS.\n");
654 }
655 else
656 {
657 status = 1;
658 printf("%Zd errors.\n", errors);
659 printf("TEST FAIL.\n");
660 }
661 return status;
662 }