]> git.wh0rd.org - ICEs.git/blame - bfin-2625/netlib.i.0
initial import
[ICEs.git] / bfin-2625 / netlib.i.0
CommitLineData
45516216 1# 1 "netlib.c"
2# 1 "<built-in>"
3# 1 "<command line>"
4# 1 "netlib.c"
5char netlib_id[]="@(#)netlib.c (c) Copyright 1993-2004 Hewlett-Packard Company. Version 2.3pl2";
6# 53 "netlib.c"
7# 1 "../config.h" 1
8# 54 "netlib.c" 2
9
10
11
12
13
14
15# 1 "/usr/include/limits.h" 1 3 4
16# 26 "/usr/include/limits.h" 3 4
17# 1 "/usr/include/features.h" 1 3 4
18# 308 "/usr/include/features.h" 3 4
19# 1 "/usr/include/sys/cdefs.h" 1 3 4
20# 309 "/usr/include/features.h" 2 3 4
21# 331 "/usr/include/features.h" 3 4
22# 1 "/usr/include/gnu/stubs.h" 1 3 4
23# 332 "/usr/include/features.h" 2 3 4
24# 27 "/usr/include/limits.h" 2 3 4
25# 124 "/usr/include/limits.h" 3 4
26# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/limits.h" 1 3 4
27# 125 "/usr/include/limits.h" 2 3 4
28# 144 "/usr/include/limits.h" 3 4
29# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
30# 153 "/usr/include/bits/posix1_lim.h" 3 4
31# 1 "/usr/include/bits/local_lim.h" 1 3 4
32# 36 "/usr/include/bits/local_lim.h" 3 4
33# 1 "/usr/include/linux/limits.h" 1 3 4
34# 37 "/usr/include/bits/local_lim.h" 2 3 4
35# 154 "/usr/include/bits/posix1_lim.h" 2 3 4
36# 145 "/usr/include/limits.h" 2 3 4
37
38
39
40# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
41# 149 "/usr/include/limits.h" 2 3 4
42# 61 "netlib.c" 2
43# 1 "/usr/include/signal.h" 1 3 4
44# 31 "/usr/include/signal.h" 3 4
45
46
47# 1 "/usr/include/bits/sigset.h" 1 3 4
48# 23 "/usr/include/bits/sigset.h" 3 4
49typedef int __sig_atomic_t;
50
51
52
53
54typedef struct
55 {
56 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
57 } __sigset_t;
58# 103 "/usr/include/bits/sigset.h" 3 4
59extern int __sigismember (__const __sigset_t *, int);
60extern int __sigaddset (__sigset_t *, int);
61extern int __sigdelset (__sigset_t *, int);
62# 117 "/usr/include/bits/sigset.h" 3 4
63extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; }
64extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); }
65extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); }
66# 34 "/usr/include/signal.h" 2 3 4
67
68
69
70
71
72
73
74typedef __sig_atomic_t sig_atomic_t;
75
76
77
78
79
80
81
82
83typedef __sigset_t sigset_t;
84
85
86
87
88
89
90# 1 "/usr/include/bits/types.h" 1 3 4
91# 28 "/usr/include/bits/types.h" 3 4
92# 1 "/usr/include/bits/wordsize.h" 1 3 4
93# 29 "/usr/include/bits/types.h" 2 3 4
94
95
96# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
97# 214 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 3 4
98typedef long unsigned int size_t;
99# 32 "/usr/include/bits/types.h" 2 3 4
100
101
102typedef unsigned char __u_char;
103typedef unsigned short int __u_short;
104typedef unsigned int __u_int;
105typedef unsigned long int __u_long;
106
107
108typedef signed char __int8_t;
109typedef unsigned char __uint8_t;
110typedef signed short int __int16_t;
111typedef unsigned short int __uint16_t;
112typedef signed int __int32_t;
113typedef unsigned int __uint32_t;
114
115
116
117
118__extension__ typedef signed long long int __int64_t;
119__extension__ typedef unsigned long long int __uint64_t;
120
121
122
123
124
125
126
127__extension__ typedef long long int __quad_t;
128__extension__ typedef unsigned long long int __u_quad_t;
129# 129 "/usr/include/bits/types.h" 3 4
130# 1 "/usr/include/bits/typesizes.h" 1 3 4
131# 130 "/usr/include/bits/types.h" 2 3 4
132
133
134
135
136
137
138__extension__ typedef __u_quad_t __dev_t;
139__extension__ typedef unsigned int __uid_t;
140__extension__ typedef unsigned int __gid_t;
141__extension__ typedef unsigned long int __ino_t;
142__extension__ typedef __u_quad_t __ino64_t;
143__extension__ typedef unsigned int __mode_t;
144__extension__ typedef unsigned int __nlink_t;
145__extension__ typedef long int __off_t;
146__extension__ typedef __quad_t __off64_t;
147__extension__ typedef int __pid_t;
148__extension__ typedef struct { int __val[2]; } __fsid_t;
149__extension__ typedef long int __clock_t;
150__extension__ typedef unsigned long int __rlim_t;
151__extension__ typedef __u_quad_t __rlim64_t;
152__extension__ typedef unsigned int __id_t;
153__extension__ typedef long int __time_t;
154__extension__ typedef unsigned int __useconds_t;
155__extension__ typedef long int __suseconds_t;
156
157__extension__ typedef int __daddr_t;
158__extension__ typedef long int __swblk_t;
159__extension__ typedef int __key_t;
160
161
162__extension__ typedef int __clockid_t;
163
164
165__extension__ typedef int __timer_t;
166
167
168__extension__ typedef long int __blksize_t;
169
170
171
172
173__extension__ typedef long int __blkcnt_t;
174__extension__ typedef __quad_t __blkcnt64_t;
175
176
177__extension__ typedef unsigned long int __fsblkcnt_t;
178__extension__ typedef __u_quad_t __fsblkcnt64_t;
179
180
181__extension__ typedef unsigned long int __fsfilcnt_t;
182__extension__ typedef __u_quad_t __fsfilcnt64_t;
183
184__extension__ typedef int __ssize_t;
185
186
187
188typedef __off64_t __loff_t;
189typedef __quad_t *__qaddr_t;
190typedef char *__caddr_t;
191
192
193__extension__ typedef int __intptr_t;
194
195
196__extension__ typedef unsigned int __socklen_t;
197# 58 "/usr/include/signal.h" 2 3 4
198# 1 "/usr/include/bits/signum.h" 1 3 4
199# 59 "/usr/include/signal.h" 2 3 4
200# 75 "/usr/include/signal.h" 3 4
201typedef void (*__sighandler_t) (int);
202
203
204
205
206extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
207 __attribute__ ((__nothrow__));
208# 90 "/usr/include/signal.h" 3 4
209
210
211extern __sighandler_t signal (int __sig, __sighandler_t __handler)
212 __attribute__ ((__nothrow__));
213# 104 "/usr/include/signal.h" 3 4
214
215# 117 "/usr/include/signal.h" 3 4
216extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));
217
218
219
220
221
222
223extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));
224
225
226
227
228extern int raise (int __sig) __attribute__ ((__nothrow__));
229
230
231
232
233extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
234 __attribute__ ((__nothrow__));
235extern int gsignal (int __sig) __attribute__ ((__nothrow__));
236
237
238
239
240extern void psignal (int __sig, __const char *__s);
241# 153 "/usr/include/signal.h" 3 4
242extern int __sigpause (int __sig_or_mask, int __is_sig);
243# 181 "/usr/include/signal.h" 3 4
244extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
245
246
247extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
248
249
250extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
251# 201 "/usr/include/signal.h" 3 4
252typedef __sighandler_t sig_t;
253
254
255
256
257
258
259
260# 1 "/usr/include/time.h" 1 3 4
261# 118 "/usr/include/time.h" 3 4
262struct timespec
263 {
264 __time_t tv_sec;
265 long int tv_nsec;
266 };
267# 210 "/usr/include/signal.h" 2 3 4
268
269
270# 1 "/usr/include/bits/siginfo.h" 1 3 4
271# 25 "/usr/include/bits/siginfo.h" 3 4
272# 1 "/usr/include/bits/wordsize.h" 1 3 4
273# 26 "/usr/include/bits/siginfo.h" 2 3 4
274
275
276
277
278
279
280
281typedef union sigval
282 {
283 int sival_int;
284 void *sival_ptr;
285 } sigval_t;
286# 51 "/usr/include/bits/siginfo.h" 3 4
287typedef struct siginfo
288 {
289 int si_signo;
290 int si_errno;
291
292 int si_code;
293
294 union
295 {
296 int _pad[((128 / sizeof (int)) - 3)];
297
298
299 struct
300 {
301 __pid_t si_pid;
302 __uid_t si_uid;
303 } _kill;
304
305
306 struct
307 {
308 int si_tid;
309 int si_overrun;
310 sigval_t si_sigval;
311 } _timer;
312
313
314 struct
315 {
316 __pid_t si_pid;
317 __uid_t si_uid;
318 sigval_t si_sigval;
319 } _rt;
320
321
322 struct
323 {
324 __pid_t si_pid;
325 __uid_t si_uid;
326 int si_status;
327 __clock_t si_utime;
328 __clock_t si_stime;
329 } _sigchld;
330
331
332 struct
333 {
334 void *si_addr;
335 } _sigfault;
336
337
338 struct
339 {
340 long int si_band;
341 int si_fd;
342 } _sigpoll;
343 } _sifields;
344 } siginfo_t;
345# 129 "/usr/include/bits/siginfo.h" 3 4
346enum
347{
348 SI_ASYNCNL = -60,
349
350 SI_TKILL = -6,
351
352 SI_SIGIO,
353
354 SI_ASYNCIO,
355
356 SI_MESGQ,
357
358 SI_TIMER,
359
360 SI_QUEUE,
361
362 SI_USER,
363
364 SI_KERNEL = 0x80
365
366};
367
368
369
370enum
371{
372 ILL_ILLOPC = 1,
373
374 ILL_ILLOPN,
375
376 ILL_ILLADR,
377
378 ILL_ILLTRP,
379
380 ILL_PRVOPC,
381
382 ILL_PRVREG,
383
384 ILL_COPROC,
385
386 ILL_BADSTK
387
388};
389
390
391enum
392{
393 FPE_INTDIV = 1,
394
395 FPE_INTOVF,
396
397 FPE_FLTDIV,
398
399 FPE_FLTOVF,
400
401 FPE_FLTUND,
402
403 FPE_FLTRES,
404
405 FPE_FLTINV,
406
407 FPE_FLTSUB
408
409};
410
411
412enum
413{
414 SEGV_MAPERR = 1,
415
416 SEGV_ACCERR
417
418};
419
420
421enum
422{
423 BUS_ADRALN = 1,
424
425 BUS_ADRERR,
426
427 BUS_OBJERR
428
429};
430
431
432enum
433{
434 TRAP_BRKPT = 1,
435
436 TRAP_TRACE
437
438};
439
440
441enum
442{
443 CLD_EXITED = 1,
444
445 CLD_KILLED,
446
447 CLD_DUMPED,
448
449 CLD_TRAPPED,
450
451 CLD_STOPPED,
452
453 CLD_CONTINUED
454
455};
456
457
458enum
459{
460 POLL_IN = 1,
461
462 POLL_OUT,
463
464 POLL_MSG,
465
466 POLL_ERR,
467
468 POLL_PRI,
469
470 POLL_HUP
471
472};
473# 273 "/usr/include/bits/siginfo.h" 3 4
474typedef struct sigevent
475 {
476 sigval_t sigev_value;
477 int sigev_signo;
478 int sigev_notify;
479
480 union
481 {
482 int _pad[((64 / sizeof (int)) - 3)];
483
484
485
486 __pid_t _tid;
487
488 struct
489 {
490 void (*_function) (sigval_t);
491 void *_attribute;
492 } _sigev_thread;
493 } _sigev_un;
494 } sigevent_t;
495
496
497
498
499
500
501enum
502{
503 SIGEV_SIGNAL = 0,
504
505 SIGEV_NONE,
506
507 SIGEV_THREAD,
508
509
510 SIGEV_THREAD_ID = 4
511
512};
513# 213 "/usr/include/signal.h" 2 3 4
514
515
516
517extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
518
519
520extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
521
522
523extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
524
525
526extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
527
528
529extern int sigismember (__const sigset_t *__set, int __signo)
530 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
531# 246 "/usr/include/signal.h" 3 4
532# 1 "/usr/include/bits/sigaction.h" 1 3 4
533# 25 "/usr/include/bits/sigaction.h" 3 4
534struct sigaction
535 {
536
537
538 union
539 {
540
541 __sighandler_t sa_handler;
542
543 void (*sa_sigaction) (int, siginfo_t *, void *);
544 }
545 __sigaction_handler;
546
547
548
549
550
551
552
553 __sigset_t sa_mask;
554
555
556 int sa_flags;
557
558
559 void (*sa_restorer) (void);
560 };
561# 247 "/usr/include/signal.h" 2 3 4
562
563
564extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
565 sigset_t *__restrict __oset) __attribute__ ((__nothrow__));
566
567
568
569
570
571
572extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
573
574
575extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
576 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));
577
578
579extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
580
581
582
583
584
585
586extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
587 __attribute__ ((__nonnull__ (1, 2)));
588
589
590
591
592
593
594extern int sigwaitinfo (__const sigset_t *__restrict __set,
595 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
596
597
598
599
600
601
602extern int sigtimedwait (__const sigset_t *__restrict __set,
603 siginfo_t *__restrict __info,
604 __const struct timespec *__restrict __timeout)
605 __attribute__ ((__nonnull__ (1)));
606
607
608
609extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
610 __attribute__ ((__nothrow__));
611# 304 "/usr/include/signal.h" 3 4
612extern __const char *__const _sys_siglist[65];
613extern __const char *__const sys_siglist[65];
614
615
616struct sigvec
617 {
618 __sighandler_t sv_handler;
619 int sv_mask;
620
621 int sv_flags;
622
623 };
624# 328 "/usr/include/signal.h" 3 4
625extern int sigvec (int __sig, __const struct sigvec *__vec,
626 struct sigvec *__ovec) __attribute__ ((__nothrow__));
627
628
629
630# 1 "/usr/include/bits/sigcontext.h" 1 3 4
631# 28 "/usr/include/bits/sigcontext.h" 3 4
632# 1 "/usr/include/asm/sigcontext.h" 1 3 4
633# 11 "/usr/include/asm/sigcontext.h" 3 4
634# 1 "/usr/include/asm-i386/sigcontext.h" 1 3 4
635# 19 "/usr/include/asm-i386/sigcontext.h" 3 4
636struct _fpreg {
637 unsigned short significand[4];
638 unsigned short exponent;
639};
640
641struct _fpxreg {
642 unsigned short significand[4];
643 unsigned short exponent;
644 unsigned short padding[3];
645};
646
647struct _xmmreg {
648 unsigned long element[4];
649};
650
651struct _fpstate {
652
653 unsigned long cw;
654 unsigned long sw;
655 unsigned long tag;
656 unsigned long ipoff;
657 unsigned long cssel;
658 unsigned long dataoff;
659 unsigned long datasel;
660 struct _fpreg _st[8];
661 unsigned short status;
662 unsigned short magic;
663
664
665 unsigned long _fxsr_env[6];
666 unsigned long mxcsr;
667 unsigned long reserved;
668 struct _fpxreg _fxsr_st[8];
669 struct _xmmreg _xmm[8];
670 unsigned long padding[56];
671};
672
673
674
675struct sigcontext {
676 unsigned short gs, __gsh;
677 unsigned short fs, __fsh;
678 unsigned short es, __esh;
679 unsigned short ds, __dsh;
680 unsigned long edi;
681 unsigned long esi;
682 unsigned long ebp;
683 unsigned long esp;
684 unsigned long ebx;
685 unsigned long edx;
686 unsigned long ecx;
687 unsigned long eax;
688 unsigned long trapno;
689 unsigned long err;
690 unsigned long eip;
691 unsigned short cs, __csh;
692 unsigned long eflags;
693 unsigned long esp_at_signal;
694 unsigned short ss, __ssh;
695 struct _fpstate * fpstate;
696 unsigned long oldmask;
697 unsigned long cr2;
698};
699# 12 "/usr/include/asm/sigcontext.h" 2 3 4
700# 29 "/usr/include/bits/sigcontext.h" 2 3 4
701# 334 "/usr/include/signal.h" 2 3 4
702
703
704extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));
705# 346 "/usr/include/signal.h" 3 4
706extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));
707
708# 1 "/usr/include/bits/sigstack.h" 1 3 4
709# 26 "/usr/include/bits/sigstack.h" 3 4
710struct sigstack
711 {
712 void *ss_sp;
713 int ss_onstack;
714 };
715
716
717
718enum
719{
720 SS_ONSTACK = 1,
721
722 SS_DISABLE
723
724};
725# 50 "/usr/include/bits/sigstack.h" 3 4
726typedef struct sigaltstack
727 {
728 void *ss_sp;
729 int ss_flags;
730 size_t ss_size;
731 } stack_t;
732# 349 "/usr/include/signal.h" 2 3 4
733# 357 "/usr/include/signal.h" 3 4
734extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
735 __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));
736
737
738
739extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
740 struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));
741# 386 "/usr/include/signal.h" 3 4
742# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
743# 23 "/usr/include/bits/pthreadtypes.h" 3 4
744# 1 "/usr/include/bits/sched.h" 1 3 4
745# 83 "/usr/include/bits/sched.h" 3 4
746struct __sched_param
747 {
748 int __sched_priority;
749 };
750# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
751
752typedef int __atomic_lock_t;
753
754
755struct _pthread_fastlock
756{
757 long int __status;
758 __atomic_lock_t __spinlock;
759
760};
761
762
763
764typedef struct _pthread_descr_struct *_pthread_descr;
765
766
767
768
769
770typedef struct __pthread_attr_s
771{
772 int __detachstate;
773 int __schedpolicy;
774 struct __sched_param __schedparam;
775 int __inheritsched;
776 int __scope;
777 size_t __guardsize;
778 int __stackaddr_set;
779 void *__stackaddr;
780 size_t __stacksize;
781} pthread_attr_t;
782
783
784
785
786
787__extension__ typedef long long __pthread_cond_align_t;
788
789
790
791
792typedef struct
793{
794 struct _pthread_fastlock __c_lock;
795 _pthread_descr __c_waiting;
796 char __padding[48 - sizeof (struct _pthread_fastlock)
797 - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
798 __pthread_cond_align_t __align;
799} pthread_cond_t;
800
801
802
803typedef struct
804{
805 int __dummy;
806} pthread_condattr_t;
807
808
809typedef unsigned int pthread_key_t;
810
811
812
813
814
815typedef struct
816{
817 int __m_reserved;
818 int __m_count;
819 _pthread_descr __m_owner;
820 int __m_kind;
821 struct _pthread_fastlock __m_lock;
822} pthread_mutex_t;
823
824
825
826typedef struct
827{
828 int __mutexkind;
829} pthread_mutexattr_t;
830
831
832
833typedef int pthread_once_t;
834# 152 "/usr/include/bits/pthreadtypes.h" 3 4
835typedef unsigned long int pthread_t;
836# 387 "/usr/include/signal.h" 2 3 4
837# 1 "/usr/include/bits/sigthread.h" 1 3 4
838# 31 "/usr/include/bits/sigthread.h" 3 4
839extern int pthread_sigmask (int __how,
840 __const __sigset_t *__restrict __newmask,
841 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));
842
843
844extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));
845# 388 "/usr/include/signal.h" 2 3 4
846
847
848
849
850
851
852extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));
853
854extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));
855
856
857
858
859# 62 "netlib.c" 2
860
861
862
863# 1 "/usr/include/sys/types.h" 1 3 4
864# 29 "/usr/include/sys/types.h" 3 4
865
866
867
868
869
870
871typedef __u_char u_char;
872typedef __u_short u_short;
873typedef __u_int u_int;
874typedef __u_long u_long;
875typedef __quad_t quad_t;
876typedef __u_quad_t u_quad_t;
877typedef __fsid_t fsid_t;
878
879
880
881
882typedef __loff_t loff_t;
883
884
885
886typedef __ino_t ino_t;
887# 62 "/usr/include/sys/types.h" 3 4
888typedef __dev_t dev_t;
889
890
891
892
893typedef __gid_t gid_t;
894
895
896
897
898typedef __mode_t mode_t;
899
900
901
902
903typedef __nlink_t nlink_t;
904
905
906
907
908typedef __uid_t uid_t;
909
910
911
912
913
914typedef __off_t off_t;
915# 100 "/usr/include/sys/types.h" 3 4
916typedef __pid_t pid_t;
917
918
919
920
921typedef __id_t id_t;
922
923
924
925
926typedef __ssize_t ssize_t;
927
928
929
930
931
932typedef __daddr_t daddr_t;
933typedef __caddr_t caddr_t;
934
935
936
937
938
939typedef __key_t key_t;
940# 133 "/usr/include/sys/types.h" 3 4
941# 1 "/usr/include/time.h" 1 3 4
942# 74 "/usr/include/time.h" 3 4
943
944
945typedef __time_t time_t;
946
947
948
949# 92 "/usr/include/time.h" 3 4
950typedef __clockid_t clockid_t;
951# 104 "/usr/include/time.h" 3 4
952typedef __timer_t timer_t;
953# 134 "/usr/include/sys/types.h" 2 3 4
954# 147 "/usr/include/sys/types.h" 3 4
955# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
956# 148 "/usr/include/sys/types.h" 2 3 4
957
958
959
960typedef unsigned long int ulong;
961typedef unsigned short int ushort;
962typedef unsigned int uint;
963# 191 "/usr/include/sys/types.h" 3 4
964typedef int int8_t __attribute__ ((__mode__ (__QI__)));
965typedef int int16_t __attribute__ ((__mode__ (__HI__)));
966typedef int int32_t __attribute__ ((__mode__ (__SI__)));
967typedef int int64_t __attribute__ ((__mode__ (__DI__)));
968
969
970typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
971typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
972typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
973typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
974
975typedef int register_t __attribute__ ((__mode__ (__word__)));
976# 213 "/usr/include/sys/types.h" 3 4
977# 1 "/usr/include/endian.h" 1 3 4
978# 37 "/usr/include/endian.h" 3 4
979# 1 "/usr/include/bits/endian.h" 1 3 4
980# 38 "/usr/include/endian.h" 2 3 4
981# 214 "/usr/include/sys/types.h" 2 3 4
982
983
984# 1 "/usr/include/sys/select.h" 1 3 4
985# 31 "/usr/include/sys/select.h" 3 4
986# 1 "/usr/include/bits/select.h" 1 3 4
987# 32 "/usr/include/sys/select.h" 2 3 4
988
989
990# 1 "/usr/include/bits/sigset.h" 1 3 4
991# 35 "/usr/include/sys/select.h" 2 3 4
992# 44 "/usr/include/sys/select.h" 3 4
993# 1 "/usr/include/time.h" 1 3 4
994# 45 "/usr/include/sys/select.h" 2 3 4
995
996# 1 "/usr/include/bits/time.h" 1 3 4
997# 69 "/usr/include/bits/time.h" 3 4
998struct timeval
999 {
1000 __time_t tv_sec;
1001 __suseconds_t tv_usec;
1002 };
1003# 47 "/usr/include/sys/select.h" 2 3 4
1004
1005
1006typedef __suseconds_t suseconds_t;
1007
1008
1009
1010
1011
1012typedef long int __fd_mask;
1013# 67 "/usr/include/sys/select.h" 3 4
1014typedef struct
1015 {
1016
1017
1018
1019
1020
1021
1022 __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
1023
1024
1025 } fd_set;
1026
1027
1028
1029
1030
1031
1032typedef __fd_mask fd_mask;
1033# 99 "/usr/include/sys/select.h" 3 4
1034
1035# 109 "/usr/include/sys/select.h" 3 4
1036extern int select (int __nfds, fd_set *__restrict __readfds,
1037 fd_set *__restrict __writefds,
1038 fd_set *__restrict __exceptfds,
1039 struct timeval *__restrict __timeout);
1040# 128 "/usr/include/sys/select.h" 3 4
1041
1042# 217 "/usr/include/sys/types.h" 2 3 4
1043
1044
1045# 1 "/usr/include/sys/sysmacros.h" 1 3 4
1046# 29 "/usr/include/sys/sysmacros.h" 3 4
1047__extension__
1048extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
1049 __attribute__ ((__nothrow__));
1050__extension__
1051extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
1052 __attribute__ ((__nothrow__));
1053__extension__
1054extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
1055 unsigned int __minor)
1056 __attribute__ ((__nothrow__));
1057
1058
1059__extension__ extern __inline unsigned int
1060__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
1061{
1062 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
1063}
1064
1065__extension__ extern __inline unsigned int
1066__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
1067{
1068 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
1069}
1070
1071__extension__ extern __inline unsigned long long int
1072__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
1073{
1074 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
1075 | (((unsigned long long int) (__minor & ~0xff)) << 12)
1076 | (((unsigned long long int) (__major & ~0xfff)) << 32));
1077}
1078# 220 "/usr/include/sys/types.h" 2 3 4
1079# 231 "/usr/include/sys/types.h" 3 4
1080typedef __blkcnt_t blkcnt_t;
1081
1082
1083
1084typedef __fsblkcnt_t fsblkcnt_t;
1085
1086
1087
1088typedef __fsfilcnt_t fsfilcnt_t;
1089# 266 "/usr/include/sys/types.h" 3 4
1090# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
1091# 267 "/usr/include/sys/types.h" 2 3 4
1092
1093
1094
1095# 66 "netlib.c" 2
1096# 1 "/usr/include/fcntl.h" 1 3 4
1097# 29 "/usr/include/fcntl.h" 3 4
1098
1099
1100
1101
1102# 1 "/usr/include/bits/fcntl.h" 1 3 4
1103# 138 "/usr/include/bits/fcntl.h" 3 4
1104struct flock
1105 {
1106 short int l_type;
1107 short int l_whence;
1108
1109 __off_t l_start;
1110 __off_t l_len;
1111
1112
1113
1114
1115 __pid_t l_pid;
1116 };
1117# 183 "/usr/include/bits/fcntl.h" 3 4
1118
1119
1120
1121extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
1122 __attribute__ ((__nothrow__));
1123
1124
1125# 34 "/usr/include/fcntl.h" 2 3 4
1126# 63 "/usr/include/fcntl.h" 3 4
1127extern int fcntl (int __fd, int __cmd, ...);
1128# 72 "/usr/include/fcntl.h" 3 4
1129extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
1130# 91 "/usr/include/fcntl.h" 3 4
1131extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
1132# 120 "/usr/include/fcntl.h" 3 4
1133extern int lockf (int __fd, int __cmd, __off_t __len);
1134# 174 "/usr/include/fcntl.h" 3 4
1135
1136# 67 "netlib.c" 2
1137# 1 "/usr/include/stdio.h" 1 3 4
1138# 30 "/usr/include/stdio.h" 3 4
1139
1140
1141
1142
1143# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
1144# 35 "/usr/include/stdio.h" 2 3 4
1145# 44 "/usr/include/stdio.h" 3 4
1146
1147
1148typedef struct _IO_FILE FILE;
1149
1150
1151
1152
1153
1154# 62 "/usr/include/stdio.h" 3 4
1155typedef struct _IO_FILE __FILE;
1156# 72 "/usr/include/stdio.h" 3 4
1157# 1 "/usr/include/libio.h" 1 3 4
1158# 32 "/usr/include/libio.h" 3 4
1159# 1 "/usr/include/_G_config.h" 1 3 4
1160# 14 "/usr/include/_G_config.h" 3 4
1161# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
1162# 326 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 3 4
1163typedef int wchar_t;
1164# 355 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 3 4
1165typedef unsigned int wint_t;
1166# 15 "/usr/include/_G_config.h" 2 3 4
1167# 24 "/usr/include/_G_config.h" 3 4
1168# 1 "/usr/include/wchar.h" 1 3 4
1169# 48 "/usr/include/wchar.h" 3 4
1170# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
1171# 49 "/usr/include/wchar.h" 2 3 4
1172
1173# 1 "/usr/include/bits/wchar.h" 1 3 4
1174# 51 "/usr/include/wchar.h" 2 3 4
1175# 76 "/usr/include/wchar.h" 3 4
1176typedef struct
1177{
1178 int __count;
1179 union
1180 {
1181 wint_t __wch;
1182 char __wchb[4];
1183 } __value;
1184} __mbstate_t;
1185# 25 "/usr/include/_G_config.h" 2 3 4
1186
1187typedef struct
1188{
1189 __off_t __pos;
1190 __mbstate_t __state;
1191} _G_fpos_t;
1192typedef struct
1193{
1194 __off64_t __pos;
1195 __mbstate_t __state;
1196} _G_fpos64_t;
1197# 44 "/usr/include/_G_config.h" 3 4
1198# 1 "/usr/include/gconv.h" 1 3 4
1199# 28 "/usr/include/gconv.h" 3 4
1200# 1 "/usr/include/wchar.h" 1 3 4
1201# 48 "/usr/include/wchar.h" 3 4
1202# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
1203# 49 "/usr/include/wchar.h" 2 3 4
1204# 29 "/usr/include/gconv.h" 2 3 4
1205
1206
1207# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
1208# 32 "/usr/include/gconv.h" 2 3 4
1209
1210
1211
1212
1213
1214enum
1215{
1216 __GCONV_OK = 0,
1217 __GCONV_NOCONV,
1218 __GCONV_NODB,
1219 __GCONV_NOMEM,
1220
1221 __GCONV_EMPTY_INPUT,
1222 __GCONV_FULL_OUTPUT,
1223 __GCONV_ILLEGAL_INPUT,
1224 __GCONV_INCOMPLETE_INPUT,
1225
1226 __GCONV_ILLEGAL_DESCRIPTOR,
1227 __GCONV_INTERNAL_ERROR
1228};
1229
1230
1231
1232enum
1233{
1234 __GCONV_IS_LAST = 0x0001,
1235 __GCONV_IGNORE_ERRORS = 0x0002
1236};
1237
1238
1239
1240struct __gconv_step;
1241struct __gconv_step_data;
1242struct __gconv_loaded_object;
1243struct __gconv_trans_data;
1244
1245
1246
1247typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
1248 __const unsigned char **, __const unsigned char *,
1249 unsigned char **, size_t *, int, int);
1250
1251
1252typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
1253
1254
1255typedef int (*__gconv_init_fct) (struct __gconv_step *);
1256typedef void (*__gconv_end_fct) (struct __gconv_step *);
1257
1258
1259
1260typedef int (*__gconv_trans_fct) (struct __gconv_step *,
1261 struct __gconv_step_data *, void *,
1262 __const unsigned char *,
1263 __const unsigned char **,
1264 __const unsigned char *, unsigned char **,
1265 size_t *);
1266
1267
1268typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
1269 __const unsigned char *,
1270 unsigned char *, unsigned char *);
1271
1272
1273typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
1274 size_t *);
1275
1276
1277typedef int (*__gconv_trans_init_fct) (void **, const char *);
1278typedef void (*__gconv_trans_end_fct) (void *);
1279
1280struct __gconv_trans_data
1281{
1282
1283 __gconv_trans_fct __trans_fct;
1284 __gconv_trans_context_fct __trans_context_fct;
1285 __gconv_trans_end_fct __trans_end_fct;
1286 void *__data;
1287 struct __gconv_trans_data *__next;
1288};
1289
1290
1291
1292struct __gconv_step
1293{
1294 struct __gconv_loaded_object *__shlib_handle;
1295 __const char *__modname;
1296
1297 int __counter;
1298
1299 char *__from_name;
1300 char *__to_name;
1301
1302 __gconv_fct __fct;
1303 __gconv_btowc_fct __btowc_fct;
1304 __gconv_init_fct __init_fct;
1305 __gconv_end_fct __end_fct;
1306
1307
1308
1309 int __min_needed_from;
1310 int __max_needed_from;
1311 int __min_needed_to;
1312 int __max_needed_to;
1313
1314
1315 int __stateful;
1316
1317 void *__data;
1318};
1319
1320
1321
1322struct __gconv_step_data
1323{
1324 unsigned char *__outbuf;
1325 unsigned char *__outbufend;
1326
1327
1328
1329 int __flags;
1330
1331
1332
1333 int __invocation_counter;
1334
1335
1336
1337 int __internal_use;
1338
1339 __mbstate_t *__statep;
1340 __mbstate_t __state;
1341
1342
1343
1344 struct __gconv_trans_data *__trans;
1345};
1346
1347
1348
1349typedef struct __gconv_info
1350{
1351 size_t __nsteps;
1352 struct __gconv_step *__steps;
1353 __extension__ struct __gconv_step_data __data [];
1354} *__gconv_t;
1355# 45 "/usr/include/_G_config.h" 2 3 4
1356typedef union
1357{
1358 struct __gconv_info __cd;
1359 struct
1360 {
1361 struct __gconv_info __cd;
1362 struct __gconv_step_data __data;
1363 } __combined;
1364} _G_iconv_t;
1365
1366typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
1367typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
1368typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
1369typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
1370# 33 "/usr/include/libio.h" 2 3 4
1371# 53 "/usr/include/libio.h" 3 4
1372# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 1 3 4
1373# 43 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 3 4
1374typedef __builtin_va_list __gnuc_va_list;
1375# 54 "/usr/include/libio.h" 2 3 4
1376# 166 "/usr/include/libio.h" 3 4
1377struct _IO_jump_t; struct _IO_FILE;
1378# 176 "/usr/include/libio.h" 3 4
1379typedef void _IO_lock_t;
1380
1381
1382
1383
1384
1385struct _IO_marker {
1386 struct _IO_marker *_next;
1387 struct _IO_FILE *_sbuf;
1388
1389
1390
1391 int _pos;
1392# 199 "/usr/include/libio.h" 3 4
1393};
1394
1395
1396enum __codecvt_result
1397{
1398 __codecvt_ok,
1399 __codecvt_partial,
1400 __codecvt_error,
1401 __codecvt_noconv
1402};
1403# 267 "/usr/include/libio.h" 3 4
1404struct _IO_FILE {
1405 int _flags;
1406
1407
1408
1409
1410 char* _IO_read_ptr;
1411 char* _IO_read_end;
1412 char* _IO_read_base;
1413 char* _IO_write_base;
1414 char* _IO_write_ptr;
1415 char* _IO_write_end;
1416 char* _IO_buf_base;
1417 char* _IO_buf_end;
1418
1419 char *_IO_save_base;
1420 char *_IO_backup_base;
1421 char *_IO_save_end;
1422
1423 struct _IO_marker *_markers;
1424
1425 struct _IO_FILE *_chain;
1426
1427 int _fileno;
1428
1429
1430
1431 int _flags2;
1432
1433 __off_t _old_offset;
1434
1435
1436
1437 unsigned short _cur_column;
1438 signed char _vtable_offset;
1439 char _shortbuf[1];
1440
1441
1442
1443 _IO_lock_t *_lock;
1444# 315 "/usr/include/libio.h" 3 4
1445 __off64_t _offset;
1446
1447
1448
1449
1450
1451 void *__pad1;
1452 void *__pad2;
1453
1454 int _mode;
1455
1456 char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];
1457
1458};
1459
1460
1461typedef struct _IO_FILE _IO_FILE;
1462
1463
1464struct _IO_FILE_plus;
1465
1466extern struct _IO_FILE_plus _IO_2_1_stdin_;
1467extern struct _IO_FILE_plus _IO_2_1_stdout_;
1468extern struct _IO_FILE_plus _IO_2_1_stderr_;
1469# 354 "/usr/include/libio.h" 3 4
1470typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
1471
1472
1473
1474
1475
1476
1477
1478typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
1479 size_t __n);
1480
1481
1482
1483
1484
1485
1486
1487typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
1488
1489
1490typedef int __io_close_fn (void *__cookie);
1491# 406 "/usr/include/libio.h" 3 4
1492extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
1493extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
1494extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
1495extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
1496extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
1497extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
1498# 444 "/usr/include/libio.h" 3 4
1499extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
1500extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
1501extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
1502extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
1503
1504extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));
1505
1506
1507
1508
1509
1510extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
1511extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
1512extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
1513# 474 "/usr/include/libio.h" 3 4
1514extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
1515 __gnuc_va_list, int *__restrict) __attribute__ ((__nothrow__));
1516extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
1517 __gnuc_va_list) __attribute__ ((__nothrow__));
1518extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
1519extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));
1520
1521extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
1522extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));
1523
1524extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
1525# 73 "/usr/include/stdio.h" 2 3 4
1526# 86 "/usr/include/stdio.h" 3 4
1527
1528
1529typedef _G_fpos_t fpos_t;
1530
1531
1532
1533
1534# 138 "/usr/include/stdio.h" 3 4
1535# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
1536# 139 "/usr/include/stdio.h" 2 3 4
1537
1538
1539
1540extern struct _IO_FILE *stdin;
1541extern struct _IO_FILE *stdout;
1542extern struct _IO_FILE *stderr;
1543
1544
1545
1546
1547
1548
1549
1550extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
1551
1552extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562extern FILE *tmpfile (void);
1563# 178 "/usr/include/stdio.h" 3 4
1564extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
1565
1566
1567
1568
1569
1570extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
1571# 196 "/usr/include/stdio.h" 3 4
1572extern char *tempnam (__const char *__dir, __const char *__pfx)
1573 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
1574
1575
1576
1577
1578
1579
1580
1581
1582extern int fclose (FILE *__stream);
1583
1584
1585
1586
1587extern int fflush (FILE *__stream);
1588
1589# 221 "/usr/include/stdio.h" 3 4
1590extern int fflush_unlocked (FILE *__stream);
1591# 235 "/usr/include/stdio.h" 3 4
1592
1593
1594
1595
1596
1597
1598extern FILE *fopen (__const char *__restrict __filename,
1599 __const char *__restrict __modes);
1600
1601
1602
1603
1604extern FILE *freopen (__const char *__restrict __filename,
1605 __const char *__restrict __modes,
1606 FILE *__restrict __stream);
1607# 262 "/usr/include/stdio.h" 3 4
1608
1609# 273 "/usr/include/stdio.h" 3 4
1610extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
1611# 294 "/usr/include/stdio.h" 3 4
1612
1613
1614
1615extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
1616
1617
1618
1619extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
1620 int __modes, size_t __n) __attribute__ ((__nothrow__));
1621
1622
1623
1624
1625
1626extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
1627 size_t __size) __attribute__ ((__nothrow__));
1628
1629
1630extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
1631
1632
1633
1634
1635
1636
1637
1638
1639extern int fprintf (FILE *__restrict __stream,
1640 __const char *__restrict __format, ...);
1641
1642
1643
1644
1645extern int printf (__const char *__restrict __format, ...);
1646
1647extern int sprintf (char *__restrict __s,
1648 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1649
1650
1651
1652
1653
1654extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
1655 __gnuc_va_list __arg);
1656
1657
1658
1659
1660extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
1661
1662extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
1663 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
1664
1665
1666
1667
1668
1669extern int snprintf (char *__restrict __s, size_t __maxlen,
1670 __const char *__restrict __format, ...)
1671 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
1672
1673extern int vsnprintf (char *__restrict __s, size_t __maxlen,
1674 __const char *__restrict __format, __gnuc_va_list __arg)
1675 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
1676
1677# 388 "/usr/include/stdio.h" 3 4
1678
1679
1680
1681
1682
1683extern int fscanf (FILE *__restrict __stream,
1684 __const char *__restrict __format, ...);
1685
1686
1687
1688
1689extern int scanf (__const char *__restrict __format, ...);
1690
1691extern int sscanf (__const char *__restrict __s,
1692 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1693
1694# 430 "/usr/include/stdio.h" 3 4
1695
1696
1697
1698
1699
1700extern int fgetc (FILE *__stream);
1701extern int getc (FILE *__stream);
1702
1703
1704
1705
1706
1707extern int getchar (void);
1708
1709# 454 "/usr/include/stdio.h" 3 4
1710extern int getc_unlocked (FILE *__stream);
1711extern int getchar_unlocked (void);
1712# 465 "/usr/include/stdio.h" 3 4
1713extern int fgetc_unlocked (FILE *__stream);
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725extern int fputc (int __c, FILE *__stream);
1726extern int putc (int __c, FILE *__stream);
1727
1728
1729
1730
1731
1732extern int putchar (int __c);
1733
1734# 498 "/usr/include/stdio.h" 3 4
1735extern int fputc_unlocked (int __c, FILE *__stream);
1736
1737
1738
1739
1740
1741
1742
1743extern int putc_unlocked (int __c, FILE *__stream);
1744extern int putchar_unlocked (int __c);
1745
1746
1747
1748
1749
1750
1751extern int getw (FILE *__stream);
1752
1753
1754extern int putw (int __w, FILE *__stream);
1755
1756
1757
1758
1759
1760
1761
1762
1763extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
1764
1765
1766
1767
1768
1769
1770extern char *gets (char *__s);
1771
1772# 578 "/usr/include/stdio.h" 3 4
1773
1774
1775
1776
1777
1778extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
1779
1780
1781
1782
1783
1784extern int puts (__const char *__s);
1785
1786
1787
1788
1789
1790
1791extern int ungetc (int __c, FILE *__stream);
1792
1793
1794
1795
1796
1797
1798extern size_t fread (void *__restrict __ptr, size_t __size,
1799 size_t __n, FILE *__restrict __stream);
1800
1801
1802
1803
1804extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
1805 size_t __n, FILE *__restrict __s);
1806
1807# 631 "/usr/include/stdio.h" 3 4
1808extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
1809 size_t __n, FILE *__restrict __stream);
1810extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
1811 size_t __n, FILE *__restrict __stream);
1812
1813
1814
1815
1816
1817
1818
1819
1820extern int fseek (FILE *__stream, long int __off, int __whence);
1821
1822
1823
1824
1825extern long int ftell (FILE *__stream);
1826
1827
1828
1829
1830extern void rewind (FILE *__stream);
1831
1832# 686 "/usr/include/stdio.h" 3 4
1833
1834
1835
1836
1837
1838
1839extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
1840
1841
1842
1843
1844extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
1845# 709 "/usr/include/stdio.h" 3 4
1846
1847# 718 "/usr/include/stdio.h" 3 4
1848
1849
1850extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
1851
1852extern int feof (FILE *__stream) __attribute__ ((__nothrow__));
1853
1854extern int ferror (FILE *__stream) __attribute__ ((__nothrow__));
1855
1856
1857
1858
1859extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1860extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1861extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1862
1863
1864
1865
1866
1867
1868
1869
1870extern void perror (__const char *__s);
1871
1872
1873
1874
1875
1876
1877# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
1878# 27 "/usr/include/bits/sys_errlist.h" 3 4
1879extern int sys_nerr;
1880extern __const char *__const sys_errlist[];
1881# 748 "/usr/include/stdio.h" 2 3 4
1882
1883
1884
1885
1886extern int fileno (FILE *__stream) __attribute__ ((__nothrow__));
1887
1888
1889
1890
1891extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1892# 767 "/usr/include/stdio.h" 3 4
1893extern FILE *popen (__const char *__command, __const char *__modes);
1894
1895
1896
1897
1898
1899extern int pclose (FILE *__stream);
1900
1901
1902
1903
1904
1905extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
1906# 807 "/usr/include/stdio.h" 3 4
1907extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
1908
1909
1910
1911extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__));
1912
1913
1914extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
1915# 828 "/usr/include/stdio.h" 3 4
1916# 1 "/usr/include/bits/stdio.h" 1 3 4
1917# 33 "/usr/include/bits/stdio.h" 3 4
1918extern __inline int
1919vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
1920{
1921 return vfprintf (stdout, __fmt, __arg);
1922}
1923
1924
1925extern __inline int
1926getchar (void)
1927{
1928 return _IO_getc (stdin);
1929}
1930
1931
1932
1933
1934extern __inline int
1935getc_unlocked (FILE *__fp)
1936{
1937 return (__builtin_expect ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end, 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
1938}
1939
1940
1941extern __inline int
1942getchar_unlocked (void)
1943{
1944 return (__builtin_expect ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end, 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
1945}
1946
1947
1948
1949
1950extern __inline int
1951putchar (int __c)
1952{
1953 return _IO_putc (__c, stdout);
1954}
1955
1956
1957
1958
1959extern __inline int
1960fputc_unlocked (int __c, FILE *__stream)
1961{
1962 return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1963}
1964
1965
1966
1967
1968
1969extern __inline int
1970putc_unlocked (int __c, FILE *__stream)
1971{
1972 return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1973}
1974
1975
1976extern __inline int
1977putchar_unlocked (int __c)
1978{
1979 return (__builtin_expect ((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end, 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
1980}
1981# 111 "/usr/include/bits/stdio.h" 3 4
1982extern __inline int
1983__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
1984{
1985 return (((__stream)->_flags & 0x10) != 0);
1986}
1987
1988
1989extern __inline int
1990__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
1991{
1992 return (((__stream)->_flags & 0x20) != 0);
1993}
1994# 829 "/usr/include/stdio.h" 2 3 4
1995
1996
1997
1998
1999
2000
2001# 68 "netlib.c" 2
2002# 1 "/usr/include/stdlib.h" 1 3 4
2003# 33 "/usr/include/stdlib.h" 3 4
2004# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
2005# 34 "/usr/include/stdlib.h" 2 3 4
2006
2007
2008# 96 "/usr/include/stdlib.h" 3 4
2009
2010
2011typedef struct
2012 {
2013 int quot;
2014 int rem;
2015 } div_t;
2016
2017
2018
2019typedef struct
2020 {
2021 long int quot;
2022 long int rem;
2023 } ldiv_t;
2024
2025
2026
2027# 140 "/usr/include/stdlib.h" 3 4
2028extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__));
2029
2030
2031
2032
2033extern double atof (__const char *__nptr)
2034 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2035
2036extern int atoi (__const char *__nptr)
2037 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2038
2039extern long int atol (__const char *__nptr)
2040 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2041
2042
2043
2044
2045
2046__extension__ extern long long int atoll (__const char *__nptr)
2047 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2048
2049
2050
2051
2052
2053extern double strtod (__const char *__restrict __nptr,
2054 char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2055
2056# 181 "/usr/include/stdlib.h" 3 4
2057
2058
2059extern long int strtol (__const char *__restrict __nptr,
2060 char **__restrict __endptr, int __base)
2061 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2062
2063extern unsigned long int strtoul (__const char *__restrict __nptr,
2064 char **__restrict __endptr, int __base)
2065 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2066
2067
2068
2069
2070__extension__
2071extern long long int strtoq (__const char *__restrict __nptr,
2072 char **__restrict __endptr, int __base)
2073 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2074
2075__extension__
2076extern unsigned long long int strtouq (__const char *__restrict __nptr,
2077 char **__restrict __endptr, int __base)
2078 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2079
2080
2081
2082
2083
2084__extension__
2085extern long long int strtoll (__const char *__restrict __nptr,
2086 char **__restrict __endptr, int __base)
2087 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2088
2089__extension__
2090extern unsigned long long int strtoull (__const char *__restrict __nptr,
2091 char **__restrict __endptr, int __base)
2092 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2093
2094# 277 "/usr/include/stdlib.h" 3 4
2095extern double __strtod_internal (__const char *__restrict __nptr,
2096 char **__restrict __endptr, int __group)
2097 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2098extern float __strtof_internal (__const char *__restrict __nptr,
2099 char **__restrict __endptr, int __group)
2100 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2101extern long double __strtold_internal (__const char *__restrict __nptr,
2102 char **__restrict __endptr,
2103 int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2104
2105extern long int __strtol_internal (__const char *__restrict __nptr,
2106 char **__restrict __endptr,
2107 int __base, int __group)
2108 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2109
2110
2111
2112extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
2113 char **__restrict __endptr,
2114 int __base, int __group)
2115 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2116
2117
2118
2119
2120__extension__
2121extern long long int __strtoll_internal (__const char *__restrict __nptr,
2122 char **__restrict __endptr,
2123 int __base, int __group)
2124 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2125
2126
2127
2128__extension__
2129extern unsigned long long int __strtoull_internal (__const char *
2130 __restrict __nptr,
2131 char **__restrict __endptr,
2132 int __base, int __group)
2133 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2134
2135
2136
2137
2138
2139
2140
2141
2142extern __inline double
2143__attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr)
2144{
2145 return __strtod_internal (__nptr, __endptr, 0);
2146}
2147extern __inline long int
2148__attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2149
2150{
2151 return __strtol_internal (__nptr, __endptr, __base, 0);
2152}
2153extern __inline unsigned long int
2154__attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2155
2156{
2157 return __strtoul_internal (__nptr, __endptr, __base, 0);
2158}
2159
2160# 359 "/usr/include/stdlib.h" 3 4
2161__extension__ extern __inline long long int
2162__attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2163
2164{
2165 return __strtoll_internal (__nptr, __endptr, __base, 0);
2166}
2167__extension__ extern __inline unsigned long long int
2168__attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2169
2170{
2171 return __strtoull_internal (__nptr, __endptr, __base, 0);
2172}
2173
2174
2175
2176
2177__extension__ extern __inline long long int
2178__attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base)
2179
2180{
2181 return __strtoll_internal (__nptr, __endptr, __base, 0);
2182}
2183__extension__ extern __inline unsigned long long int
2184__attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base)
2185
2186{
2187 return __strtoull_internal (__nptr, __endptr, __base, 0);
2188}
2189
2190
2191
2192
2193extern __inline double
2194__attribute__ ((__nothrow__)) atof (__const char *__nptr)
2195{
2196 return strtod (__nptr, (char **) ((void *)0));
2197}
2198extern __inline int
2199__attribute__ ((__nothrow__)) atoi (__const char *__nptr)
2200{
2201 return (int) strtol (__nptr, (char **) ((void *)0), 10);
2202}
2203extern __inline long int
2204__attribute__ ((__nothrow__)) atol (__const char *__nptr)
2205{
2206 return strtol (__nptr, (char **) ((void *)0), 10);
2207}
2208
2209
2210
2211
2212__extension__ extern __inline long long int
2213__attribute__ ((__nothrow__)) atoll (__const char *__nptr)
2214{
2215 return strtoll (__nptr, (char **) ((void *)0), 10);
2216}
2217
2218# 424 "/usr/include/stdlib.h" 3 4
2219extern char *l64a (long int __n) __attribute__ ((__nothrow__));
2220
2221
2222extern long int a64l (__const char *__s)
2223 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2224# 440 "/usr/include/stdlib.h" 3 4
2225extern long int random (void) __attribute__ ((__nothrow__));
2226
2227
2228extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
2229
2230
2231
2232
2233
2234extern char *initstate (unsigned int __seed, char *__statebuf,
2235 size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2236
2237
2238
2239extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2240
2241
2242
2243
2244
2245
2246
2247struct random_data
2248 {
2249 int32_t *fptr;
2250 int32_t *rptr;
2251 int32_t *state;
2252 int rand_type;
2253 int rand_deg;
2254 int rand_sep;
2255 int32_t *end_ptr;
2256 };
2257
2258extern int random_r (struct random_data *__restrict __buf,
2259 int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2260
2261extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2262 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2263
2264extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2265 size_t __statelen,
2266 struct random_data *__restrict __buf)
2267 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
2268
2269extern int setstate_r (char *__restrict __statebuf,
2270 struct random_data *__restrict __buf)
2271 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2272
2273
2274
2275
2276
2277
2278extern int rand (void) __attribute__ ((__nothrow__));
2279
2280extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
2281
2282
2283
2284
2285extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
2286
2287
2288
2289
2290
2291
2292
2293extern double drand48 (void) __attribute__ ((__nothrow__));
2294extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2295
2296
2297extern long int lrand48 (void) __attribute__ ((__nothrow__));
2298extern long int nrand48 (unsigned short int __xsubi[3])
2299 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2300
2301
2302extern long int mrand48 (void) __attribute__ ((__nothrow__));
2303extern long int jrand48 (unsigned short int __xsubi[3])
2304 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2305
2306
2307extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
2308extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2309 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2310extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2311
2312
2313
2314
2315
2316struct drand48_data
2317 {
2318 unsigned short int __x[3];
2319 unsigned short int __old_x[3];
2320 unsigned short int __c;
2321 unsigned short int __init;
2322 unsigned long long int __a;
2323 };
2324
2325
2326extern int drand48_r (struct drand48_data *__restrict __buffer,
2327 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2328extern int erand48_r (unsigned short int __xsubi[3],
2329 struct drand48_data *__restrict __buffer,
2330 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2331
2332
2333extern int lrand48_r (struct drand48_data *__restrict __buffer,
2334 long int *__restrict __result)
2335 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2336extern int nrand48_r (unsigned short int __xsubi[3],
2337 struct drand48_data *__restrict __buffer,
2338 long int *__restrict __result)
2339 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2340
2341
2342extern int mrand48_r (struct drand48_data *__restrict __buffer,
2343 long int *__restrict __result)
2344 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2345extern int jrand48_r (unsigned short int __xsubi[3],
2346 struct drand48_data *__restrict __buffer,
2347 long int *__restrict __result)
2348 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2349
2350
2351extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2352 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2353
2354extern int seed48_r (unsigned short int __seed16v[3],
2355 struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2356
2357extern int lcong48_r (unsigned short int __param[7],
2358 struct drand48_data *__buffer)
2359 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
2370
2371extern void *calloc (size_t __nmemb, size_t __size)
2372 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
2373
2374
2375
2376
2377
2378
2379
2380extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
2381
2382extern void free (void *__ptr) __attribute__ ((__nothrow__));
2383
2384
2385
2386
2387extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
2388
2389
2390
2391# 1 "/usr/include/alloca.h" 1 3 4
2392# 25 "/usr/include/alloca.h" 3 4
2393# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
2394# 26 "/usr/include/alloca.h" 2 3 4
2395
2396
2397
2398
2399
2400
2401
2402extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
2403
2404
2405
2406
2407
2408
2409# 607 "/usr/include/stdlib.h" 2 3 4
2410
2411
2412
2413
2414extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
2415# 620 "/usr/include/stdlib.h" 3 4
2416
2417
2418extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2419
2420
2421
2422extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2423
2424
2425
2426
2427
2428extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2429 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2430
2431
2432
2433
2434
2435
2436extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2437
2438# 652 "/usr/include/stdlib.h" 3 4
2439
2440
2441extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2442
2443
2444
2445
2446extern char *__secure_getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2447
2448
2449
2450
2451
2452extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2453
2454
2455
2456
2457
2458extern int setenv (__const char *__name, __const char *__value, int __replace)
2459 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2460
2461
2462extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));
2463
2464
2465
2466
2467
2468
2469extern int clearenv (void) __attribute__ ((__nothrow__));
2470# 691 "/usr/include/stdlib.h" 3 4
2471extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2472# 702 "/usr/include/stdlib.h" 3 4
2473extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1)));
2474# 721 "/usr/include/stdlib.h" 3 4
2475extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2476
2477
2478
2479
2480
2481
2482
2483
2484extern int system (__const char *__command);
2485
2486# 749 "/usr/include/stdlib.h" 3 4
2487extern char *realpath (__const char *__restrict __name,
2488 char *__restrict __resolved) __attribute__ ((__nothrow__));
2489
2490
2491
2492
2493
2494
2495typedef int (*__compar_fn_t) (__const void *, __const void *);
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505extern void *bsearch (__const void *__key, __const void *__base,
2506 size_t __nmemb, size_t __size, __compar_fn_t __compar)
2507 __attribute__ ((__nonnull__ (1, 2, 5)));
2508
2509
2510
2511extern void qsort (void *__base, size_t __nmemb, size_t __size,
2512 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2513
2514
2515
2516extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2517extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530extern div_t div (int __numer, int __denom)
2531 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2532extern ldiv_t ldiv (long int __numer, long int __denom)
2533 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2534
2535# 814 "/usr/include/stdlib.h" 3 4
2536extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2537 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
2538
2539
2540
2541
2542extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2543 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
2544
2545
2546
2547
2548extern char *gcvt (double __value, int __ndigit, char *__buf)
2549 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
2550
2551
2552
2553
2554extern char *qecvt (long double __value, int __ndigit,
2555 int *__restrict __decpt, int *__restrict __sign)
2556 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
2557extern char *qfcvt (long double __value, int __ndigit,
2558 int *__restrict __decpt, int *__restrict __sign)
2559 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
2560extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2561 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
2562
2563
2564
2565
2566extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2567 int *__restrict __sign, char *__restrict __buf,
2568 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2569extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2570 int *__restrict __sign, char *__restrict __buf,
2571 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2572
2573extern int qecvt_r (long double __value, int __ndigit,
2574 int *__restrict __decpt, int *__restrict __sign,
2575 char *__restrict __buf, size_t __len)
2576 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2577extern int qfcvt_r (long double __value, int __ndigit,
2578 int *__restrict __decpt, int *__restrict __sign,
2579 char *__restrict __buf, size_t __len)
2580 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2581
2582
2583
2584
2585
2586
2587
2588extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__));
2589
2590
2591extern int mbtowc (wchar_t *__restrict __pwc,
2592 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
2593
2594
2595extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__));
2596
2597
2598
2599extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2600 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
2601
2602extern size_t wcstombs (char *__restrict __s,
2603 __const wchar_t *__restrict __pwcs, size_t __n)
2604 __attribute__ ((__nothrow__));
2605
2606
2607
2608
2609
2610
2611
2612
2613extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2614# 954 "/usr/include/stdlib.h" 3 4
2615extern int getloadavg (double __loadavg[], int __nelem)
2616 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2617
2618
2619
2620
2621
2622
2623# 69 "netlib.c" 2
2624# 1 "/usr/include/math.h" 1 3 4
2625# 29 "/usr/include/math.h" 3 4
2626
2627
2628
2629
2630# 1 "/usr/include/bits/huge_val.h" 1 3 4
2631# 34 "/usr/include/math.h" 2 3 4
2632# 46 "/usr/include/math.h" 3 4
2633# 1 "/usr/include/bits/mathdef.h" 1 3 4
2634# 47 "/usr/include/math.h" 2 3 4
2635# 70 "/usr/include/math.h" 3 4
2636# 1 "/usr/include/bits/mathcalls.h" 1 3 4
2637# 53 "/usr/include/bits/mathcalls.h" 3 4
2638
2639
2640extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__));
2641
2642extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__));
2643
2644extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__));
2645
2646extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__));
2647
2648
2649extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__));
2650
2651extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__));
2652
2653extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__));
2654
2655
2656
2657
2658extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__));
2659
2660extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__));
2661
2662extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__));
2663
2664# 87 "/usr/include/bits/mathcalls.h" 3 4
2665
2666
2667extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__));
2668
2669extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__));
2670
2671extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__));
2672
2673
2674
2675
2676
2677
2678
2679extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__));
2680
2681
2682extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__));
2683
2684
2685extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__));
2686
2687
2688extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__));
2689
2690
2691extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__));
2692
2693
2694extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__));
2695
2696# 127 "/usr/include/bits/mathcalls.h" 3 4
2697
2698
2699extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__));
2700
2701
2702extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__));
2703
2704
2705extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__));
2706
2707# 152 "/usr/include/bits/mathcalls.h" 3 4
2708
2709
2710extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__));
2711
2712
2713extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__));
2714
2715
2716
2717
2718
2719extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__));
2720
2721
2722
2723
2724
2725
2726extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__));
2727
2728
2729
2730
2731
2732
2733
2734
2735extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2736
2737
2738extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2739
2740
2741extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2742
2743
2744extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__));
2745
2746
2747
2748
2749extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2750
2751
2752extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2753
2754
2755
2756
2757
2758extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2759
2760
2761extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2762
2763
2764extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__));
2765
2766
2767
2768extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__));
2769
2770
2771
2772
2773
2774extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2775
2776# 231 "/usr/include/bits/mathcalls.h" 3 4
2777extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2778
2779
2780
2781extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2782
2783
2784extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__));
2785extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__));
2786extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__));
2787extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__));
2788extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__));
2789extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__));
2790
2791
2792
2793
2794
2795
2796extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__));
2797extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__));
2798extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__));
2799
2800# 265 "/usr/include/bits/mathcalls.h" 3 4
2801extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__));
2802
2803
2804
2805
2806
2807
2808extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__));
2809
2810
2811
2812
2813
2814
2815
2816extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__));
2817
2818
2819extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2820
2821
2822
2823
2824
2825extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__));
2826
2827
2828
2829extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__));
2830
2831
2832
2833extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__));
2834# 71 "/usr/include/math.h" 2 3 4
2835# 93 "/usr/include/math.h" 3 4
2836# 1 "/usr/include/bits/mathcalls.h" 1 3 4
2837# 53 "/usr/include/bits/mathcalls.h" 3 4
2838
2839
2840extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__));
2841
2842extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__));
2843
2844extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__));
2845
2846extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__));
2847
2848
2849extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__));
2850
2851extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__));
2852
2853extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__));
2854
2855
2856
2857
2858extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__));
2859
2860extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__));
2861
2862extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__));
2863
2864# 87 "/usr/include/bits/mathcalls.h" 3 4
2865
2866
2867extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__));
2868
2869extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__));
2870
2871extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__));
2872
2873
2874
2875
2876
2877
2878
2879extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__));
2880
2881
2882extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__));
2883
2884
2885extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__));
2886
2887
2888extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__));
2889
2890
2891extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__));
2892
2893
2894extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__));
2895
2896# 127 "/usr/include/bits/mathcalls.h" 3 4
2897
2898
2899extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__));
2900
2901
2902extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__));
2903
2904
2905extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__));
2906
2907# 152 "/usr/include/bits/mathcalls.h" 3 4
2908
2909
2910extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__));
2911
2912
2913extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__));
2914
2915
2916
2917
2918
2919extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__));
2920
2921
2922
2923
2924
2925
2926extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__));
2927
2928
2929
2930
2931
2932
2933
2934
2935extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2936
2937
2938extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2939
2940
2941extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2942
2943
2944extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__));
2945
2946
2947
2948
2949extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2950
2951
2952extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2953
2954
2955
2956
2957
2958extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2959
2960
2961extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2962
2963
2964extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__));
2965
2966
2967
2968extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__));
2969
2970
2971
2972
2973
2974extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2975
2976# 231 "/usr/include/bits/mathcalls.h" 3 4
2977extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2978
2979
2980
2981extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2982
2983
2984extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__));
2985extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__));
2986extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__));
2987extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__));
2988extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__));
2989extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__));
2990
2991
2992
2993
2994
2995
2996extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__));
2997extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__));
2998extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__));
2999
3000# 265 "/usr/include/bits/mathcalls.h" 3 4
3001extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__));
3002
3003
3004
3005
3006
3007
3008extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__));
3009
3010
3011
3012
3013
3014
3015
3016extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__));
3017
3018
3019extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3020
3021
3022
3023
3024
3025extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__));
3026
3027
3028
3029extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__));
3030
3031
3032
3033extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__));
3034# 94 "/usr/include/math.h" 2 3 4
3035# 114 "/usr/include/math.h" 3 4
3036# 1 "/usr/include/bits/mathcalls.h" 1 3 4
3037# 53 "/usr/include/bits/mathcalls.h" 3 4
3038
3039
3040extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__));
3041
3042extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__));
3043
3044extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__));
3045
3046extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__));
3047
3048
3049extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__));
3050
3051extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__));
3052
3053extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__));
3054
3055
3056
3057
3058extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__));
3059
3060extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__));
3061
3062extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__));
3063
3064# 87 "/usr/include/bits/mathcalls.h" 3 4
3065
3066
3067extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__));
3068
3069extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__));
3070
3071extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__));
3072
3073
3074
3075
3076
3077
3078
3079extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__));
3080
3081
3082extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__));
3083
3084
3085extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__));
3086
3087
3088extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__));
3089
3090
3091extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__));
3092
3093
3094extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__));
3095
3096# 127 "/usr/include/bits/mathcalls.h" 3 4
3097
3098
3099extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__));
3100
3101
3102extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__));
3103
3104
3105extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__));
3106
3107# 152 "/usr/include/bits/mathcalls.h" 3 4
3108
3109
3110extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__));
3111
3112
3113extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__));
3114
3115
3116
3117
3118
3119extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__));
3120
3121
3122
3123
3124
3125
3126extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__));
3127
3128
3129
3130
3131
3132
3133
3134
3135extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3136
3137
3138extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3139
3140
3141extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3142
3143
3144extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__));
3145
3146
3147
3148
3149extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3150
3151
3152extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3153
3154
3155
3156
3157
3158extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3159
3160
3161extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3162
3163
3164extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__));
3165
3166
3167
3168extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__));
3169
3170
3171
3172
3173
3174extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3175
3176# 231 "/usr/include/bits/mathcalls.h" 3 4
3177extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3178
3179
3180
3181extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3182
3183
3184extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__));
3185extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__));
3186extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__));
3187extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__));
3188extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__));
3189extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__));
3190
3191
3192
3193
3194
3195
3196extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__));
3197extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__));
3198extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__));
3199
3200# 265 "/usr/include/bits/mathcalls.h" 3 4
3201extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__));
3202
3203
3204
3205
3206
3207
3208extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__));
3209
3210
3211
3212
3213
3214
3215
3216extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__));
3217
3218
3219extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3220
3221
3222
3223
3224
3225extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__));
3226
3227
3228
3229extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__));
3230
3231
3232
3233extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__));
3234# 115 "/usr/include/math.h" 2 3 4
3235# 130 "/usr/include/math.h" 3 4
3236extern int signgam;
3237# 257 "/usr/include/math.h" 3 4
3238typedef enum
3239{
3240 _IEEE_ = -1,
3241 _SVID_,
3242 _XOPEN_,
3243 _POSIX_,
3244 _ISOC_
3245} _LIB_VERSION_TYPE;
3246
3247
3248
3249
3250extern _LIB_VERSION_TYPE _LIB_VERSION;
3251# 282 "/usr/include/math.h" 3 4
3252struct exception
3253
3254 {
3255 int type;
3256 char *name;
3257 double arg1;
3258 double arg2;
3259 double retval;
3260 };
3261
3262
3263
3264
3265extern int matherr (struct exception *__exc);
3266# 382 "/usr/include/math.h" 3 4
3267# 1 "/usr/include/bits/mathinline.h" 1 3 4
3268# 291 "/usr/include/bits/mathinline.h" 3 4
3269extern __inline double __sgn (double) __attribute__ ((__nothrow__)); extern __inline double __attribute__ ((__nothrow__)) __sgn (double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline float __sgnf (float) __attribute__ ((__nothrow__)); extern __inline float __attribute__ ((__nothrow__)) __sgnf (float __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline long double __sgnl (long double) __attribute__ ((__nothrow__)); extern __inline long double __attribute__ ((__nothrow__)) __sgnl (long double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); }
3270# 433 "/usr/include/bits/mathinline.h" 3 4
3271extern __inline long double __attribute__ ((__nothrow__)) __atan2l (long double __y, long double __x) { return __builtin_atan2l (__y, __x); }
3272# 473 "/usr/include/bits/mathinline.h" 3 4
3273extern __inline double __attribute__ ((__nothrow__)) fabs (double __x) { return __builtin_fabs (__x); }
3274
3275extern __inline float __attribute__ ((__nothrow__)) fabsf (float __x) { return __builtin_fabsf (__x); }
3276extern __inline long double __attribute__ ((__nothrow__)) fabsl (long double __x) { return __builtin_fabsl (__x); }
3277
3278extern __inline long double __attribute__ ((__nothrow__)) __fabsl (long double __x) { return __builtin_fabsl (__x); }
3279# 506 "/usr/include/bits/mathinline.h" 3 4
3280extern __inline long double __sgn1l (long double) __attribute__ ((__nothrow__)); extern __inline long double __attribute__ ((__nothrow__)) __sgn1l (long double __x) { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; }
3281# 530 "/usr/include/bits/mathinline.h" 3 4
3282extern __inline double __attribute__ ((__nothrow__)) floor (double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline float __attribute__ ((__nothrow__)) floorf (float __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline long double __attribute__ ((__nothrow__)) floorl (long double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; }
3283# 541 "/usr/include/bits/mathinline.h" 3 4
3284extern __inline double __attribute__ ((__nothrow__)) ceil (double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline float __attribute__ ((__nothrow__)) ceilf (float __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline long double __attribute__ ((__nothrow__)) ceill (long double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; }
3285# 713 "/usr/include/bits/mathinline.h" 3 4
3286extern __inline int
3287__attribute__ ((__nothrow__)) __finite (double __x)
3288{
3289 return (__extension__
3290 (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
3291 | 0x800fffffu) + 1) >> 31));
3292}
3293# 383 "/usr/include/math.h" 2 3 4
3294# 438 "/usr/include/math.h" 3 4
3295
3296# 70 "netlib.c" 2
3297# 1 "/usr/include/string.h" 1 3 4
3298# 28 "/usr/include/string.h" 3 4
3299
3300
3301
3302
3303
3304# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
3305# 34 "/usr/include/string.h" 2 3 4
3306
3307
3308
3309
3310extern void *memcpy (void *__restrict __dest,
3311 __const void *__restrict __src, size_t __n)
3312 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3313
3314
3315extern void *memmove (void *__dest, __const void *__src, size_t __n)
3316 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3317
3318
3319
3320
3321
3322
3323extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
3324 int __c, size_t __n)
3325 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3326
3327
3328
3329
3330
3331extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3332
3333
3334extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
3335 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3336
3337
3338extern void *memchr (__const void *__s, int __c, size_t __n)
3339 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3340
3341# 82 "/usr/include/string.h" 3 4
3342
3343
3344extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
3345 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3346
3347extern char *strncpy (char *__restrict __dest,
3348 __const char *__restrict __src, size_t __n)
3349 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3350
3351
3352extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
3353 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3354
3355extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
3356 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3357
3358
3359extern int strcmp (__const char *__s1, __const char *__s2)
3360 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3361
3362extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
3363 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3364
3365
3366extern int strcoll (__const char *__s1, __const char *__s2)
3367 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3368
3369extern size_t strxfrm (char *__restrict __dest,
3370 __const char *__restrict __src, size_t __n)
3371 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3372
3373# 130 "/usr/include/string.h" 3 4
3374extern char *strdup (__const char *__s)
3375 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3376# 165 "/usr/include/string.h" 3 4
3377
3378
3379extern char *strchr (__const char *__s, int __c)
3380 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3381
3382extern char *strrchr (__const char *__s, int __c)
3383 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3384
3385# 181 "/usr/include/string.h" 3 4
3386
3387
3388
3389extern size_t strcspn (__const char *__s, __const char *__reject)
3390 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3391
3392
3393extern size_t strspn (__const char *__s, __const char *__accept)
3394 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3395
3396extern char *strpbrk (__const char *__s, __const char *__accept)
3397 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3398
3399extern char *strstr (__const char *__haystack, __const char *__needle)
3400 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3401
3402
3403
3404extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
3405 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3406
3407
3408
3409
3410extern char *__strtok_r (char *__restrict __s,
3411 __const char *__restrict __delim,
3412 char **__restrict __save_ptr)
3413 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3414
3415extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
3416 char **__restrict __save_ptr)
3417 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3418# 240 "/usr/include/string.h" 3 4
3419
3420
3421extern size_t strlen (__const char *__s)
3422 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3423
3424# 254 "/usr/include/string.h" 3 4
3425
3426
3427extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
3428
3429# 281 "/usr/include/string.h" 3 4
3430extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
3431 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3432
3433
3434
3435
3436
3437extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3438
3439
3440
3441extern void bcopy (__const void *__src, void *__dest, size_t __n)
3442 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3443
3444
3445extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3446
3447
3448extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
3449 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3450
3451
3452extern char *index (__const char *__s, int __c)
3453 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3454
3455
3456extern char *rindex (__const char *__s, int __c)
3457 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3458
3459
3460
3461extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3462# 325 "/usr/include/string.h" 3 4
3463extern int strcasecmp (__const char *__s1, __const char *__s2)
3464 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3465
3466
3467extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
3468 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3469# 348 "/usr/include/string.h" 3 4
3470extern char *strsep (char **__restrict __stringp,
3471 __const char *__restrict __delim)
3472 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3473# 414 "/usr/include/string.h" 3 4
3474# 1 "/usr/include/bits/string.h" 1 3 4
3475# 415 "/usr/include/string.h" 2 3 4
3476
3477
3478# 1 "/usr/include/bits/string2.h" 1 3 4
3479# 394 "/usr/include/bits/string2.h" 3 4
3480extern void *__rawmemchr (const void *__s, int __c);
3481# 969 "/usr/include/bits/string2.h" 3 4
3482extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
3483extern __inline size_t
3484__strcspn_c1 (__const char *__s, int __reject)
3485{
3486 register size_t __result = 0;
3487 while (__s[__result] != '\0' && __s[__result] != __reject)
3488 ++__result;
3489 return __result;
3490}
3491
3492extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
3493 int __reject2);
3494extern __inline size_t
3495__strcspn_c2 (__const char *__s, int __reject1, int __reject2)
3496{
3497 register size_t __result = 0;
3498 while (__s[__result] != '\0' && __s[__result] != __reject1
3499 && __s[__result] != __reject2)
3500 ++__result;
3501 return __result;
3502}
3503
3504extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
3505 int __reject2, int __reject3);
3506extern __inline size_t
3507__strcspn_c3 (__const char *__s, int __reject1, int __reject2,
3508 int __reject3)
3509{
3510 register size_t __result = 0;
3511 while (__s[__result] != '\0' && __s[__result] != __reject1
3512 && __s[__result] != __reject2 && __s[__result] != __reject3)
3513 ++__result;
3514 return __result;
3515}
3516# 1045 "/usr/include/bits/string2.h" 3 4
3517extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
3518extern __inline size_t
3519__strspn_c1 (__const char *__s, int __accept)
3520{
3521 register size_t __result = 0;
3522
3523 while (__s[__result] == __accept)
3524 ++__result;
3525 return __result;
3526}
3527
3528extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
3529 int __accept2);
3530extern __inline size_t
3531__strspn_c2 (__const char *__s, int __accept1, int __accept2)
3532{
3533 register size_t __result = 0;
3534
3535 while (__s[__result] == __accept1 || __s[__result] == __accept2)
3536 ++__result;
3537 return __result;
3538}
3539
3540extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
3541 int __accept2, int __accept3);
3542extern __inline size_t
3543__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
3544{
3545 register size_t __result = 0;
3546
3547 while (__s[__result] == __accept1 || __s[__result] == __accept2
3548 || __s[__result] == __accept3)
3549 ++__result;
3550 return __result;
3551}
3552# 1121 "/usr/include/bits/string2.h" 3 4
3553extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
3554 int __accept2);
3555extern __inline char *
3556__strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
3557{
3558
3559 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
3560 ++__s;
3561 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
3562}
3563
3564extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
3565 int __accept2, int __accept3);
3566extern __inline char *
3567__strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
3568 int __accept3)
3569{
3570
3571 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
3572 && *__s != __accept3)
3573 ++__s;
3574 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
3575}
3576# 1173 "/usr/include/bits/string2.h" 3 4
3577extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
3578extern __inline char *
3579__strtok_r_1c (char *__s, char __sep, char **__nextp)
3580{
3581 char *__result;
3582 if (__s == ((void *)0))
3583 __s = *__nextp;
3584 while (*__s == __sep)
3585 ++__s;
3586 __result = ((void *)0);
3587 if (*__s != '\0')
3588 {
3589 __result = __s++;
3590 while (*__s != '\0')
3591 if (*__s++ == __sep)
3592 {
3593 __s[-1] = '\0';
3594 break;
3595 }
3596 *__nextp = __s;
3597 }
3598 return __result;
3599}
3600# 1205 "/usr/include/bits/string2.h" 3 4
3601extern char *__strsep_g (char **__stringp, __const char *__delim);
3602# 1223 "/usr/include/bits/string2.h" 3 4
3603extern __inline char *__strsep_1c (char **__s, char __reject);
3604extern __inline char *
3605__strsep_1c (char **__s, char __reject)
3606{
3607 register char *__retval = *__s;
3608 if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
3609 *(*__s)++ = '\0';
3610 return __retval;
3611}
3612
3613extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
3614extern __inline char *
3615__strsep_2c (char **__s, char __reject1, char __reject2)
3616{
3617 register char *__retval = *__s;
3618 if (__retval != ((void *)0))
3619 {
3620 register char *__cp = __retval;
3621 while (1)
3622 {
3623 if (*__cp == '\0')
3624 {
3625 __cp = ((void *)0);
3626 break;
3627 }
3628 if (*__cp == __reject1 || *__cp == __reject2)
3629 {
3630 *__cp++ = '\0';
3631 break;
3632 }
3633 ++__cp;
3634 }
3635 *__s = __cp;
3636 }
3637 return __retval;
3638}
3639
3640extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
3641 char __reject3);
3642extern __inline char *
3643__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
3644{
3645 register char *__retval = *__s;
3646 if (__retval != ((void *)0))
3647 {
3648 register char *__cp = __retval;
3649 while (1)
3650 {
3651 if (*__cp == '\0')
3652 {
3653 __cp = ((void *)0);
3654 break;
3655 }
3656 if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
3657 {
3658 *__cp++ = '\0';
3659 break;
3660 }
3661 ++__cp;
3662 }
3663 *__s = __cp;
3664 }
3665 return __retval;
3666}
3667# 1304 "/usr/include/bits/string2.h" 3 4
3668extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
3669# 1323 "/usr/include/bits/string2.h" 3 4
3670extern char *__strndup (__const char *__string, size_t __n)
3671 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
3672# 418 "/usr/include/string.h" 2 3 4
3673# 426 "/usr/include/string.h" 3 4
3674
3675# 71 "netlib.c" 2
3676# 1 "/usr/include/assert.h" 1 3 4
3677# 67 "/usr/include/assert.h" 3 4
3678
3679
3680
3681extern void __assert_fail (__const char *__assertion, __const char *__file,
3682 unsigned int __line, __const char *__function)
3683 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3684
3685
3686extern void __assert_perror_fail (int __errnum, __const char *__file,
3687 unsigned int __line,
3688 __const char *__function)
3689 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3690
3691
3692
3693
3694extern void __assert (const char *__assertion, const char *__file, int __line)
3695 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
3696
3697
3698
3699# 72 "netlib.c" 2
3700
3701
3702
3703
3704
3705
3706
3707# 1 "/usr/include/unistd.h" 1 3 4
3708# 28 "/usr/include/unistd.h" 3 4
3709
3710# 171 "/usr/include/unistd.h" 3 4
3711# 1 "/usr/include/bits/posix_opt.h" 1 3 4
3712# 172 "/usr/include/unistd.h" 2 3 4
3713# 195 "/usr/include/unistd.h" 3 4
3714# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
3715# 196 "/usr/include/unistd.h" 2 3 4
3716# 236 "/usr/include/unistd.h" 3 4
3717typedef __intptr_t intptr_t;
3718
3719
3720
3721
3722
3723
3724typedef __socklen_t socklen_t;
3725# 256 "/usr/include/unistd.h" 3 4
3726extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3727# 287 "/usr/include/unistd.h" 3 4
3728extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__));
3729# 305 "/usr/include/unistd.h" 3 4
3730extern int close (int __fd);
3731
3732
3733
3734
3735
3736
3737extern ssize_t read (int __fd, void *__buf, size_t __nbytes);
3738
3739
3740
3741
3742
3743extern ssize_t write (int __fd, __const void *__buf, size_t __n);
3744# 369 "/usr/include/unistd.h" 3 4
3745extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__));
3746# 378 "/usr/include/unistd.h" 3 4
3747extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__));
3748# 390 "/usr/include/unistd.h" 3 4
3749extern unsigned int sleep (unsigned int __seconds);
3750
3751
3752
3753
3754
3755
3756extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
3757 __attribute__ ((__nothrow__));
3758
3759
3760
3761
3762
3763
3764extern int usleep (__useconds_t __useconds);
3765# 414 "/usr/include/unistd.h" 3 4
3766extern int pause (void);
3767
3768
3769
3770extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
3771 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3772
3773
3774
3775extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__));
3776
3777
3778
3779
3780extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
3781 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3782
3783
3784
3785
3786extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3787
3788
3789
3790extern int fchdir (int __fd) __attribute__ ((__nothrow__));
3791# 448 "/usr/include/unistd.h" 3 4
3792extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__));
3793# 461 "/usr/include/unistd.h" 3 4
3794extern char *getwd (char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3795
3796
3797
3798
3799extern int dup (int __fd) __attribute__ ((__nothrow__));
3800
3801
3802extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__));
3803
3804
3805extern char **__environ;
3806
3807
3808
3809
3810
3811
3812
3813extern int execve (__const char *__path, char *__const __argv[],
3814 char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3815# 492 "/usr/include/unistd.h" 3 4
3816extern int execv (__const char *__path, char *__const __argv[])
3817 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3818
3819
3820
3821extern int execle (__const char *__path, __const char *__arg, ...)
3822 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3823
3824
3825
3826extern int execl (__const char *__path, __const char *__arg, ...)
3827 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3828
3829
3830
3831extern int execvp (__const char *__file, char *__const __argv[])
3832 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3833
3834
3835
3836
3837extern int execlp (__const char *__file, __const char *__arg, ...)
3838 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3839
3840
3841
3842
3843extern int nice (int __inc) __attribute__ ((__nothrow__));
3844
3845
3846
3847
3848extern void _exit (int __status) __attribute__ ((__noreturn__));
3849
3850
3851
3852
3853
3854# 1 "/usr/include/bits/confname.h" 1 3 4
3855# 26 "/usr/include/bits/confname.h" 3 4
3856enum
3857 {
3858 _PC_LINK_MAX,
3859
3860 _PC_MAX_CANON,
3861
3862 _PC_MAX_INPUT,
3863
3864 _PC_NAME_MAX,
3865
3866 _PC_PATH_MAX,
3867
3868 _PC_PIPE_BUF,
3869
3870 _PC_CHOWN_RESTRICTED,
3871
3872 _PC_NO_TRUNC,
3873
3874 _PC_VDISABLE,
3875
3876 _PC_SYNC_IO,
3877
3878 _PC_ASYNC_IO,
3879
3880 _PC_PRIO_IO,
3881
3882 _PC_SOCK_MAXBUF,
3883
3884 _PC_FILESIZEBITS,
3885
3886 _PC_REC_INCR_XFER_SIZE,
3887
3888 _PC_REC_MAX_XFER_SIZE,
3889
3890 _PC_REC_MIN_XFER_SIZE,
3891
3892 _PC_REC_XFER_ALIGN,
3893
3894 _PC_ALLOC_SIZE_MIN,
3895
3896 _PC_SYMLINK_MAX,
3897
3898 _PC_2_SYMLINKS
3899
3900 };
3901
3902
3903enum
3904 {
3905 _SC_ARG_MAX,
3906
3907 _SC_CHILD_MAX,
3908
3909 _SC_CLK_TCK,
3910
3911 _SC_NGROUPS_MAX,
3912
3913 _SC_OPEN_MAX,
3914
3915 _SC_STREAM_MAX,
3916
3917 _SC_TZNAME_MAX,
3918
3919 _SC_JOB_CONTROL,
3920
3921 _SC_SAVED_IDS,
3922
3923 _SC_REALTIME_SIGNALS,
3924
3925 _SC_PRIORITY_SCHEDULING,
3926
3927 _SC_TIMERS,
3928
3929 _SC_ASYNCHRONOUS_IO,
3930
3931 _SC_PRIORITIZED_IO,
3932
3933 _SC_SYNCHRONIZED_IO,
3934
3935 _SC_FSYNC,
3936
3937 _SC_MAPPED_FILES,
3938
3939 _SC_MEMLOCK,
3940
3941 _SC_MEMLOCK_RANGE,
3942
3943 _SC_MEMORY_PROTECTION,
3944
3945 _SC_MESSAGE_PASSING,
3946
3947 _SC_SEMAPHORES,
3948
3949 _SC_SHARED_MEMORY_OBJECTS,
3950
3951 _SC_AIO_LISTIO_MAX,
3952
3953 _SC_AIO_MAX,
3954
3955 _SC_AIO_PRIO_DELTA_MAX,
3956
3957 _SC_DELAYTIMER_MAX,
3958
3959 _SC_MQ_OPEN_MAX,
3960
3961 _SC_MQ_PRIO_MAX,
3962
3963 _SC_VERSION,
3964
3965 _SC_PAGESIZE,
3966
3967
3968 _SC_RTSIG_MAX,
3969
3970 _SC_SEM_NSEMS_MAX,
3971
3972 _SC_SEM_VALUE_MAX,
3973
3974 _SC_SIGQUEUE_MAX,
3975
3976 _SC_TIMER_MAX,
3977
3978
3979
3980
3981 _SC_BC_BASE_MAX,
3982
3983 _SC_BC_DIM_MAX,
3984
3985 _SC_BC_SCALE_MAX,
3986
3987 _SC_BC_STRING_MAX,
3988
3989 _SC_COLL_WEIGHTS_MAX,
3990
3991 _SC_EQUIV_CLASS_MAX,
3992
3993 _SC_EXPR_NEST_MAX,
3994
3995 _SC_LINE_MAX,
3996
3997 _SC_RE_DUP_MAX,
3998
3999 _SC_CHARCLASS_NAME_MAX,
4000
4001
4002 _SC_2_VERSION,
4003
4004 _SC_2_C_BIND,
4005
4006 _SC_2_C_DEV,
4007
4008 _SC_2_FORT_DEV,
4009
4010 _SC_2_FORT_RUN,
4011
4012 _SC_2_SW_DEV,
4013
4014 _SC_2_LOCALEDEF,
4015
4016
4017 _SC_PII,
4018
4019 _SC_PII_XTI,
4020
4021 _SC_PII_SOCKET,
4022
4023 _SC_PII_INTERNET,
4024
4025 _SC_PII_OSI,
4026
4027 _SC_POLL,
4028
4029 _SC_SELECT,
4030
4031 _SC_UIO_MAXIOV,
4032
4033 _SC_IOV_MAX = _SC_UIO_MAXIOV,
4034
4035 _SC_PII_INTERNET_STREAM,
4036
4037 _SC_PII_INTERNET_DGRAM,
4038
4039 _SC_PII_OSI_COTS,
4040
4041 _SC_PII_OSI_CLTS,
4042
4043 _SC_PII_OSI_M,
4044
4045 _SC_T_IOV_MAX,
4046
4047
4048
4049 _SC_THREADS,
4050
4051 _SC_THREAD_SAFE_FUNCTIONS,
4052
4053 _SC_GETGR_R_SIZE_MAX,
4054
4055 _SC_GETPW_R_SIZE_MAX,
4056
4057 _SC_LOGIN_NAME_MAX,
4058
4059 _SC_TTY_NAME_MAX,
4060
4061 _SC_THREAD_DESTRUCTOR_ITERATIONS,
4062
4063 _SC_THREAD_KEYS_MAX,
4064
4065 _SC_THREAD_STACK_MIN,
4066
4067 _SC_THREAD_THREADS_MAX,
4068
4069 _SC_THREAD_ATTR_STACKADDR,
4070
4071 _SC_THREAD_ATTR_STACKSIZE,
4072
4073 _SC_THREAD_PRIORITY_SCHEDULING,
4074
4075 _SC_THREAD_PRIO_INHERIT,
4076
4077 _SC_THREAD_PRIO_PROTECT,
4078
4079 _SC_THREAD_PROCESS_SHARED,
4080
4081
4082 _SC_NPROCESSORS_CONF,
4083
4084 _SC_NPROCESSORS_ONLN,
4085
4086 _SC_PHYS_PAGES,
4087
4088 _SC_AVPHYS_PAGES,
4089
4090 _SC_ATEXIT_MAX,
4091
4092 _SC_PASS_MAX,
4093
4094
4095 _SC_XOPEN_VERSION,
4096
4097 _SC_XOPEN_XCU_VERSION,
4098
4099 _SC_XOPEN_UNIX,
4100
4101 _SC_XOPEN_CRYPT,
4102
4103 _SC_XOPEN_ENH_I18N,
4104
4105 _SC_XOPEN_SHM,
4106
4107
4108 _SC_2_CHAR_TERM,
4109
4110 _SC_2_C_VERSION,
4111
4112 _SC_2_UPE,
4113
4114
4115 _SC_XOPEN_XPG2,
4116
4117 _SC_XOPEN_XPG3,
4118
4119 _SC_XOPEN_XPG4,
4120
4121
4122 _SC_CHAR_BIT,
4123
4124 _SC_CHAR_MAX,
4125
4126 _SC_CHAR_MIN,
4127
4128 _SC_INT_MAX,
4129
4130 _SC_INT_MIN,
4131
4132 _SC_LONG_BIT,
4133
4134 _SC_WORD_BIT,
4135
4136 _SC_MB_LEN_MAX,
4137
4138 _SC_NZERO,
4139
4140 _SC_SSIZE_MAX,
4141
4142 _SC_SCHAR_MAX,
4143
4144 _SC_SCHAR_MIN,
4145
4146 _SC_SHRT_MAX,
4147
4148 _SC_SHRT_MIN,
4149
4150 _SC_UCHAR_MAX,
4151
4152 _SC_UINT_MAX,
4153
4154 _SC_ULONG_MAX,
4155
4156 _SC_USHRT_MAX,
4157
4158
4159 _SC_NL_ARGMAX,
4160
4161 _SC_NL_LANGMAX,
4162
4163 _SC_NL_MSGMAX,
4164
4165 _SC_NL_NMAX,
4166
4167 _SC_NL_SETMAX,
4168
4169 _SC_NL_TEXTMAX,
4170
4171
4172 _SC_XBS5_ILP32_OFF32,
4173
4174 _SC_XBS5_ILP32_OFFBIG,
4175
4176 _SC_XBS5_LP64_OFF64,
4177
4178 _SC_XBS5_LPBIG_OFFBIG,
4179
4180
4181 _SC_XOPEN_LEGACY,
4182
4183 _SC_XOPEN_REALTIME,
4184
4185 _SC_XOPEN_REALTIME_THREADS,
4186
4187
4188 _SC_ADVISORY_INFO,
4189
4190 _SC_BARRIERS,
4191
4192 _SC_BASE,
4193
4194 _SC_C_LANG_SUPPORT,
4195
4196 _SC_C_LANG_SUPPORT_R,
4197
4198 _SC_CLOCK_SELECTION,
4199
4200 _SC_CPUTIME,
4201
4202 _SC_THREAD_CPUTIME,
4203
4204 _SC_DEVICE_IO,
4205
4206 _SC_DEVICE_SPECIFIC,
4207
4208 _SC_DEVICE_SPECIFIC_R,
4209
4210 _SC_FD_MGMT,
4211
4212 _SC_FIFO,
4213
4214 _SC_PIPE,
4215
4216 _SC_FILE_ATTRIBUTES,
4217
4218 _SC_FILE_LOCKING,
4219
4220 _SC_FILE_SYSTEM,
4221
4222 _SC_MONOTONIC_CLOCK,
4223
4224 _SC_MULTI_PROCESS,
4225
4226 _SC_SINGLE_PROCESS,
4227
4228 _SC_NETWORKING,
4229
4230 _SC_READER_WRITER_LOCKS,
4231
4232 _SC_SPIN_LOCKS,
4233
4234 _SC_REGEXP,
4235
4236 _SC_REGEX_VERSION,
4237
4238 _SC_SHELL,
4239
4240 _SC_SIGNALS,
4241
4242 _SC_SPAWN,
4243
4244 _SC_SPORADIC_SERVER,
4245
4246 _SC_THREAD_SPORADIC_SERVER,
4247
4248 _SC_SYSTEM_DATABASE,
4249
4250 _SC_SYSTEM_DATABASE_R,
4251
4252 _SC_TIMEOUTS,
4253
4254 _SC_TYPED_MEMORY_OBJECTS,
4255
4256 _SC_USER_GROUPS,
4257
4258 _SC_USER_GROUPS_R,
4259
4260 _SC_2_PBS,
4261
4262 _SC_2_PBS_ACCOUNTING,
4263
4264 _SC_2_PBS_LOCATE,
4265
4266 _SC_2_PBS_MESSAGE,
4267
4268 _SC_2_PBS_TRACK,
4269
4270 _SC_SYMLOOP_MAX,
4271
4272 _SC_STREAMS,
4273
4274 _SC_2_PBS_CHECKPOINT,
4275
4276
4277 _SC_V6_ILP32_OFF32,
4278
4279 _SC_V6_ILP32_OFFBIG,
4280
4281 _SC_V6_LP64_OFF64,
4282
4283 _SC_V6_LPBIG_OFFBIG,
4284
4285
4286 _SC_HOST_NAME_MAX,
4287
4288 _SC_TRACE,
4289
4290 _SC_TRACE_EVENT_FILTER,
4291
4292 _SC_TRACE_INHERIT,
4293
4294 _SC_TRACE_LOG,
4295
4296
4297 _SC_LEVEL1_ICACHE_SIZE,
4298
4299 _SC_LEVEL1_ICACHE_ASSOC,
4300
4301 _SC_LEVEL1_ICACHE_LINESIZE,
4302
4303 _SC_LEVEL1_DCACHE_SIZE,
4304
4305 _SC_LEVEL1_DCACHE_ASSOC,
4306
4307 _SC_LEVEL1_DCACHE_LINESIZE,
4308
4309 _SC_LEVEL2_CACHE_SIZE,
4310
4311 _SC_LEVEL2_CACHE_ASSOC,
4312
4313 _SC_LEVEL2_CACHE_LINESIZE,
4314
4315 _SC_LEVEL3_CACHE_SIZE,
4316
4317 _SC_LEVEL3_CACHE_ASSOC,
4318
4319 _SC_LEVEL3_CACHE_LINESIZE,
4320
4321 _SC_LEVEL4_CACHE_SIZE,
4322
4323 _SC_LEVEL4_CACHE_ASSOC,
4324
4325 _SC_LEVEL4_CACHE_LINESIZE,
4326
4327
4328
4329 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
4330
4331 _SC_RAW_SOCKETS
4332
4333 };
4334
4335
4336enum
4337 {
4338 _CS_PATH,
4339
4340
4341 _CS_V6_WIDTH_RESTRICTED_ENVS,
4342
4343
4344 _CS_GNU_LIBC_VERSION,
4345
4346 _CS_GNU_LIBPTHREAD_VERSION,
4347
4348
4349 _CS_LFS_CFLAGS = 1000,
4350
4351 _CS_LFS_LDFLAGS,
4352
4353 _CS_LFS_LIBS,
4354
4355 _CS_LFS_LINTFLAGS,
4356
4357 _CS_LFS64_CFLAGS,
4358
4359 _CS_LFS64_LDFLAGS,
4360
4361 _CS_LFS64_LIBS,
4362
4363 _CS_LFS64_LINTFLAGS,
4364
4365
4366 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
4367
4368 _CS_XBS5_ILP32_OFF32_LDFLAGS,
4369
4370 _CS_XBS5_ILP32_OFF32_LIBS,
4371
4372 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
4373
4374 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
4375
4376 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
4377
4378 _CS_XBS5_ILP32_OFFBIG_LIBS,
4379
4380 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
4381
4382 _CS_XBS5_LP64_OFF64_CFLAGS,
4383
4384 _CS_XBS5_LP64_OFF64_LDFLAGS,
4385
4386 _CS_XBS5_LP64_OFF64_LIBS,
4387
4388 _CS_XBS5_LP64_OFF64_LINTFLAGS,
4389
4390 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
4391
4392 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
4393
4394 _CS_XBS5_LPBIG_OFFBIG_LIBS,
4395
4396 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
4397
4398
4399 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
4400
4401 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
4402
4403 _CS_POSIX_V6_ILP32_OFF32_LIBS,
4404
4405 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
4406
4407 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
4408
4409 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
4410
4411 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
4412
4413 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
4414
4415 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
4416
4417 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
4418
4419 _CS_POSIX_V6_LP64_OFF64_LIBS,
4420
4421 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
4422
4423 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
4424
4425 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
4426
4427 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
4428
4429 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
4430
4431 };
4432# 531 "/usr/include/unistd.h" 2 3 4
4433
4434
4435extern long int pathconf (__const char *__path, int __name)
4436 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4437
4438
4439extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__));
4440
4441
4442extern long int sysconf (int __name) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
4443
4444
4445
4446extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__));
4447
4448
4449
4450
4451extern __pid_t getpid (void) __attribute__ ((__nothrow__));
4452
4453
4454extern __pid_t getppid (void) __attribute__ ((__nothrow__));
4455
4456
4457
4458
4459extern __pid_t getpgrp (void) __attribute__ ((__nothrow__));
4460# 567 "/usr/include/unistd.h" 3 4
4461extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__));
4462# 576 "/usr/include/unistd.h" 3 4
4463extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__));
4464# 593 "/usr/include/unistd.h" 3 4
4465extern int setpgrp (void) __attribute__ ((__nothrow__));
4466# 610 "/usr/include/unistd.h" 3 4
4467extern __pid_t setsid (void) __attribute__ ((__nothrow__));
4468
4469
4470
4471
4472
4473
4474
4475extern __uid_t getuid (void) __attribute__ ((__nothrow__));
4476
4477
4478extern __uid_t geteuid (void) __attribute__ ((__nothrow__));
4479
4480
4481extern __gid_t getgid (void) __attribute__ ((__nothrow__));
4482
4483
4484extern __gid_t getegid (void) __attribute__ ((__nothrow__));
4485
4486
4487
4488
4489extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__));
4490# 643 "/usr/include/unistd.h" 3 4
4491extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__));
4492
4493
4494
4495
4496extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__));
4497
4498
4499
4500
4501extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__));
4502
4503
4504
4505
4506
4507
4508extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__));
4509
4510
4511
4512
4513extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__));
4514
4515
4516
4517
4518extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__));
4519# 695 "/usr/include/unistd.h" 3 4
4520extern __pid_t fork (void) __attribute__ ((__nothrow__));
4521
4522
4523
4524
4525
4526
4527extern __pid_t vfork (void) __attribute__ ((__nothrow__));
4528
4529
4530
4531
4532
4533extern char *ttyname (int __fd) __attribute__ ((__nothrow__));
4534
4535
4536
4537extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
4538 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
4539
4540
4541
4542extern int isatty (int __fd) __attribute__ ((__nothrow__));
4543
4544
4545
4546
4547
4548extern int ttyslot (void) __attribute__ ((__nothrow__));
4549
4550
4551
4552
4553extern int link (__const char *__from, __const char *__to)
4554 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4555
4556
4557
4558extern int symlink (__const char *__from, __const char *__to)
4559 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4560
4561
4562
4563
4564extern int readlink (__const char *__restrict __path, char *__restrict __buf,
4565 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4566
4567
4568
4569extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4570
4571
4572extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4573
4574
4575
4576extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__));
4577
4578
4579extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__));
4580
4581
4582
4583
4584
4585
4586extern char *getlogin (void);
4587# 774 "/usr/include/unistd.h" 3 4
4588extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4589# 783 "/usr/include/unistd.h" 3 4
4590# 1 "/usr/include/getopt.h" 1 3 4
4591# 59 "/usr/include/getopt.h" 3 4
4592extern char *optarg;
4593# 73 "/usr/include/getopt.h" 3 4
4594extern int optind;
4595
4596
4597
4598
4599extern int opterr;
4600
4601
4602
4603extern int optopt;
4604# 152 "/usr/include/getopt.h" 3 4
4605extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
4606 __attribute__ ((__nothrow__));
4607# 784 "/usr/include/unistd.h" 2 3 4
4608
4609
4610
4611
4612
4613
4614
4615extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4616
4617
4618
4619
4620
4621
4622extern int sethostname (__const char *__name, size_t __len)
4623 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4624
4625
4626
4627extern int sethostid (long int __id) __attribute__ ((__nothrow__));
4628
4629
4630
4631
4632
4633extern int getdomainname (char *__name, size_t __len)
4634 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4635extern int setdomainname (__const char *__name, size_t __len)
4636 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4637
4638
4639
4640
4641
4642extern int vhangup (void) __attribute__ ((__nothrow__));
4643
4644
4645extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4646
4647
4648
4649
4650
4651
4652
4653extern int profil (unsigned short int *__sample_buffer, size_t __size,
4654 size_t __offset, unsigned int __scale)
4655 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4656
4657
4658
4659
4660
4661extern int acct (__const char *__name) __attribute__ ((__nothrow__));
4662
4663
4664
4665extern char *getusershell (void) __attribute__ ((__nothrow__));
4666extern void endusershell (void) __attribute__ ((__nothrow__));
4667extern void setusershell (void) __attribute__ ((__nothrow__));
4668
4669
4670
4671
4672
4673extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__));
4674
4675
4676
4677
4678
4679
4680extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4681
4682
4683
4684extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
4685# 869 "/usr/include/unistd.h" 3 4
4686extern int fsync (int __fd);
4687
4688
4689
4690
4691
4692
4693extern long int gethostid (void);
4694
4695
4696extern void sync (void) __attribute__ ((__nothrow__));
4697
4698
4699
4700
4701extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
4702
4703
4704
4705
4706extern int getdtablesize (void) __attribute__ ((__nothrow__));
4707
4708
4709
4710
4711extern int truncate (__const char *__file, __off_t __length)
4712 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4713# 916 "/usr/include/unistd.h" 3 4
4714extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__));
4715# 936 "/usr/include/unistd.h" 3 4
4716extern int brk (void *__addr) __attribute__ ((__nothrow__));
4717
4718
4719
4720
4721
4722extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__));
4723# 957 "/usr/include/unistd.h" 3 4
4724extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__));
4725# 1011 "/usr/include/unistd.h" 3 4
4726extern int fdatasync (int __fildes) __attribute__ ((__nothrow__));
4727# 1043 "/usr/include/unistd.h" 3 4
4728
4729# 80 "netlib.c" 2
4730# 1 "/usr/include/sys/stat.h" 1 3 4
4731# 37 "/usr/include/sys/stat.h" 3 4
4732# 1 "/usr/include/time.h" 1 3 4
4733# 38 "/usr/include/sys/stat.h" 2 3 4
4734# 103 "/usr/include/sys/stat.h" 3 4
4735
4736
4737# 1 "/usr/include/bits/stat.h" 1 3 4
4738# 36 "/usr/include/bits/stat.h" 3 4
4739struct stat
4740 {
4741 __dev_t st_dev;
4742 unsigned short int __pad1;
4743
4744 __ino_t st_ino;
4745
4746
4747
4748 __mode_t st_mode;
4749 __nlink_t st_nlink;
4750 __uid_t st_uid;
4751 __gid_t st_gid;
4752 __dev_t st_rdev;
4753 unsigned short int __pad2;
4754
4755 __off_t st_size;
4756
4757
4758
4759 __blksize_t st_blksize;
4760
4761
4762 __blkcnt_t st_blocks;
4763# 70 "/usr/include/bits/stat.h" 3 4
4764 struct timespec st_atim;
4765 struct timespec st_mtim;
4766 struct timespec st_ctim;
4767# 85 "/usr/include/bits/stat.h" 3 4
4768 unsigned long int __unused4;
4769 unsigned long int __unused5;
4770
4771
4772
4773 };
4774# 106 "/usr/include/sys/stat.h" 2 3 4
4775# 207 "/usr/include/sys/stat.h" 3 4
4776extern int stat (__const char *__restrict __file,
4777 struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4778
4779
4780
4781extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
4782# 235 "/usr/include/sys/stat.h" 3 4
4783extern int lstat (__const char *__restrict __file,
4784 struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
4785# 256 "/usr/include/sys/stat.h" 3 4
4786extern int chmod (__const char *__file, __mode_t __mode)
4787 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4788
4789
4790
4791
4792
4793extern int lchmod (__const char *__file, __mode_t __mode)
4794 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4795
4796
4797
4798
4799extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__));
4800
4801
4802
4803
4804
4805extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__));
4806# 284 "/usr/include/sys/stat.h" 3 4
4807extern int mkdir (__const char *__path, __mode_t __mode)
4808 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4809
4810
4811
4812
4813
4814extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
4815 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4816
4817
4818
4819
4820extern int mkfifo (__const char *__path, __mode_t __mode)
4821 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4822# 324 "/usr/include/sys/stat.h" 3 4
4823extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
4824 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
4825extern int __xstat (int __ver, __const char *__filename,
4826 struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
4827extern int __lxstat (int __ver, __const char *__filename,
4828 struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
4829# 357 "/usr/include/sys/stat.h" 3 4
4830extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
4831 __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
4832
4833
4834
4835
4836extern __inline__ int
4837__attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf)
4838{
4839 return __xstat (3, __path, __statbuf);
4840}
4841
4842
4843extern __inline__ int
4844__attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf)
4845{
4846 return __lxstat (3, __path, __statbuf);
4847}
4848
4849
4850extern __inline__ int
4851__attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf)
4852{
4853 return __fxstat (3, __fd, __statbuf);
4854}
4855
4856
4857extern __inline__ int
4858__attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
4859{
4860 return __xmknod (1, __path, __mode, &__dev);
4861}
4862# 417 "/usr/include/sys/stat.h" 3 4
4863
4864# 81 "netlib.c" 2
4865# 1 "/usr/include/sys/times.h" 1 3 4
4866# 29 "/usr/include/sys/times.h" 3 4
4867# 1 "/usr/include/time.h" 1 3 4
4868# 58 "/usr/include/time.h" 3 4
4869
4870
4871typedef __clock_t clock_t;
4872
4873
4874
4875# 30 "/usr/include/sys/times.h" 2 3 4
4876
4877
4878
4879
4880
4881struct tms
4882 {
4883 clock_t tms_utime;
4884 clock_t tms_stime;
4885
4886 clock_t tms_cutime;
4887 clock_t tms_cstime;
4888 };
4889
4890
4891
4892
4893
4894
4895extern clock_t times (struct tms *__buffer) __attribute__ ((__nothrow__));
4896
4897
4898# 82 "netlib.c" 2
4899
4900# 1 "/usr/include/time.h" 1 3 4
4901# 30 "/usr/include/time.h" 3 4
4902
4903
4904
4905
4906
4907
4908
4909
4910# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
4911# 39 "/usr/include/time.h" 2 3 4
4912
4913
4914
4915# 1 "/usr/include/bits/time.h" 1 3 4
4916# 40 "/usr/include/bits/time.h" 3 4
4917extern long int __sysconf (int);
4918# 43 "/usr/include/time.h" 2 3 4
4919# 129 "/usr/include/time.h" 3 4
4920
4921
4922struct tm
4923{
4924 int tm_sec;
4925 int tm_min;
4926 int tm_hour;
4927 int tm_mday;
4928 int tm_mon;
4929 int tm_year;
4930 int tm_wday;
4931 int tm_yday;
4932 int tm_isdst;
4933
4934
4935 long int tm_gmtoff;
4936 __const char *tm_zone;
4937
4938
4939
4940
4941};
4942
4943
4944
4945
4946
4947
4948
4949
4950struct itimerspec
4951 {
4952 struct timespec it_interval;
4953 struct timespec it_value;
4954 };
4955
4956
4957struct sigevent;
4958# 178 "/usr/include/time.h" 3 4
4959
4960
4961
4962extern clock_t clock (void) __attribute__ ((__nothrow__));
4963
4964
4965extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
4966
4967
4968extern double difftime (time_t __time1, time_t __time0)
4969 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
4970
4971
4972extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
4973
4974
4975
4976
4977
4978extern size_t strftime (char *__restrict __s, size_t __maxsize,
4979 __const char *__restrict __format,
4980 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
4981
4982# 226 "/usr/include/time.h" 3 4
4983
4984
4985
4986extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
4987
4988
4989
4990extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
4991
4992
4993
4994
4995
4996extern struct tm *gmtime_r (__const time_t *__restrict __timer,
4997 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
4998
4999
5000
5001extern struct tm *localtime_r (__const time_t *__restrict __timer,
5002 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
5003
5004
5005
5006
5007
5008extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
5009
5010
5011extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
5012
5013
5014
5015
5016
5017
5018
5019extern char *asctime_r (__const struct tm *__restrict __tp,
5020 char *__restrict __buf) __attribute__ ((__nothrow__));
5021
5022
5023extern char *ctime_r (__const time_t *__restrict __timer,
5024 char *__restrict __buf) __attribute__ ((__nothrow__));
5025
5026
5027
5028
5029extern char *__tzname[2];
5030extern int __daylight;
5031extern long int __timezone;
5032
5033
5034
5035
5036extern char *tzname[2];
5037
5038
5039
5040extern void tzset (void) __attribute__ ((__nothrow__));
5041
5042
5043
5044extern int daylight;
5045extern long int timezone;
5046
5047
5048
5049
5050
5051extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
5052# 309 "/usr/include/time.h" 3 4
5053extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
5054
5055
5056extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
5057
5058
5059extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5060# 324 "/usr/include/time.h" 3 4
5061extern int nanosleep (__const struct timespec *__requested_time,
5062 struct timespec *__remaining);
5063
5064
5065
5066extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
5067
5068
5069extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
5070
5071
5072extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
5073 __attribute__ ((__nothrow__));
5074# 353 "/usr/include/time.h" 3 4
5075extern int timer_create (clockid_t __clock_id,
5076 struct sigevent *__restrict __evp,
5077 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
5078
5079
5080extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
5081
5082
5083extern int timer_settime (timer_t __timerid, int __flags,
5084 __const struct itimerspec *__restrict __value,
5085 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
5086
5087
5088extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
5089 __attribute__ ((__nothrow__));
5090
5091
5092extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
5093# 413 "/usr/include/time.h" 3 4
5094
5095# 84 "netlib.c" 2
5096# 1 "/usr/include/sys/time.h" 1 3 4
5097# 28 "/usr/include/sys/time.h" 3 4
5098# 1 "/usr/include/bits/time.h" 1 3 4
5099# 29 "/usr/include/sys/time.h" 2 3 4
5100# 38 "/usr/include/sys/time.h" 3 4
5101
5102# 56 "/usr/include/sys/time.h" 3 4
5103struct timezone
5104 {
5105 int tz_minuteswest;
5106 int tz_dsttime;
5107 };
5108
5109typedef struct timezone *__restrict __timezone_ptr_t;
5110# 72 "/usr/include/sys/time.h" 3 4
5111extern int gettimeofday (struct timeval *__restrict __tv,
5112 __timezone_ptr_t __tz) __attribute__ ((__nothrow__));
5113
5114
5115
5116
5117extern int settimeofday (__const struct timeval *__tv,
5118 __const struct timezone *__tz) __attribute__ ((__nothrow__));
5119
5120
5121
5122
5123
5124extern int adjtime (__const struct timeval *__delta,
5125 struct timeval *__olddelta) __attribute__ ((__nothrow__));
5126
5127
5128
5129
5130enum __itimer_which
5131 {
5132
5133 ITIMER_REAL = 0,
5134
5135
5136 ITIMER_VIRTUAL = 1,
5137
5138
5139
5140 ITIMER_PROF = 2
5141
5142 };
5143
5144
5145
5146struct itimerval
5147 {
5148
5149 struct timeval it_interval;
5150
5151 struct timeval it_value;
5152 };
5153
5154
5155
5156
5157
5158
5159typedef int __itimer_which_t;
5160
5161
5162
5163
5164extern int getitimer (__itimer_which_t __which,
5165 struct itimerval *__value) __attribute__ ((__nothrow__));
5166
5167
5168
5169
5170extern int setitimer (__itimer_which_t __which,
5171 __const struct itimerval *__restrict __new,
5172 struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
5173
5174
5175
5176
5177extern int utimes (__const char *__file, __const struct timeval __tvp[2])
5178 __attribute__ ((__nothrow__));
5179
5180
5181
5182extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
5183 __attribute__ ((__nothrow__));
5184
5185
5186extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
5187# 181 "/usr/include/sys/time.h" 3 4
5188
5189# 85 "netlib.c" 2
5190
5191# 1 "/usr/include/sys/socket.h" 1 3 4
5192# 25 "/usr/include/sys/socket.h" 3 4
5193
5194
5195# 1 "/usr/include/sys/uio.h" 1 3 4
5196# 26 "/usr/include/sys/uio.h" 3 4
5197
5198
5199
5200# 1 "/usr/include/bits/uio.h" 1 3 4
5201# 42 "/usr/include/bits/uio.h" 3 4
5202struct iovec
5203 {
5204 void *iov_base;
5205 size_t iov_len;
5206 };
5207# 30 "/usr/include/sys/uio.h" 2 3 4
5208# 40 "/usr/include/sys/uio.h" 3 4
5209extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
5210# 50 "/usr/include/sys/uio.h" 3 4
5211extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
5212
5213
5214# 28 "/usr/include/sys/socket.h" 2 3 4
5215
5216# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
5217# 30 "/usr/include/sys/socket.h" 2 3 4
5218
5219
5220
5221
5222
5223# 1 "/usr/include/bits/socket.h" 1 3 4
5224# 29 "/usr/include/bits/socket.h" 3 4
5225# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
5226# 30 "/usr/include/bits/socket.h" 2 3 4
5227
5228# 1 "/usr/include/limits.h" 1 3 4
5229# 32 "/usr/include/bits/socket.h" 2 3 4
5230# 41 "/usr/include/bits/socket.h" 3 4
5231enum __socket_type
5232{
5233 SOCK_STREAM = 1,
5234
5235
5236 SOCK_DGRAM = 2,
5237
5238
5239 SOCK_RAW = 3,
5240
5241 SOCK_RDM = 4,
5242
5243 SOCK_SEQPACKET = 5,
5244
5245
5246 SOCK_PACKET = 10
5247
5248
5249
5250};
5251# 142 "/usr/include/bits/socket.h" 3 4
5252# 1 "/usr/include/bits/sockaddr.h" 1 3 4
5253# 29 "/usr/include/bits/sockaddr.h" 3 4
5254typedef unsigned short int sa_family_t;
5255# 143 "/usr/include/bits/socket.h" 2 3 4
5256
5257
5258struct sockaddr
5259 {
5260 sa_family_t sa_family;
5261 char sa_data[14];
5262 };
5263# 162 "/usr/include/bits/socket.h" 3 4
5264struct sockaddr_storage
5265 {
5266 sa_family_t ss_family;
5267 __uint32_t __ss_align;
5268 char __ss_padding[(128 - (2 * sizeof (__uint32_t)))];
5269 };
5270
5271
5272
5273enum
5274 {
5275 MSG_OOB = 0x01,
5276
5277 MSG_PEEK = 0x02,
5278
5279 MSG_DONTROUTE = 0x04,
5280
5281
5282
5283
5284
5285
5286 MSG_CTRUNC = 0x08,
5287
5288 MSG_PROXY = 0x10,
5289
5290 MSG_TRUNC = 0x20,
5291
5292 MSG_DONTWAIT = 0x40,
5293
5294 MSG_EOR = 0x80,
5295
5296 MSG_WAITALL = 0x100,
5297
5298 MSG_FIN = 0x200,
5299
5300 MSG_SYN = 0x400,
5301
5302 MSG_CONFIRM = 0x800,
5303
5304 MSG_RST = 0x1000,
5305
5306 MSG_ERRQUEUE = 0x2000,
5307
5308 MSG_NOSIGNAL = 0x4000,
5309
5310 MSG_MORE = 0x8000
5311
5312 };
5313
5314
5315
5316
5317struct msghdr
5318 {
5319 void *msg_name;
5320 socklen_t msg_namelen;
5321
5322 struct iovec *msg_iov;
5323 size_t msg_iovlen;
5324
5325 void *msg_control;
5326 size_t msg_controllen;
5327
5328 int msg_flags;
5329 };
5330
5331
5332struct cmsghdr
5333 {
5334 size_t cmsg_len;
5335
5336 int cmsg_level;
5337 int cmsg_type;
5338
5339 __extension__ unsigned char __cmsg_data [];
5340
5341 };
5342# 257 "/usr/include/bits/socket.h" 3 4
5343extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
5344 struct cmsghdr *__cmsg) __attribute__ ((__nothrow__));
5345
5346
5347
5348
5349extern __inline struct cmsghdr *
5350__attribute__ ((__nothrow__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
5351{
5352 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
5353
5354 return 0;
5355
5356 __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
5357 + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
5358 if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
5359 + __mhdr->msg_controllen)
5360 || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
5361 > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
5362
5363 return 0;
5364 return __cmsg;
5365}
5366
5367
5368
5369
5370enum
5371 {
5372 SCM_RIGHTS = 0x01
5373
5374
5375 , SCM_CREDENTIALS = 0x02
5376
5377
5378 };
5379
5380
5381
5382struct ucred
5383{
5384 pid_t pid;
5385 uid_t uid;
5386 gid_t gid;
5387};
5388
5389
5390# 1 "/usr/include/asm/socket.h" 1 3 4
5391# 11 "/usr/include/asm/socket.h" 3 4
5392# 1 "/usr/include/asm-i386/socket.h" 1 3 4
5393
5394
5395
5396# 1 "/usr/include/asm/sockios.h" 1 3 4
5397# 11 "/usr/include/asm/sockios.h" 3 4
5398# 1 "/usr/include/asm-i386/sockios.h" 1 3 4
5399# 12 "/usr/include/asm/sockios.h" 2 3 4
5400# 5 "/usr/include/asm-i386/socket.h" 2 3 4
5401# 12 "/usr/include/asm/socket.h" 2 3 4
5402# 305 "/usr/include/bits/socket.h" 2 3 4
5403
5404
5405
5406struct linger
5407 {
5408 int l_onoff;
5409 int l_linger;
5410 };
5411# 36 "/usr/include/sys/socket.h" 2 3 4
5412
5413
5414
5415
5416struct osockaddr
5417 {
5418 unsigned short int sa_family;
5419 unsigned char sa_data[14];
5420 };
5421
5422
5423
5424
5425enum
5426{
5427 SHUT_RD = 0,
5428
5429 SHUT_WR,
5430
5431 SHUT_RDWR
5432
5433};
5434# 100 "/usr/include/sys/socket.h" 3 4
5435extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__));
5436
5437
5438
5439
5440
5441extern int socketpair (int __domain, int __type, int __protocol,
5442 int __fds[2]) __attribute__ ((__nothrow__));
5443
5444
5445extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len)
5446 __attribute__ ((__nothrow__));
5447
5448
5449extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
5450 socklen_t *__restrict __len) __attribute__ ((__nothrow__));
5451# 124 "/usr/include/sys/socket.h" 3 4
5452extern int connect (int __fd, __const struct sockaddr * __addr, socklen_t __len);
5453
5454
5455
5456extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
5457 socklen_t *__restrict __len) __attribute__ ((__nothrow__));
5458
5459
5460
5461
5462
5463
5464extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
5465
5466
5467
5468
5469
5470
5471extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
5472
5473
5474
5475
5476
5477
5478extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
5479 int __flags, __const struct sockaddr * __addr,
5480 socklen_t __addr_len);
5481# 161 "/usr/include/sys/socket.h" 3 4
5482extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
5483 int __flags, struct sockaddr *__restrict __addr,
5484 socklen_t *__restrict __addr_len);
5485
5486
5487
5488
5489
5490
5491
5492extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
5493 int __flags);
5494
5495
5496
5497
5498
5499
5500extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
5501
5502
5503
5504
5505
5506extern int getsockopt (int __fd, int __level, int __optname,
5507 void *__restrict __optval,
5508 socklen_t *__restrict __optlen) __attribute__ ((__nothrow__));
5509
5510
5511
5512
5513extern int setsockopt (int __fd, int __level, int __optname,
5514 __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__));
5515
5516
5517
5518
5519
5520extern int listen (int __fd, int __n) __attribute__ ((__nothrow__));
5521# 209 "/usr/include/sys/socket.h" 3 4
5522extern int accept (int __fd, struct sockaddr *__restrict __addr,
5523 socklen_t *__restrict __addr_len);
5524
5525
5526
5527
5528
5529
5530
5531extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__));
5532# 231 "/usr/include/sys/socket.h" 3 4
5533extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__));
5534
5535
5536
5537# 87 "netlib.c" 2
5538# 1 "/usr/include/netinet/in.h" 1 3 4
5539# 23 "/usr/include/netinet/in.h" 3 4
5540# 1 "/usr/include/stdint.h" 1 3 4
5541# 28 "/usr/include/stdint.h" 3 4
5542# 1 "/usr/include/bits/wordsize.h" 1 3 4
5543# 29 "/usr/include/stdint.h" 2 3 4
5544# 49 "/usr/include/stdint.h" 3 4
5545typedef unsigned char uint8_t;
5546typedef unsigned short int uint16_t;
5547
5548typedef unsigned int uint32_t;
5549
5550
5551
5552
5553
5554__extension__
5555typedef unsigned long long int uint64_t;
5556
5557
5558
5559
5560
5561
5562typedef signed char int_least8_t;
5563typedef short int int_least16_t;
5564typedef int int_least32_t;
5565
5566
5567
5568__extension__
5569typedef long long int int_least64_t;
5570
5571
5572
5573typedef unsigned char uint_least8_t;
5574typedef unsigned short int uint_least16_t;
5575typedef unsigned int uint_least32_t;
5576
5577
5578
5579__extension__
5580typedef unsigned long long int uint_least64_t;
5581
5582
5583
5584
5585
5586
5587typedef signed char int_fast8_t;
5588
5589
5590
5591
5592
5593typedef int int_fast16_t;
5594typedef int int_fast32_t;
5595__extension__
5596typedef long long int int_fast64_t;
5597
5598
5599
5600typedef unsigned char uint_fast8_t;
5601
5602
5603
5604
5605
5606typedef unsigned int uint_fast16_t;
5607typedef unsigned int uint_fast32_t;
5608__extension__
5609typedef unsigned long long int uint_fast64_t;
5610# 129 "/usr/include/stdint.h" 3 4
5611typedef unsigned int uintptr_t;
5612# 138 "/usr/include/stdint.h" 3 4
5613__extension__
5614typedef long long int intmax_t;
5615__extension__
5616typedef unsigned long long int uintmax_t;
5617# 24 "/usr/include/netinet/in.h" 2 3 4
5618
5619
5620
5621
5622
5623
5624
5625enum
5626 {
5627 IPPROTO_IP = 0,
5628
5629 IPPROTO_HOPOPTS = 0,
5630
5631 IPPROTO_ICMP = 1,
5632
5633 IPPROTO_IGMP = 2,
5634
5635 IPPROTO_IPIP = 4,
5636
5637 IPPROTO_TCP = 6,
5638
5639 IPPROTO_EGP = 8,
5640
5641 IPPROTO_PUP = 12,
5642
5643 IPPROTO_UDP = 17,
5644
5645 IPPROTO_IDP = 22,
5646
5647 IPPROTO_TP = 29,
5648
5649 IPPROTO_IPV6 = 41,
5650
5651 IPPROTO_ROUTING = 43,
5652
5653 IPPROTO_FRAGMENT = 44,
5654
5655 IPPROTO_RSVP = 46,
5656
5657 IPPROTO_GRE = 47,
5658
5659 IPPROTO_ESP = 50,
5660
5661 IPPROTO_AH = 51,
5662
5663 IPPROTO_ICMPV6 = 58,
5664
5665 IPPROTO_NONE = 59,
5666
5667 IPPROTO_DSTOPTS = 60,
5668
5669 IPPROTO_MTP = 92,
5670
5671 IPPROTO_ENCAP = 98,
5672
5673 IPPROTO_PIM = 103,
5674
5675 IPPROTO_COMP = 108,
5676
5677 IPPROTO_SCTP = 132,
5678
5679 IPPROTO_RAW = 255,
5680
5681 IPPROTO_MAX
5682 };
5683
5684
5685
5686typedef uint16_t in_port_t;
5687
5688
5689enum
5690 {
5691 IPPORT_ECHO = 7,
5692 IPPORT_DISCARD = 9,
5693 IPPORT_SYSTAT = 11,
5694 IPPORT_DAYTIME = 13,
5695 IPPORT_NETSTAT = 15,
5696 IPPORT_FTP = 21,
5697 IPPORT_TELNET = 23,
5698 IPPORT_SMTP = 25,
5699 IPPORT_TIMESERVER = 37,
5700 IPPORT_NAMESERVER = 42,
5701 IPPORT_WHOIS = 43,
5702 IPPORT_MTP = 57,
5703
5704 IPPORT_TFTP = 69,
5705 IPPORT_RJE = 77,
5706 IPPORT_FINGER = 79,
5707 IPPORT_TTYLINK = 87,
5708 IPPORT_SUPDUP = 95,
5709
5710
5711 IPPORT_EXECSERVER = 512,
5712 IPPORT_LOGINSERVER = 513,
5713 IPPORT_CMDSERVER = 514,
5714 IPPORT_EFSSERVER = 520,
5715
5716
5717 IPPORT_BIFFUDP = 512,
5718 IPPORT_WHOSERVER = 513,
5719 IPPORT_ROUTESERVER = 520,
5720
5721
5722 IPPORT_RESERVED = 1024,
5723
5724
5725 IPPORT_USERRESERVED = 5000
5726 };
5727
5728
5729
5730typedef uint32_t in_addr_t;
5731struct in_addr
5732 {
5733 in_addr_t s_addr;
5734 };
5735# 193 "/usr/include/netinet/in.h" 3 4
5736struct in6_addr
5737 {
5738 union
5739 {
5740 uint8_t u6_addr8[16];
5741 uint16_t u6_addr16[8];
5742 uint32_t u6_addr32[4];
5743 } in6_u;
5744
5745
5746
5747 };
5748
5749extern const struct in6_addr in6addr_any;
5750extern const struct in6_addr in6addr_loopback;
5751# 219 "/usr/include/netinet/in.h" 3 4
5752struct sockaddr_in
5753 {
5754 sa_family_t sin_family;
5755 in_port_t sin_port;
5756 struct in_addr sin_addr;
5757
5758
5759 unsigned char sin_zero[sizeof (struct sockaddr) -
5760 (sizeof (unsigned short int)) -
5761 sizeof (in_port_t) -
5762 sizeof (struct in_addr)];
5763 };
5764
5765
5766struct sockaddr_in6
5767 {
5768 sa_family_t sin6_family;
5769 in_port_t sin6_port;
5770 uint32_t sin6_flowinfo;
5771 struct in6_addr sin6_addr;
5772 uint32_t sin6_scope_id;
5773 };
5774
5775
5776
5777struct ip_mreq
5778 {
5779
5780 struct in_addr imr_multiaddr;
5781
5782
5783 struct in_addr imr_interface;
5784 };
5785
5786struct ip_mreq_source
5787 {
5788
5789 struct in_addr imr_multiaddr;
5790
5791
5792 struct in_addr imr_interface;
5793
5794
5795 struct in_addr imr_sourceaddr;
5796 };
5797
5798
5799struct ipv6_mreq
5800 {
5801
5802 struct in6_addr ipv6mr_multiaddr;
5803
5804
5805 unsigned int ipv6mr_interface;
5806 };
5807
5808
5809
5810struct group_req
5811 {
5812
5813 uint32_t gr_interface;
5814
5815
5816 struct sockaddr_storage gr_group;
5817 };
5818
5819struct group_source_req
5820 {
5821
5822 uint32_t gsr_interface;
5823
5824
5825 struct sockaddr_storage gsr_group;
5826
5827
5828 struct sockaddr_storage gsr_source;
5829 };
5830
5831
5832
5833struct ip_msfilter
5834 {
5835
5836 struct in_addr imsf_multiaddr;
5837
5838
5839 struct in_addr imsf_interface;
5840
5841
5842 uint32_t imsf_fmode;
5843
5844
5845 uint32_t imsf_numsrc;
5846
5847 struct in_addr imsf_slist[1];
5848 };
5849
5850
5851
5852
5853
5854struct group_filter
5855 {
5856
5857 uint32_t gf_interface;
5858
5859
5860 struct sockaddr_storage gf_group;
5861
5862
5863 uint32_t gf_fmode;
5864
5865
5866 uint32_t gf_numsrc;
5867
5868 struct sockaddr_storage gf_slist[1];
5869};
5870# 345 "/usr/include/netinet/in.h" 3 4
5871# 1 "/usr/include/bits/in.h" 1 3 4
5872# 82 "/usr/include/bits/in.h" 3 4
5873struct ip_opts
5874 {
5875 struct in_addr ip_dst;
5876 char ip_opts[40];
5877 };
5878
5879
5880struct ip_mreqn
5881 {
5882 struct in_addr imr_multiaddr;
5883 struct in_addr imr_address;
5884 int imr_ifindex;
5885 };
5886
5887
5888struct in_pktinfo
5889 {
5890 int ipi_ifindex;
5891 struct in_addr ipi_spec_dst;
5892 struct in_addr ipi_addr;
5893 };
5894# 346 "/usr/include/netinet/in.h" 2 3 4
5895# 354 "/usr/include/netinet/in.h" 3 4
5896extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5897extern uint16_t ntohs (uint16_t __netshort)
5898 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5899extern uint32_t htonl (uint32_t __hostlong)
5900 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5901extern uint16_t htons (uint16_t __hostshort)
5902 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
5903
5904
5905
5906
5907# 1 "/usr/include/bits/byteswap.h" 1 3 4
5908# 366 "/usr/include/netinet/in.h" 2 3 4
5909# 428 "/usr/include/netinet/in.h" 3 4
5910extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__));
5911
5912
5913extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
5914 __attribute__ ((__nothrow__));
5915# 456 "/usr/include/netinet/in.h" 3 4
5916struct in6_pktinfo
5917 {
5918 struct in6_addr ipi6_addr;
5919 unsigned int ipi6_ifindex;
5920 };
5921# 510 "/usr/include/netinet/in.h" 3 4
5922
5923# 88 "netlib.c" 2
5924# 1 "/usr/include/arpa/inet.h" 1 3 4
5925# 31 "/usr/include/arpa/inet.h" 3 4
5926
5927
5928
5929
5930extern in_addr_t inet_addr (__const char *__cp) __attribute__ ((__nothrow__));
5931
5932
5933extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__));
5934
5935
5936
5937extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
5938 __attribute__ ((__nothrow__));
5939
5940
5941extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__));
5942
5943
5944
5945extern in_addr_t inet_network (__const char *__cp) __attribute__ ((__nothrow__));
5946
5947
5948
5949extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__));
5950
5951
5952
5953
5954extern int inet_pton (int __af, __const char *__restrict __cp,
5955 void *__restrict __buf) __attribute__ ((__nothrow__));
5956
5957
5958
5959
5960extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
5961 char *__restrict __buf, socklen_t __len)
5962 __attribute__ ((__nothrow__));
5963
5964
5965
5966
5967
5968
5969extern int inet_aton (__const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__));
5970
5971
5972
5973extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__));
5974
5975
5976
5977
5978extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
5979 char *__buf, size_t __len) __attribute__ ((__nothrow__));
5980
5981
5982
5983
5984extern int inet_net_pton (int __af, __const char *__cp,
5985 void *__buf, size_t __len) __attribute__ ((__nothrow__));
5986
5987
5988
5989
5990extern unsigned int inet_nsap_addr (__const char *__cp,
5991 unsigned char *__buf, int __len) __attribute__ ((__nothrow__));
5992
5993
5994
5995extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
5996 char *__buf) __attribute__ ((__nothrow__));
5997
5998
5999
6000# 89 "netlib.c" 2
6001# 1 "/usr/include/netdb.h" 1 3 4
6002# 33 "/usr/include/netdb.h" 3 4
6003# 1 "/usr/include/rpc/netdb.h" 1 3 4
6004# 42 "/usr/include/rpc/netdb.h" 3 4
6005# 1 "/home/roc/toolchain/svn/gcc4.1/uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4
6006# 43 "/usr/include/rpc/netdb.h" 2 3 4
6007
6008
6009
6010struct rpcent
6011{
6012 char *r_name;
6013 char **r_aliases;
6014 int r_number;
6015};
6016
6017extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__));
6018extern void endrpcent (void) __attribute__ ((__nothrow__));
6019extern struct rpcent *getrpcbyname (__const char *__name) __attribute__ ((__nothrow__));
6020extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__));
6021extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__));
6022
6023
6024extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
6025 char *__buffer, size_t __buflen,
6026 struct rpcent **__result) __attribute__ ((__nothrow__));
6027
6028extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
6029 char *__buffer, size_t __buflen,
6030 struct rpcent **__result) __attribute__ ((__nothrow__));
6031
6032extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
6033 size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__));
6034
6035
6036
6037# 34 "/usr/include/netdb.h" 2 3 4
6038# 43 "/usr/include/netdb.h" 3 4
6039# 1 "/usr/include/bits/netdb.h" 1 3 4
6040# 27 "/usr/include/bits/netdb.h" 3 4
6041struct netent
6042{
6043 char *n_name;
6044 char **n_aliases;
6045 int n_addrtype;
6046 uint32_t n_net;
6047};
6048# 44 "/usr/include/netdb.h" 2 3 4
6049# 54 "/usr/include/netdb.h" 3 4
6050
6051
6052
6053
6054
6055
6056
6057extern int *__h_errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
6058# 88 "/usr/include/netdb.h" 3 4
6059extern void herror (__const char *__str) __attribute__ ((__nothrow__));
6060
6061
6062extern __const char *hstrerror (int __err_num) __attribute__ ((__nothrow__));
6063
6064
6065
6066
6067struct hostent
6068{
6069 char *h_name;
6070 char **h_aliases;
6071 int h_addrtype;
6072 int h_length;
6073 char **h_addr_list;
6074
6075};
6076
6077
6078
6079
6080
6081
6082extern void sethostent (int __stay_open);
6083
6084
6085
6086
6087
6088extern void endhostent (void);
6089
6090
6091
6092
6093
6094
6095extern struct hostent *gethostent (void);
6096
6097
6098
6099
6100
6101
6102extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
6103 int __type);
6104
6105
6106
6107
6108
6109extern struct hostent *gethostbyname (__const char *__name);
6110# 149 "/usr/include/netdb.h" 3 4
6111extern struct hostent *gethostbyname2 (__const char *__name, int __af);
6112# 161 "/usr/include/netdb.h" 3 4
6113extern int gethostent_r (struct hostent *__restrict __result_buf,
6114 char *__restrict __buf, size_t __buflen,
6115 struct hostent **__restrict __result,
6116 int *__restrict __h_errnop);
6117
6118extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
6119 int __type,
6120 struct hostent *__restrict __result_buf,
6121 char *__restrict __buf, size_t __buflen,
6122 struct hostent **__restrict __result,
6123 int *__restrict __h_errnop);
6124
6125extern int gethostbyname_r (__const char *__restrict __name,
6126 struct hostent *__restrict __result_buf,
6127 char *__restrict __buf, size_t __buflen,
6128 struct hostent **__restrict __result,
6129 int *__restrict __h_errnop);
6130
6131extern int gethostbyname2_r (__const char *__restrict __name, int __af,
6132 struct hostent *__restrict __result_buf,
6133 char *__restrict __buf, size_t __buflen,
6134 struct hostent **__restrict __result,
6135 int *__restrict __h_errnop);
6136# 192 "/usr/include/netdb.h" 3 4
6137extern void setnetent (int __stay_open);
6138
6139
6140
6141
6142
6143extern void endnetent (void);
6144
6145
6146
6147
6148
6149
6150extern struct netent *getnetent (void);
6151
6152
6153
6154
6155
6156
6157extern struct netent *getnetbyaddr (uint32_t __net, int __type);
6158
6159
6160
6161
6162
6163extern struct netent *getnetbyname (__const char *__name);
6164# 231 "/usr/include/netdb.h" 3 4
6165extern int getnetent_r (struct netent *__restrict __result_buf,
6166 char *__restrict __buf, size_t __buflen,
6167 struct netent **__restrict __result,
6168 int *__restrict __h_errnop);
6169
6170extern int getnetbyaddr_r (uint32_t __net, int __type,
6171 struct netent *__restrict __result_buf,
6172 char *__restrict __buf, size_t __buflen,
6173 struct netent **__restrict __result,
6174 int *__restrict __h_errnop);
6175
6176extern int getnetbyname_r (__const char *__restrict __name,
6177 struct netent *__restrict __result_buf,
6178 char *__restrict __buf, size_t __buflen,
6179 struct netent **__restrict __result,
6180 int *__restrict __h_errnop);
6181
6182
6183
6184
6185struct servent
6186{
6187 char *s_name;
6188 char **s_aliases;
6189 int s_port;
6190 char *s_proto;
6191};
6192
6193
6194
6195
6196
6197
6198extern void setservent (int __stay_open);
6199
6200
6201
6202
6203
6204extern void endservent (void);
6205
6206
6207
6208
6209
6210
6211extern struct servent *getservent (void);
6212
6213
6214
6215
6216
6217
6218extern struct servent *getservbyname (__const char *__name,
6219 __const char *__proto);
6220
6221
6222
6223
6224
6225
6226extern struct servent *getservbyport (int __port, __const char *__proto);
6227# 303 "/usr/include/netdb.h" 3 4
6228extern int getservent_r (struct servent *__restrict __result_buf,
6229 char *__restrict __buf, size_t __buflen,
6230 struct servent **__restrict __result);
6231
6232extern int getservbyname_r (__const char *__restrict __name,
6233 __const char *__restrict __proto,
6234 struct servent *__restrict __result_buf,
6235 char *__restrict __buf, size_t __buflen,
6236 struct servent **__restrict __result);
6237
6238extern int getservbyport_r (int __port, __const char *__restrict __proto,
6239 struct servent *__restrict __result_buf,
6240 char *__restrict __buf, size_t __buflen,
6241 struct servent **__restrict __result);
6242
6243
6244
6245
6246struct protoent
6247{
6248 char *p_name;
6249 char **p_aliases;
6250 int p_proto;
6251};
6252
6253
6254
6255
6256
6257
6258extern void setprotoent (int __stay_open);
6259
6260
6261
6262
6263
6264extern void endprotoent (void);
6265
6266
6267
6268
6269
6270
6271extern struct protoent *getprotoent (void);
6272
6273
6274
6275
6276
6277extern struct protoent *getprotobyname (__const char *__name);
6278
6279
6280
6281
6282
6283extern struct protoent *getprotobynumber (int __proto);
6284# 369 "/usr/include/netdb.h" 3 4
6285extern int getprotoent_r (struct protoent *__restrict __result_buf,
6286 char *__restrict __buf, size_t __buflen,
6287 struct protoent **__restrict __result);
6288
6289extern int getprotobyname_r (__const char *__restrict __name,
6290 struct protoent *__restrict __result_buf,
6291 char *__restrict __buf, size_t __buflen,
6292 struct protoent **__restrict __result);
6293
6294extern int getprotobynumber_r (int __proto,
6295 struct protoent *__restrict __result_buf,
6296 char *__restrict __buf, size_t __buflen,
6297 struct protoent **__restrict __result);
6298# 390 "/usr/include/netdb.h" 3 4
6299extern int setnetgrent (__const char *__netgroup);
6300
6301
6302
6303
6304
6305
6306
6307extern void endnetgrent (void);
6308# 407 "/usr/include/netdb.h" 3 4
6309extern int getnetgrent (char **__restrict __hostp,
6310 char **__restrict __userp,
6311 char **__restrict __domainp);
6312# 418 "/usr/include/netdb.h" 3 4
6313extern int innetgr (__const char *__netgroup, __const char *__host,
6314 __const char *__user, __const char *domain);
6315
6316
6317
6318
6319
6320
6321
6322extern int getnetgrent_r (char **__restrict __hostp,
6323 char **__restrict __userp,
6324 char **__restrict __domainp,
6325 char *__restrict __buffer, size_t __buflen);
6326# 446 "/usr/include/netdb.h" 3 4
6327extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
6328 __const char *__restrict __locuser,
6329 __const char *__restrict __remuser,
6330 __const char *__restrict __cmd, int *__restrict __fd2p);
6331# 458 "/usr/include/netdb.h" 3 4
6332extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
6333 __const char *__restrict __locuser,
6334 __const char *__restrict __remuser,
6335 __const char *__restrict __cmd, int *__restrict __fd2p,
6336 sa_family_t __af);
6337# 474 "/usr/include/netdb.h" 3 4
6338extern int rexec (char **__restrict __ahost, int __rport,
6339 __const char *__restrict __name,
6340 __const char *__restrict __pass,
6341 __const char *__restrict __cmd, int *__restrict __fd2p);
6342# 486 "/usr/include/netdb.h" 3 4
6343extern int rexec_af (char **__restrict __ahost, int __rport,
6344 __const char *__restrict __name,
6345 __const char *__restrict __pass,
6346 __const char *__restrict __cmd, int *__restrict __fd2p,
6347 sa_family_t __af);
6348# 500 "/usr/include/netdb.h" 3 4
6349extern int ruserok (__const char *__rhost, int __suser,
6350 __const char *__remuser, __const char *__locuser);
6351# 510 "/usr/include/netdb.h" 3 4
6352extern int ruserok_af (__const char *__rhost, int __suser,
6353 __const char *__remuser, __const char *__locuser,
6354 sa_family_t __af);
6355# 522 "/usr/include/netdb.h" 3 4
6356extern int rresvport (int *__alport);
6357# 531 "/usr/include/netdb.h" 3 4
6358extern int rresvport_af (int *__alport, sa_family_t __af);
6359
6360
6361
6362
6363
6364
6365struct addrinfo
6366{
6367 int ai_flags;
6368 int ai_family;
6369 int ai_socktype;
6370 int ai_protocol;
6371 socklen_t ai_addrlen;
6372 struct sockaddr *ai_addr;
6373 char *ai_canonname;
6374 struct addrinfo *ai_next;
6375};
6376# 631 "/usr/include/netdb.h" 3 4
6377extern int getaddrinfo (__const char *__restrict __name,
6378 __const char *__restrict __service,
6379 __const struct addrinfo *__restrict __req,
6380 struct addrinfo **__restrict __pai);
6381
6382
6383extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__));
6384
6385
6386extern __const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__));
6387
6388
6389
6390
6391
6392extern int getnameinfo (__const struct sockaddr *__restrict __sa,
6393 socklen_t __salen, char *__restrict __host,
6394 socklen_t __hostlen, char *__restrict __serv,
6395 socklen_t __servlen, unsigned int __flags);
6396# 682 "/usr/include/netdb.h" 3 4
6397
6398# 90 "netlib.c" 2
6399# 1 "/usr/include/errno.h" 1 3 4
6400# 32 "/usr/include/errno.h" 3 4
6401
6402
6403
6404
6405# 1 "/usr/include/bits/errno.h" 1 3 4
6406# 25 "/usr/include/bits/errno.h" 3 4
6407# 1 "/usr/include/linux/errno.h" 1 3 4
6408# 139 "/usr/include/linux/errno.h" 3 4
6409# 1 "/usr/include/asm/errno.h" 1 3 4
6410# 11 "/usr/include/asm/errno.h" 3 4
6411# 1 "/usr/include/asm-i386/errno.h" 1 3 4
6412# 12 "/usr/include/asm/errno.h" 2 3 4
6413# 140 "/usr/include/linux/errno.h" 2 3 4
6414# 26 "/usr/include/bits/errno.h" 2 3 4
6415# 38 "/usr/include/bits/errno.h" 3 4
6416extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
6417# 37 "/usr/include/errno.h" 2 3 4
6418# 59 "/usr/include/errno.h" 3 4
6419
6420# 91 "netlib.c" 2
6421# 1 "/usr/include/sys/utsname.h" 1 3 4
6422# 28 "/usr/include/sys/utsname.h" 3 4
6423
6424
6425# 1 "/usr/include/bits/utsname.h" 1 3 4
6426# 31 "/usr/include/sys/utsname.h" 2 3 4
6427# 49 "/usr/include/sys/utsname.h" 3 4
6428struct utsname
6429 {
6430
6431 char sysname[65];
6432
6433
6434 char nodename[65];
6435
6436
6437 char release[65];
6438
6439 char version[65];
6440
6441
6442 char machine[65];
6443
6444
6445
6446
6447
6448
6449 char __domainname[65];
6450
6451
6452 };
6453# 82 "/usr/include/sys/utsname.h" 3 4
6454extern int uname (struct utsname *__name) __attribute__ ((__nothrow__));
6455
6456
6457
6458# 92 "netlib.c" 2
6459
6460# 1 "/usr/include/sys/param.h" 1 3 4
6461# 22 "/usr/include/sys/param.h" 3 4
6462# 1 "/usr/include/limits.h" 1 3 4
6463# 23 "/usr/include/sys/param.h" 2 3 4
6464
6465# 1 "/usr/include/linux/param.h" 1 3 4
6466
6467
6468
6469# 1 "/usr/include/asm/param.h" 1 3 4
6470# 11 "/usr/include/asm/param.h" 3 4
6471# 1 "/usr/include/asm-i386/param.h" 1 3 4
6472# 12 "/usr/include/asm/param.h" 2 3 4
6473# 5 "/usr/include/linux/param.h" 2 3 4
6474# 25 "/usr/include/sys/param.h" 2 3 4
6475# 94 "netlib.c" 2
6476# 155 "netlib.c"
6477# 1 "netlib.h" 1
6478
6479
6480
6481
6482# 1 "../config.h" 1
6483# 6 "netlib.h" 2
6484# 199 "netlib.h"
6485# 1 "/usr/include/inttypes.h" 1 3 4
6486# 35 "/usr/include/inttypes.h" 3 4
6487typedef int __gwchar_t;
6488# 274 "/usr/include/inttypes.h" 3 4
6489
6490# 288 "/usr/include/inttypes.h" 3 4
6491typedef struct
6492 {
6493 long long int quot;
6494 long long int rem;
6495 } imaxdiv_t;
6496
6497
6498
6499
6500
6501extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
6502
6503
6504extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
6505 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
6506
6507
6508extern intmax_t strtoimax (__const char *__restrict __nptr,
6509 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__));
6510
6511
6512extern uintmax_t strtoumax (__const char *__restrict __nptr,
6513 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__));
6514
6515
6516extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
6517 __gwchar_t **__restrict __endptr, int __base)
6518 __attribute__ ((__nothrow__));
6519
6520
6521extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
6522 __gwchar_t ** __restrict __endptr, int __base)
6523 __attribute__ ((__nothrow__));
6524# 396 "/usr/include/inttypes.h" 3 4
6525extern __inline intmax_t
6526__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base)
6527
6528{
6529 return __strtoll_internal (nptr, endptr, base, 0);
6530}
6531# 414 "/usr/include/inttypes.h" 3 4
6532extern __inline uintmax_t
6533__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base)
6534
6535{
6536 return __strtoull_internal (nptr, endptr, base, 0);
6537}
6538
6539
6540
6541__extension__
6542extern long long int __wcstoll_internal (__const __gwchar_t *
6543 __restrict __nptr,
6544 __gwchar_t **__restrict __endptr,
6545 int __base, int __group) __attribute__ ((__nothrow__));
6546
6547
6548extern __inline intmax_t
6549__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
6550
6551{
6552 return __wcstoll_internal (nptr, endptr, base, 0);
6553}
6554
6555
6556
6557
6558__extension__
6559extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
6560 __restrict __nptr,
6561 __gwchar_t **
6562 __restrict __endptr,
6563 int __base,
6564 int __group) __attribute__ ((__nothrow__));
6565
6566
6567extern __inline uintmax_t
6568__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
6569
6570{
6571 return __wcstoull_internal (nptr, endptr, base, 0);
6572}
6573
6574
6575
6576
6577
6578# 200 "netlib.h" 2
6579
6580
6581
6582
6583
6584
6585enum sock_buffer{
6586 SEND_BUFFER,
6587 RECV_BUFFER
6588};
6589
6590
6591
6592
6593
6594
6595
6596union netperf_request_struct {
6597 struct {
6598 int request_type;
6599 int dummy;
6600 int test_specific_data[62];
6601 } content;
6602 double dummy;
6603};
6604
6605union netperf_response_struct {
6606 struct {
6607 int response_type;
6608 int serv_errno;
6609 int test_specific_data[62];
6610 } content;
6611 double dummy;
6612};
6613
6614struct ring_elt {
6615 struct ring_elt *next;
6616 char *buffer_base;
6617 char *buffer_ptr;
6618};
6619# 332 "netlib.h"
6620struct sendfile_ring_elt {
6621 struct sendfile_ring_elt *next;
6622 int fildes;
6623
6624 off_t offset;
6625
6626 size_t length;
6627
6628
6629
6630 struct iovec *hdtrl;
6631
6632
6633
6634 int flags;
6635
6636
6637
6638};
6639# 156 "netlib.c" 2
6640# 1 "netsh.h" 1
6641# 37 "netsh.h"
6642extern char *program;
6643
6644
6645extern char host_name[255];
6646extern char local_host_name[255];
6647extern char test_port[10];
6648extern char local_test_port[10];
6649extern int address_family;
6650extern int local_address_family;
6651extern int parse_address_family(char family_string[]);
6652extern void set_defaults();
6653extern void scan_cmd_line(int argc, char *argv[]);
6654extern void dump_globals();
6655extern void break_args(char *s, char *arg1, char *arg2);
6656extern void break_args_explicit(char *s, char *arg1, char *arg2);
6657extern void print_netserver_usage();
6658
6659
6660extern int
6661 debug,
6662 print_headers,
6663 verbosity;
6664
6665
6666
6667extern int
6668 test_time,
6669 test_len_ticks,
6670 test_bytes,
6671 test_trans;
6672
6673
6674extern int
6675 local_recv_align,
6676 local_send_align,
6677 remote_recv_align,
6678 remote_send_align,
6679 local_send_offset,
6680 local_recv_offset,
6681 remote_send_offset,
6682 remote_recv_offset;
6683# 101 "netsh.h"
6684extern int confidence_level;
6685extern int iteration_min;
6686extern int iteration_max;
6687extern double interval;
6688
6689
6690extern int send_width;
6691extern int recv_width;
6692
6693
6694extern int af;
6695
6696
6697extern int
6698 local_cpu_usage,
6699 remote_cpu_usage;
6700
6701extern float
6702 local_cpu_rate,
6703 remote_cpu_rate;
6704
6705extern int
6706 shell_num_cpus;
6707
6708extern char
6709 test_name[4096];
6710
6711extern char
6712 fill_file[4096];
6713# 157 "netlib.c" 2
6714# 1 "netcpu.h" 1
6715
6716
6717
6718extern void cpu_util_init(void);
6719extern void cpu_util_terminate(void);
6720extern int get_cpu_method();
6721extern void get_cpu_idle(uint64_t *res);
6722extern float calibrate_idle_rate(int iterations, int interval);
6723extern float calc_cpu_util_internal(float elapsed);
6724extern void cpu_start_internal(void);
6725extern void cpu_stop_internal(void);
6726# 158 "netlib.c" 2
6727# 183 "netlib.c"
6728int
6729 lib_num_loc_cpus;
6730
6731
6732
6733int lib_use_idle;
6734int cpu_method;
6735
6736struct timeval time1, time2;
6737struct timezone tz;
6738float lib_elapsed,
6739 lib_local_maxrate,
6740 lib_remote_maxrate,
6741 lib_local_cpu_util,
6742 lib_remote_cpu_util;
6743
6744float lib_local_per_cpu_util[256];
6745
6746int *request_array;
6747int *response_array;
6748
6749
6750int netlib_control = -1;
6751int server_sock = -1;
6752
6753
6754int local_proc_affinity,remote_proc_affinity = -1;
6755
6756
6757
6758char local_data_port[10];
6759char remote_data_port[10];
6760
6761char *local_data_address=((void *)0);
6762char *remote_data_address=((void *)0);
6763
6764int local_data_family=0;
6765int remote_data_family=0;
6766
6767
6768
6769
6770
6771
6772
6773union netperf_request_struct netperf_request;
6774union netperf_response_struct netperf_response;
6775
6776FILE *where;
6777
6778char libfmt = 'm';
6779# 248 "netlib.c"
6780int times_up;
6781# 266 "netlib.c"
6782static int measuring_cpu;
6783int
6784netlib_get_page_size(void) {
6785# 289 "netlib.c"
6786 return(sysconf(_SC_PAGESIZE));
6787
6788
6789}
6790# 421 "netlib.c"
6791char *
6792inet_ttos(int type)
6793{
6794 switch (type) {
6795 case SOCK_DGRAM:
6796 return("SOCK_DGRAM");
6797 break;
6798 case SOCK_STREAM:
6799 return("SOCK_STREAM");
6800 break;
6801 default:
6802 return("SOCK_UNKNOWN");
6803 }
6804}
6805
6806
6807
6808char unknown[32];
6809
6810char *
6811inet_ptos(int protocol) {
6812 switch (protocol) {
6813 case IPPROTO_TCP:
6814 return("IPPROTO_TCP");
6815 break;
6816 case IPPROTO_UDP:
6817 return("IPPROTO_UDP");
6818 break;
6819
6820 case IPPROTO_SCTP:
6821 return("IPPROTO_SCTP");
6822 break;
6823
6824 default:
6825 snprintf(unknown,sizeof(unknown),"IPPROTO_UNKNOWN(%d)",protocol);
6826 return(unknown);
6827 }
6828}
6829
6830char *
6831inet_ftos(int family)
6832{
6833 switch(family) {
6834 case 2:
6835 return("AF_INET");
6836 break;
6837
6838 case 10:
6839 return("AF_INET6");
6840 break;
6841
6842 default:
6843 return("AF_UNSPEC");
6844 }
6845}
6846
6847int
6848inet_nton(int af, const void *src, char *dst, int cnt)
6849
6850{
6851
6852 switch (af) {
6853 case 2:
6854
6855 if (cnt >= 4) {
6856 memcpy(dst,src,4);
6857 return 4;
6858 }
6859 else {
6860 (*__errno_location ())=28;
6861 return(-1);
6862 }
6863 break;
6864
6865 case 10:
6866 if (cnt >= 16) {
6867 memcpy(dst,src,16);
6868 return(16);
6869 }
6870 else {
6871 (*__errno_location ())=28;
6872 return(-1);
6873 }
6874 break;
6875
6876 default:
6877 (*__errno_location ()) = 97;
6878 return(-1);
6879 }
6880}
6881
6882double
6883ntohd(double net_double)
6884
6885{
6886
6887 union {
6888 double whole_thing;
6889 unsigned int words[2];
6890 unsigned char bytes[8];
6891 } conv_rec;
6892
6893 unsigned char scratch;
6894 int i;
6895
6896
6897
6898
6899 if ((__extension__ ({ register unsigned int __v, __x = (1L); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })) == 1L) {
6900 return(net_double);
6901 }
6902
6903 conv_rec.whole_thing = net_double;
6904
6905
6906
6907
6908 conv_rec.words[0] = (__extension__ ({ register unsigned int __v, __x = (conv_rec.words[0]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
6909 conv_rec.words[1] = (__extension__ ({ register unsigned int __v, __x = (conv_rec.words[1]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
6910
6911
6912 for (i=0; i<= 3; i++) {
6913 scratch = conv_rec.bytes[i];
6914 conv_rec.bytes[i] = conv_rec.bytes[7-i];
6915 conv_rec.bytes[7-i] = scratch;
6916 }
6917
6918 return(conv_rec.whole_thing);
6919
6920}
6921
6922double
6923htond(double host_double)
6924
6925{
6926
6927 union {
6928 double whole_thing;
6929 unsigned int words[2];
6930 unsigned char bytes[8];
6931 } conv_rec;
6932
6933 unsigned char scratch;
6934 int i;
6935
6936
6937
6938
6939 if ((__extension__ ({ register unsigned int __v, __x = (1L); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })) == 1L) {
6940 return(host_double);
6941 }
6942
6943 conv_rec.whole_thing = host_double;
6944
6945
6946 for (i=0; i<= 3; i++) {
6947 scratch = conv_rec.bytes[i];
6948 conv_rec.bytes[i] = conv_rec.bytes[7-i];
6949 conv_rec.bytes[7-i] = scratch;
6950 }
6951
6952
6953
6954
6955
6956 conv_rec.words[0] = (__extension__ ({ register unsigned int __v, __x = (conv_rec.words[0]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
6957 conv_rec.words[1] = (__extension__ ({ register unsigned int __v, __x = (conv_rec.words[1]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
6958
6959 return(conv_rec.whole_thing);
6960
6961}
6962
6963
6964
6965
6966int
6967get_num_cpus()
6968
6969{
6970
6971
6972
6973
6974 int temp_cpus;
6975# 623 "netlib.c"
6976 temp_cpus = sysconf(_SC_NPROCESSORS_ONLN);
6977# 643 "netlib.c"
6978 if (temp_cpus > 256) {
6979 fprintf(where,
6980 "Sorry, this system has more CPUs (%d) than I can handle (%d).\n",
6981 temp_cpus,
6982 256);
6983 fprintf(where,
6984 "Please alter MAXCPUS in netlib.h and recompile.\n");
6985 fflush(where);
6986 exit(1);
6987 }
6988
6989 return(temp_cpus);
6990
6991}
6992# 694 "netlib.c"
6993void
6994
6995
6996
6997
6998
6999
7000catcher(int sig)
7001
7002{
7003# 719 "netlib.c"
7004 switch(sig) {
7005
7006 case 2:
7007 fprintf(where,"netperf: caught SIGINT\n");
7008 fflush(where);
7009 exit(1);
7010 break;
7011 case 14:
7012 if (--test_len_ticks == 0) {
7013
7014 if (times_up != 0) {
7015 fprintf(where,"catcher: timer popped with times_up != 0\n");
7016 fflush(where);
7017 }
7018 times_up = 1;
7019
7020
7021
7022 break;
7023 }
7024 else {
7025# 768 "netlib.c"
7026 fprintf(where,
7027 "catcher: interval timer running unexpectedly!\n");
7028 fflush(where);
7029 times_up = 1;
7030
7031 break;
7032 }
7033 }
7034 return;
7035}
7036
7037
7038void
7039install_signal_catchers()
7040
7041{
7042
7043
7044
7045 struct sigaction action;
7046 int i;
7047
7048 fprintf(where,"installing catcher for all signals\n");
7049 fflush(where);
7050
7051 sigemptyset(&(action.sa_mask));
7052 action.__sigaction_handler.sa_handler = catcher;
7053
7054
7055 action.sa_flags = 0x20000000;
7056
7057
7058
7059
7060
7061 for (i = 1; i <= 65; i++) {
7062 if (i != 14) {
7063 if (sigaction(i,&action,((void *)0)) != 0) {
7064 fprintf(where,
7065 "Could not install signal catcher for sig %d, errno %d\n",
7066 i,
7067 (*__errno_location ()));
7068 fflush(where);
7069
7070 }
7071 }
7072 }
7073
7074
7075
7076}
7077# 859 "netlib.c"
7078void
7079start_timer(int time)
7080{
7081# 900 "netlib.c"
7082struct sigaction action;
7083
7084if (debug) {
7085 fprintf(where,"About to start a timer for %d seconds.\n",time);
7086 fflush(where);
7087}
7088
7089 action.__sigaction_handler.sa_handler = catcher;
7090 sigemptyset(&(action.sa_mask));
7091 sigaddset(&(action.sa_mask),14);
7092
7093
7094
7095
7096 action.sa_flags = 0x20000000;
7097
7098
7099
7100
7101 if (sigaction(14, &action, ((void *)0)) < 0) {
7102 fprintf(where,"start_timer: error installing alarm handler ");
7103 fprintf(where,"errno %d\n",(*__errno_location ()));
7104 fflush(where);
7105 exit(1);
7106 }
7107
7108
7109 if (alarm(time) != 0) {
7110 fprintf(where,
7111 "error starting alarm timer, errno %d\n",
7112 (*__errno_location ()));
7113 fflush(where);
7114 }
7115
7116
7117 test_len_ticks = 1;
7118
7119}
7120
7121
7122
7123void
7124stop_timer()
7125{
7126
7127 alarm(0);
7128# 954 "netlib.c"
7129}
7130# 1029 "netlib.c"
7131void
7132netlib_init()
7133{
7134 int i;
7135
7136 where = stdout;
7137
7138 request_array = (int *)(&netperf_request);
7139 response_array = (int *)(&netperf_response);
7140
7141 for (i = 0; i < 256; i++) {
7142 lib_local_per_cpu_util[i] = 0.0;
7143 }
7144
7145 if (debug) {
7146 fprintf(where,
7147 "netlib_init: request_array at %p\n",
7148 request_array);
7149 fprintf(where,
7150 "netlib_init: response_array at %p\n",
7151 response_array);
7152
7153 fflush(where);
7154 }
7155
7156}
7157
7158
7159
7160
7161
7162
7163
7164unsigned int
7165convert(char *string)
7166
7167{
7168 unsigned int base;
7169 base = atoi(string);
7170 if (strstr(string,"K")) {
7171 base *= 1024;
7172 }
7173 if (strstr(string,"M")) {
7174 base *= (1024 * 1024);
7175 }
7176 if (strstr(string,"G")) {
7177 base *= (1024 * 1024 * 1024);
7178 }
7179 if (strstr(string,"k")) {
7180 base *= (1000);
7181 }
7182 if (strstr(string,"m")) {
7183 base *= (1000 * 1000);
7184 }
7185 if (strstr(string,"g")) {
7186 base *= (1000 * 1000 * 1000);
7187 }
7188 return(base);
7189}
7190# 1098 "netlib.c"
7191struct ring_elt *
7192allocate_buffer_ring(int width, int buffer_size, int alignment, int offset)
7193{
7194
7195 struct ring_elt *first_link = ((void *)0);
7196 struct ring_elt *temp_link = ((void *)0);
7197 struct ring_elt *prev_link;
7198
7199 int i;
7200 int malloc_size;
7201 int bytes_left;
7202 int bytes_read;
7203 int do_fill;
7204
7205 FILE *fill_source;
7206
7207 malloc_size = buffer_size + alignment + offset;
7208
7209
7210
7211 if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (fill_file) && __builtin_constant_p ("") && (__s1_len = strlen (fill_file), __s2_len = strlen (""), (!((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) || __s2_len >= 4)) ? __builtin_strcmp (fill_file, "") : (__builtin_constant_p (fill_file) && ((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) && (__s1_len = strlen (fill_file), __s1_len < 4) ? (__builtin_constant_p ("") && ((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) ? __builtin_strcmp (fill_file, "") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (""); register int __result = (((__const unsigned char *) (__const char *) (fill_file))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (fill_file))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (fill_file))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (fill_file))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("") && ((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) && (__s2_len = strlen (""), __s2_len < 4) ? (__builtin_constant_p (fill_file) && ((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) ? __builtin_strcmp (fill_file, "") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (fill_file); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (""))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (""))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (""))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (""))[3]); } } __result; }))) : __builtin_strcmp (fill_file, "")))); }) == 0) {
7212 do_fill = 0;
7213 fill_source = ((void *)0);
7214 }
7215 else {
7216 do_fill = 1;
7217 fill_source = (FILE *)fopen(fill_file,"r");
7218 if (fill_source == (FILE *)((void *)0)) {
7219 perror("Could not open requested fill file");
7220 exit(1);
7221 }
7222 }
7223
7224 ((void) ((width >= 1) ? 0 : (__assert_fail ("width >= 1", "netlib.c", 1131, __PRETTY_FUNCTION__), 0)));
7225
7226 prev_link = ((void *)0);
7227 for (i = 1; i <= width; i++) {
7228
7229 temp_link = (struct ring_elt *)malloc(sizeof(struct ring_elt));
7230 if (temp_link == ((void *)0)) {
7231 printf("malloc(%u) failed!\n", sizeof(struct ring_elt));
7232 exit(1);
7233 }
7234
7235 if (i == 1) {
7236 first_link = temp_link;
7237 }
7238 temp_link->buffer_base = (char *)malloc(malloc_size);
7239 if (temp_link == ((void *)0)) {
7240 printf("malloc(%d) failed!\n", malloc_size);
7241 exit(1);
7242 }
7243
7244
7245 temp_link->buffer_ptr = (char *)(( (long)(temp_link->buffer_base) +
7246 (long)alignment - 1) &
7247 ~((long)alignment - 1));
7248
7249
7250
7251
7252
7253 temp_link->buffer_ptr += offset;
7254
7255 if (do_fill) {
7256 bytes_left = buffer_size;
7257 while (bytes_left) {
7258 if (((bytes_read = (int)fread(temp_link->buffer_ptr,
7259 1,
7260 bytes_left,
7261 fill_source)) == 0) &&
7262 (feof(fill_source))){
7263 rewind(fill_source);
7264 }
7265 bytes_left -= bytes_read;
7266 }
7267 }
7268 temp_link->next = prev_link;
7269 prev_link = temp_link;
7270 }
7271 if (first_link) {
7272 first_link->next = temp_link;
7273 }
7274
7275 return(first_link);
7276}
7277# 1334 "netlib.c"
7278struct sendfile_ring_elt *
7279alloc_sendfile_buf_ring(int width,
7280 int buffer_size,
7281 int alignment,
7282 int offset)
7283
7284{
7285
7286 struct sendfile_ring_elt *first_link = ((void *)0);
7287 struct sendfile_ring_elt *temp_link = ((void *)0);
7288 struct sendfile_ring_elt *prev_link;
7289
7290 int i;
7291 int fildes;
7292 struct stat statbuf;
7293
7294
7295
7296
7297 if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (fill_file) && __builtin_constant_p ("") && (__s1_len = strlen (fill_file), __s2_len = strlen (""), (!((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) || __s2_len >= 4)) ? __builtin_strcmp (fill_file, "") : (__builtin_constant_p (fill_file) && ((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) && (__s1_len = strlen (fill_file), __s1_len < 4) ? (__builtin_constant_p ("") && ((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) ? __builtin_strcmp (fill_file, "") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (""); register int __result = (((__const unsigned char *) (__const char *) (fill_file))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (fill_file))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (fill_file))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (fill_file))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("") && ((size_t)(const void *)(("") + 1) - (size_t)(const void *)("") == 1) && (__s2_len = strlen (""), __s2_len < 4) ? (__builtin_constant_p (fill_file) && ((size_t)(const void *)((fill_file) + 1) - (size_t)(const void *)(fill_file) == 1) ? __builtin_strcmp (fill_file, "") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (fill_file); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (""))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (""))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (""))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (""))[3]); } } __result; }))) : __builtin_strcmp (fill_file, "")))); }) == 0) {
7298 perror("alloc_sendfile_buf_ring: fill_file must be specified for sendfile option");
7299 exit(1);
7300 }
7301 else {
7302 fildes = open(fill_file , 00);
7303 if (fildes == -1){
7304 perror("alloc_sendfile_buf_ring: Could not open requested file");
7305 exit(1);
7306 }
7307 }
7308
7309
7310
7311
7312
7313 if (stat(fill_file,&statbuf) != 0) {
7314 perror("alloc_sendfile_buf_ring: could not stat file");
7315 exit(1);
7316 }
7317 if (statbuf.st_size < (width * buffer_size)) {
7318
7319 fprintf(stderr,"alloc_sendfile_buf_ring: specified file too small.\n");
7320 fprintf(stderr,"file must be larger than send_width * send_size\n");
7321 fflush(stderr);
7322 exit(1);
7323 }
7324
7325 prev_link = ((void *)0);
7326 for (i = 1; i <= width; i++) {
7327
7328
7329
7330
7331 temp_link = (struct sendfile_ring_elt *)
7332 malloc(sizeof(struct sendfile_ring_elt));
7333 if (temp_link == ((void *)0)) {
7334 printf("malloc(%u) failed!\n", sizeof(struct sendfile_ring_elt));
7335 exit(1);
7336 }
7337
7338
7339
7340 if (i == 1) {
7341 first_link = temp_link;
7342 }
7343
7344
7345
7346
7347
7348
7349 temp_link->fildes = fildes;
7350 temp_link->offset = offset;
7351 offset += buffer_size;
7352 temp_link->length = buffer_size;
7353 temp_link->hdtrl = ((void *)0);
7354 temp_link->flags = 0;
7355
7356
7357
7358 temp_link->next = prev_link;
7359 prev_link = temp_link;
7360 }
7361
7362 first_link->next = temp_link;
7363
7364 return(first_link);
7365}
7366# 1436 "netlib.c"
7367void
7368dump_request()
7369{
7370int counter = 0;
7371fprintf(where,"request contents:\n");
7372for (counter = 0; counter < ((sizeof(netperf_request)/4)-3); counter += 4) {
7373 fprintf(where,"%d:\t%8x %8x %8x %8x \t|%4.4s| |%4.4s| |%4.4s| |%4.4s|\n",
7374 counter,
7375 request_array[counter],
7376 request_array[counter+1],
7377 request_array[counter+2],
7378 request_array[counter+3],
7379 (char *)&request_array[counter],
7380 (char *)&request_array[counter+1],
7381 (char *)&request_array[counter+2],
7382 (char *)&request_array[counter+3]);
7383}
7384fflush(where);
7385}
7386# 1467 "netlib.c"
7387void
7388dump_response()
7389{
7390int counter = 0;
7391
7392fprintf(where,"response contents\n");
7393for (counter = 0; counter < ((sizeof(netperf_response)/4)-3); counter += 4) {
7394 fprintf(where,"%d:\t%8x %8x %8x %8x \t>%4.4s< >%4.4s< >%4.4s< >%4.4s<\n",
7395 counter,
7396 response_array[counter],
7397 response_array[counter+1],
7398 response_array[counter+2],
7399 response_array[counter+3],
7400 (char *)&response_array[counter],
7401 (char *)&response_array[counter+1],
7402 (char *)&response_array[counter+2],
7403 (char *)&response_array[counter+3]);
7404}
7405fflush(where);
7406}
7407# 1500 "netlib.c"
7408char *
7409format_number(double number)
7410{
7411 static char fmtbuf[64];
7412
7413 switch (libfmt) {
7414 case 'K':
7415 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f" , number / 1024.0);
7416 break;
7417 case 'M':
7418 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number / 1024.0 / 1024.0);
7419 break;
7420 case 'G':
7421 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number / 1024.0 / 1024.0 / 1024.0);
7422 break;
7423 case 'k':
7424 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number * 8 / 1000.0);
7425 break;
7426 case 'm':
7427 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number * 8 / 1000.0 / 1000.0);
7428 break;
7429 case 'g':
7430 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number * 8 / 1000.0 / 1000.0 / 1000.0);
7431 break;
7432 default:
7433 snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number / 1024.0);
7434 }
7435
7436 return fmtbuf;
7437}
7438
7439char
7440format_cpu_method(int method)
7441{
7442
7443 char method_char;
7444
7445 switch (method) {
7446 case 0:
7447 method_char = 'U';
7448 break;
7449 case 1:
7450 method_char = 'I';
7451 break;
7452 case 2:
7453 method_char = 'P';
7454 break;
7455 case 7:
7456 method_char = 'K';
7457 break;
7458 case 11:
7459 method_char = 'M';
7460 break;
7461 case 10:
7462 method_char = 'E';
7463 break;
7464 case 3:
7465
7466 method_char = 'T';
7467 break;
7468 case 5:
7469
7470 method_char = 'R';
7471 break;
7472 case 4:
7473 method_char = 'L';
7474 break;
7475 case 6:
7476 method_char = 'N';
7477 break;
7478 case 8:
7479 method_char = 'S';
7480 break;
7481 case 9:
7482 method_char = 'C';
7483 break;
7484 default:
7485 method_char = '?';
7486 }
7487
7488 return method_char;
7489
7490}
7491
7492char *
7493format_units()
7494{
7495 static char unitbuf[64];
7496
7497 switch (libfmt) {
7498 case 'K':
7499 strcpy(unitbuf, "KBytes");
7500 break;
7501 case 'M':
7502 strcpy(unitbuf, "MBytes");
7503 break;
7504 case 'G':
7505 strcpy(unitbuf, "GBytes");
7506 break;
7507 case 'k':
7508 strcpy(unitbuf, "10^3bits");
7509 break;
7510 case 'm':
7511 strcpy(unitbuf, "10^6bits");
7512 break;
7513 case 'g':
7514 strcpy(unitbuf, "10^9bits");
7515 break;
7516
7517 default:
7518 strcpy(unitbuf, "KBytes");
7519 }
7520
7521 return unitbuf;
7522}
7523# 1624 "netlib.c"
7524void
7525shutdown_control()
7526{
7527
7528 char *buf = (char *)&netperf_response;
7529 int buflen = sizeof(netperf_response);
7530
7531
7532 fd_set readfds;
7533 struct timeval timeout;
7534
7535 if (debug) {
7536 fprintf(where,
7537 "shutdown_control: shutdown of control connection requested.\n");
7538 fflush(where);
7539 }
7540
7541
7542
7543 if (shutdown(netlib_control,1) == -1) {
7544 fprintf((where), "%s errno %d\n", ("shutdown_control: error in shutdown"), (*__errno_location ()));
7545
7546 fflush(where);
7547 exit(1);
7548 }
7549# 1658 "netlib.c"
7550 do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&((&readfds)->__fds_bits)[0]) : "memory"); } while (0);
7551 __asm__ __volatile__ ("btsl %1,%0" : "=m" (((&readfds)->__fds_bits)[((netlib_control) / (8 * sizeof (__fd_mask)))]) : "r" (((int) (netlib_control)) % (8 * sizeof (__fd_mask))) : "cc","memory");
7552 timeout.tv_sec = 60;
7553 timeout.tv_usec = 0;
7554
7555
7556
7557 if (select(1024,
7558 &readfds,
7559 0,
7560 0,
7561 &timeout) != 1) {
7562 fprintf((where), "%s errno %d\n", ("shutdown_control: no response received"), (*__errno_location ()));
7563
7564 fflush(where);
7565 exit(1);
7566 }
7567
7568
7569 recv(netlib_control, buf, buflen,0);
7570
7571}
7572# 1688 "netlib.c"
7573void
7574bind_to_specific_processor(int processor_affinity)
7575{
7576
7577 printf("bind_to_specific_processor: enter\n");
7578# 1747 "netlib.c"
7579 if (debug) {
7580 fprintf(where,
7581 "Processor affinity not available for this platform!\n");
7582 fflush(where);
7583 }
7584
7585}
7586# 1769 "netlib.c"
7587void
7588send_request()
7589{
7590 int counter=0;
7591
7592
7593
7594
7595 if (debug > 1) {
7596 fprintf(where,"entered send_request...contents before htonl:\n");
7597 dump_request();
7598 }
7599
7600
7601
7602
7603 netperf_request.content.dummy = remote_proc_affinity;
7604# 1794 "netlib.c"
7605 for (counter=0;counter < sizeof(netperf_request)/4; counter++) {
7606 request_array[counter] = (__extension__ ({ register unsigned int __v, __x = (request_array[counter]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
7607 }
7608
7609 if (debug > 1) {
7610 fprintf(where,"send_request...contents after htonl:\n");
7611 dump_request();
7612
7613 fprintf(where,
7614 "\nsend_request: about to send %u bytes from %p\n",
7615 sizeof(netperf_request),
7616 &netperf_request);
7617 fflush(where);
7618 }
7619
7620 if (send(netlib_control,
7621 (char *)&netperf_request,
7622 sizeof(netperf_request),
7623 0) != sizeof(netperf_request)) {
7624 perror("send_request: send call failure");
7625
7626 exit(1);
7627 }
7628}
7629# 1831 "netlib.c"
7630void
7631send_response()
7632{
7633 int counter=0;
7634 int bytes_sent;
7635
7636
7637
7638
7639 if (debug > 1) {
7640 fprintf(where,
7641 "send_response: contents of %u ints before htonl\n",
7642 sizeof(netperf_response)/4);
7643 dump_response();
7644 }
7645
7646
7647
7648
7649
7650
7651
7652 for (counter=0;counter < sizeof(netperf_response)/4; counter++) {
7653 response_array[counter] = (__extension__ ({ register unsigned int __v, __x = (response_array[counter]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
7654 }
7655
7656 if (debug > 1) {
7657 fprintf(where,
7658 "send_response: contents after htonl\n");
7659 dump_response();
7660 fprintf(where,
7661 "about to send %u bytes from %p\n",
7662 sizeof(netperf_response),
7663 &netperf_response);
7664 fflush(where);
7665 }
7666
7667
7668 if ((bytes_sent = send(server_sock,
7669 (char *)&netperf_response,
7670 sizeof(netperf_response),
7671 0)) != sizeof(netperf_response)) {
7672 perror("send_response: send call failure");
7673 fprintf(where, "BytesSent: %d\n", bytes_sent);
7674 exit(1);
7675 }
7676
7677}
7678# 1892 "netlib.c"
7679void
7680recv_request()
7681{
7682int tot_bytes_recvd,
7683 bytes_recvd,
7684 bytes_left;
7685char *buf = (char *)&netperf_request;
7686int buflen = sizeof(netperf_request);
7687int counter;
7688
7689tot_bytes_recvd = 0;
7690 bytes_recvd = 0;
7691bytes_left = buflen;
7692while ((tot_bytes_recvd != buflen) &&
7693 ((bytes_recvd = recv(server_sock, buf, bytes_left,0)) > 0 )) {
7694 tot_bytes_recvd += bytes_recvd;
7695 buf += bytes_recvd;
7696 bytes_left -= bytes_recvd;
7697}
7698
7699
7700
7701for (counter = 0; counter < sizeof(netperf_request)/sizeof(int); counter++) {
7702 request_array[counter] = (__extension__ ({ register unsigned int __v, __x = (request_array[counter]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
7703}
7704
7705if (debug) {
7706 fprintf(where,
7707 "recv_request: received %d bytes of request.\n",
7708 tot_bytes_recvd);
7709 fflush(where);
7710}
7711
7712if (bytes_recvd == -1) {
7713 fprintf((where), "%s errno %d\n", ("recv_request: error on recv"), (*__errno_location ()));
7714
7715 fflush(where);
7716 exit(1);
7717}
7718
7719if (bytes_recvd == 0) {
7720
7721
7722
7723 if (debug) {
7724 fprintf(where,
7725 "recv_request: remote requested shutdown of control\n");
7726 fflush(where);
7727 }
7728
7729 if (netlib_control != -1) {
7730 shutdown_control();
7731 }
7732 exit(0);
7733}
7734
7735if (tot_bytes_recvd < buflen) {
7736 if (debug > 1)
7737 dump_request();
7738
7739 fprintf(where,
7740 "recv_request: partial request received of %d bytes\n",
7741 tot_bytes_recvd);
7742 fflush(where);
7743 exit(1);
7744}
7745
7746 if (debug > 1) {
7747 dump_request();
7748 }
7749
7750
7751
7752
7753 local_proc_affinity = netperf_request.content.dummy;
7754
7755 if (local_proc_affinity != -1) {
7756 bind_to_specific_processor(local_proc_affinity);
7757 }
7758
7759}
7760# 1990 "netlib.c"
7761void
7762recv_response()
7763{
7764int tot_bytes_recvd,
7765 bytes_recvd = 0,
7766 bytes_left;
7767char *buf = (char *)&netperf_response;
7768int buflen = sizeof(netperf_response);
7769int counter;
7770
7771
7772fd_set readfds;
7773struct timeval timeout;
7774
7775tot_bytes_recvd = 0;
7776bytes_left = buflen;
7777
7778
7779
7780
7781for (counter = 0; counter < sizeof(netperf_response)/sizeof(int); counter++) {
7782 response_array[counter] = 0;
7783}
7784
7785
7786
7787
7788
7789do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&((&readfds)->__fds_bits)[0]) : "memory"); } while (0);
7790__asm__ __volatile__ ("btsl %1,%0" : "=m" (((&readfds)->__fds_bits)[((netlib_control) / (8 * sizeof (__fd_mask)))]) : "r" (((int) (netlib_control)) % (8 * sizeof (__fd_mask))) : "cc","memory");
7791timeout.tv_sec = 120;
7792
7793
7794
7795
7796timeout.tv_usec = 0;
7797
7798
7799
7800
7801if ((counter = select(1024,
7802 &readfds,
7803 0,
7804 0,
7805 &timeout)) != 1) {
7806 fprintf(where,
7807 "netperf: receive_response: no response received. errno %d counter %d\n",
7808 (*__errno_location ()),
7809 counter);
7810 exit(1);
7811}
7812
7813while ((tot_bytes_recvd != buflen) &&
7814 ((bytes_recvd = recv(netlib_control, buf, bytes_left,0)) > 0 )) {
7815 tot_bytes_recvd += bytes_recvd;
7816 buf += bytes_recvd;
7817 bytes_left -= bytes_recvd;
7818}
7819
7820if (debug) {
7821 fprintf(where,"recv_response: received a %d byte response\n",
7822 tot_bytes_recvd);
7823 fflush(where);
7824}
7825
7826
7827
7828for (counter = 0; counter < sizeof(netperf_response)/sizeof(int); counter++) {
7829 response_array[counter] = (__extension__ ({ register unsigned int __v, __x = (response_array[counter]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
7830}
7831
7832if (bytes_recvd == -1) {
7833 perror("recv_response");
7834 exit(1);
7835}
7836if (tot_bytes_recvd < buflen) {
7837 fprintf(stderr,
7838 "recv_response: partial response received: %d bytes\n",
7839 tot_bytes_recvd);
7840 fflush(stderr);
7841 if (debug > 1)
7842 dump_response();
7843 exit(1);
7844}
7845if (debug > 1) {
7846 dump_response();
7847}
7848}
7849# 2127 "netlib.c"
7850void libmain()
7851{
7852fprintf(where,"hello world\n");
7853fprintf(where,"debug: %d\n",debug);
7854}
7855
7856
7857void
7858set_sock_buffer (int sd, enum sock_buffer which, int requested_size, int *effective_sizep)
7859{
7860
7861 int optname = (which == SEND_BUFFER) ? 7 : 8;
7862 socklen_t sock_opt_len;
7863
7864 if (requested_size > 0) {
7865 if (setsockopt(sd, 1, optname,
7866 (char *)&requested_size, sizeof(int)) < 0) {
7867 fprintf(where, "netperf: set_sock_buffer: %s option: errno %d\n",
7868 (which == SEND_BUFFER) ? "SO_SNDBUF" : "SO_RCVBUF",
7869 (*__errno_location ()));
7870 fflush(where);
7871 exit(1);
7872 }
7873 if (debug > 1) {
7874 fprintf(where, "netperf: set_sock_buffer: %s of %d requested.\n",
7875 (which == SEND_BUFFER) ? "SO_SNDBUF" : "SO_RCVBUF",
7876 requested_size);
7877 fflush(where);
7878 }
7879 }
7880
7881
7882
7883
7884
7885 sock_opt_len = sizeof(socklen_t);
7886 if (getsockopt(sd, 1, optname, (char *)effective_sizep,
7887 &sock_opt_len) < 0) {
7888 fprintf(where, "netperf: set_sock_buffer: getsockopt %s: errno %d\n",
7889 (which == SEND_BUFFER) ? "SO_SNDBUF" : "SO_RCVBUF", (*__errno_location ()));
7890 fflush(where);
7891 *effective_sizep = -1;
7892 }
7893
7894 if (debug) {
7895 fprintf(where, "netperf: set_sock_buffer: "
7896 "%s socket size determined to be %d\n",
7897 (which == SEND_BUFFER) ? "send" : "receive", *effective_sizep);
7898 fflush(where);
7899 }
7900
7901
7902
7903}
7904
7905void
7906dump_addrinfo(FILE *dumploc, struct addrinfo *info,
7907 char *host, char *port, int family)
7908{
7909 struct sockaddr *ai_addr;
7910 struct addrinfo *temp;
7911 temp=info;
7912
7913 fprintf(dumploc, "getaddrinfo returned the following for host '%s' ", host);
7914 fprintf(dumploc, "port '%s' ", port);
7915 fprintf(dumploc, "family %s\n", inet_ftos(family));
7916 while (temp) {
7917
7918
7919
7920
7921
7922 if (temp->ai_canonname) {
7923 fprintf(dumploc,
7924 "\tcannonical name: '%s'\n",temp->ai_canonname);
7925 }
7926 else {
7927 fprintf(dumploc,
7928 "\tcannonical name: '%s'\n","(nil)");
7929 }
7930 fprintf(dumploc,
7931 "\tflags: %x family: %s: socktype: %s protocol %s addrlen %d\n",
7932 temp->ai_flags,
7933 inet_ftos(temp->ai_family),
7934 inet_ttos(temp->ai_socktype),
7935 inet_ptos(temp->ai_protocol),
7936 temp->ai_addrlen);
7937 ai_addr = temp->ai_addr;
7938 if (ai_addr != ((void *)0)) {
7939 fprintf(dumploc,
7940 "\tsa_family: %s sadata: %d %d %d %d %d %d\n",
7941 inet_ftos(ai_addr->sa_family),
7942 (u_char)ai_addr->sa_data[0],
7943 (u_char)ai_addr->sa_data[1],
7944 (u_char)ai_addr->sa_data[2],
7945 (u_char)ai_addr->sa_data[3],
7946 (u_char)ai_addr->sa_data[4],
7947 (u_char)ai_addr->sa_data[5]);
7948 }
7949 temp = temp->ai_next;
7950 }
7951 fflush(dumploc);
7952}
7953# 2253 "netlib.c"
7954int
7955establish_control_internal(char *hostname,
7956 char *port,
7957 int remfam,
7958 char *localhost,
7959 char *localport,
7960 int locfam)
7961{
7962 int not_connected;
7963 int control_sock;
7964 int count;
7965 int error;
7966
7967 struct addrinfo hints;
7968 struct addrinfo *local_res;
7969 struct addrinfo *remote_res;
7970 struct addrinfo *local_res_temp;
7971 struct addrinfo *remote_res_temp;
7972
7973 if (debug) {
7974 fprintf(where,
7975 "establish_control called with host '%s' port '%s' remfam %s\n",
7976 hostname,
7977 port,
7978 inet_ftos(remfam));
7979 fprintf(where,
7980 "\t\tlocal '%s' port '%s' locfam %s\n",
7981 localhost,
7982 localport,
7983 inet_ftos(locfam));
7984 fflush(where);
7985 }
7986
7987
7988 memset(&hints, 0, sizeof(hints));
7989 hints.ai_family = remfam;
7990 hints.ai_socktype = SOCK_STREAM;
7991 hints.ai_protocol = IPPROTO_TCP;
7992 hints.ai_flags = 0|0x0002;
7993 count = 0;
7994 do {
7995 error = getaddrinfo((char *)hostname,
7996 (char *)port,
7997 &hints,
7998 &remote_res);
7999 count += 1;
8000 if (error == -3) {
8001 if (debug) {
8002 fprintf(where,"Sleeping on getaddrinfo EAI_AGAIN\n");
8003 fflush(where);
8004 }
8005 sleep(1);
8006 }
8007 } while ((error == -3) && (count <= 5));
8008
8009 if (error) {
8010 printf("establish control: could not resolve remote '%s' port '%s' af %s",
8011 hostname,
8012 port,
8013 inet_ftos(remfam));
8014 printf("\n\tgetaddrinfo returned %d %s\n",
8015 error,
8016 gai_strerror(error));
8017 return(-1);
8018 }
8019
8020 if (debug) {
8021 dump_addrinfo(where, remote_res, hostname, port, remfam);
8022 }
8023
8024
8025 memset(&hints, 0, sizeof(hints));
8026 hints.ai_family = locfam;
8027 hints.ai_socktype = SOCK_STREAM;
8028 hints.ai_protocol = IPPROTO_TCP;
8029 hints.ai_flags = 0x0001|0x0002;
8030 count = 0;
8031 do {
8032 count += 1;
8033 error = getaddrinfo((char *)localhost,
8034 (char *)localport,
8035 &hints,
8036 &local_res);
8037 if (error == -3) {
8038 if (debug) {
8039 fprintf(where,
8040 "Sleeping on getaddrinfo(%s,%s) EAI_AGAIN count %d \n",
8041 localhost,
8042 localport,
8043 count);
8044 fflush(where);
8045 }
8046 sleep(1);
8047 }
8048 } while ((error == -3) && (count <= 5));
8049
8050 if (error) {
8051 printf("establish control: could not resolve local '%s' port '%s' af %s",
8052 localhost,
8053 localport,
8054 inet_ftos(locfam));
8055 printf("\n\tgetaddrinfo returned %d %s\n",
8056 error,
8057 gai_strerror(error));
8058 return(-1);
8059 }
8060
8061 if (debug) {
8062 dump_addrinfo(where, local_res, localhost, localport, locfam);
8063 }
8064
8065 not_connected = 1;
8066 local_res_temp = local_res;
8067 remote_res_temp = remote_res;
8068
8069
8070
8071
8072
8073 while (remote_res_temp != ((void *)0)) {
8074
8075
8076
8077
8078
8079 control_sock = socket(local_res_temp->ai_family,
8080 SOCK_STREAM,
8081 0);
8082 if (control_sock < 0) {
8083
8084
8085
8086
8087 if (debug) {
8088 perror("establish_control: unable to allocate control socket");
8089 }
8090 return(-1);
8091 }
8092
8093
8094
8095
8096 if (bind(control_sock,
8097 local_res_temp->ai_addr,
8098 local_res_temp->ai_addrlen) == 0) {
8099 if (debug) {
8100 fprintf(where,
8101 "bound control socket to %s and %s\n",
8102 localhost,
8103 localport);
8104 }
8105
8106 if (connect(control_sock,
8107 remote_res_temp->ai_addr,
8108 remote_res_temp->ai_addrlen) == 0) {
8109
8110 if (debug) {
8111 fprintf(where,
8112 "successful connection to remote netserver at %s and %s\n",
8113 hostname,
8114 port);
8115 }
8116 not_connected = 0;
8117
8118 break;
8119 } else {
8120
8121 if (debug) {
8122 fprintf(where,
8123 "establish_control: connect failed, errno %d %s\n",
8124 (*__errno_location ()),
8125 strerror((*__errno_location ())));
8126 fprintf(where, " trying next address combination\n");
8127 fflush(where);
8128 }
8129 }
8130 }
8131 else {
8132
8133 if (debug) {
8134 fprintf(where,
8135 "establish_control: bind failed, errno %d %s\n",
8136 (*__errno_location ()),
8137 strerror((*__errno_location ())));
8138 fprintf(where, " trying next address combination\n");
8139 fflush(where);
8140 }
8141 }
8142
8143 if ((local_res_temp = local_res_temp->ai_next) == ((void *)0)) {
8144
8145
8146 local_res_temp = local_res;
8147
8148
8149 remote_res_temp = remote_res_temp->ai_next;
8150
8151
8152
8153
8154 }
8155 close(control_sock);
8156 }
8157
8158
8159 freeaddrinfo(local_res);
8160 freeaddrinfo(remote_res);
8161
8162
8163 if (not_connected) {
8164 fprintf(where, "establish control: are you sure there is a netserver listening on %s at port %s?\n",hostname,port);
8165 fflush(where);
8166 return(-1);
8167 }
8168
8169
8170 return(control_sock);
8171}
8172
8173void
8174establish_control(char *hostname,
8175 char *port,
8176 int remfam,
8177 char *localhost,
8178 char *localport,
8179 int locfam)
8180
8181{
8182
8183 netlib_control = establish_control_internal(hostname,
8184 port,
8185 remfam,
8186 localhost,
8187 localport,
8188 locfam);
8189 if (netlib_control < 0) {
8190 fprintf(where,
8191 "establish_control could not establish the control connection from %s port %s address family %s to %s port %s address family %s\n",
8192 localhost,localport,inet_ftos(locfam),
8193 hostname,port,inet_ftos(remfam));
8194 fflush(where);
8195 exit(-1);
8196 }
8197}
8198# 2512 "netlib.c"
8199char *
8200get_id()
8201{
8202 static char id_string[80];
8203
8204
8205
8206
8207struct utsname system_name;
8208
8209
8210
8211
8212
8213
8214
8215if (uname(&system_name) <0) {
8216 perror("identify_local: uname");
8217 exit(1);
8218}
8219
8220
8221snprintf(id_string, sizeof(id_string),
8222# 2544 "netlib.c"
8223 "%-15s%-15s%-15s%-15s%-15s",
8224 system_name.sysname,
8225 system_name.nodename,
8226 system_name.release,
8227 system_name.version,
8228 system_name.machine
8229
8230 );
8231return (id_string);
8232}
8233# 2568 "netlib.c"
8234void
8235identify_local()
8236{
8237
8238char *local_id;
8239
8240local_id = get_id();
8241
8242fprintf(where,"Local Information \nSysname Nodename Release Version Machine\n");
8243
8244
8245fprintf(where,"%s\n",
8246 local_id);
8247
8248}
8249# 2599 "netlib.c"
8250void
8251identify_remote()
8252{
8253
8254char *remote_id="";
8255
8256
8257netperf_request.content.request_type = 4;
8258
8259send_request();
8260
8261
8262
8263recv_response();
8264
8265if (netperf_response.content.serv_errno) {
8266 (*__errno_location ()) = (netperf_response.content.serv_errno);
8267 perror("identify_remote: on remote");
8268 exit(1);
8269}
8270
8271fprintf(where,"Remote Information \nSysname Nodename Release Version Machine\n");
8272
8273
8274fprintf(where,"%s",
8275 remote_id);
8276}
8277
8278void
8279cpu_start(int measure_cpu)
8280{
8281
8282 gettimeofday(&time1,
8283 &tz);
8284
8285 if (measure_cpu) {
8286 cpu_util_init();
8287 measuring_cpu = 1;
8288 cpu_method = get_cpu_method();
8289 cpu_start_internal();
8290 }
8291}
8292
8293
8294void
8295cpu_stop(int measure_cpu, float *elapsed)
8296
8297{
8298
8299 int sec, usec;
8300
8301 if (measure_cpu) {
8302 cpu_stop_internal();
8303 cpu_util_terminate();
8304 }
8305
8306 gettimeofday(&time2,
8307 &tz);
8308
8309 if (time2.tv_usec < time1.tv_usec) {
8310 time2.tv_usec += 1000000;
8311 time2.tv_sec -= 1;
8312 }
8313
8314 sec = time2.tv_sec - time1.tv_sec;
8315 usec = time2.tv_usec - time1.tv_usec;
8316 lib_elapsed = (float)sec + ((float)usec/(float)1000000.0);
8317
8318 *elapsed = lib_elapsed;
8319
8320}
8321
8322double
8323calc_thruput_interval(double units_received,double elapsed)
8324
8325{
8326 double divisor;
8327
8328
8329 switch (libfmt) {
8330 case 'K':
8331 divisor = 1024.0;
8332 break;
8333 case 'M':
8334 divisor = 1024.0 * 1024.0;
8335 break;
8336 case 'G':
8337 divisor = 1024.0 * 1024.0 * 1024.0;
8338 break;
8339 case 'k':
8340 divisor = 1000.0 / 8.0;
8341 break;
8342 case 'm':
8343 divisor = 1000.0 * 1000.0 / 8.0;
8344 break;
8345 case 'g':
8346 divisor = 1000.0 * 1000.0 * 1000.0 / 8.0;
8347 break;
8348
8349 default:
8350 divisor = 1024.0;
8351 }
8352
8353 return (units_received / divisor / elapsed);
8354
8355}
8356
8357double
8358calc_thruput(double units_received)
8359
8360{
8361 return(calc_thruput_interval(units_received,lib_elapsed));
8362}
8363
8364
8365
8366
8367
8368float
8369calc_cpu_util(float elapsed_time)
8370{
8371 return(calc_cpu_util_internal(elapsed_time));
8372}
8373
8374float calc_service_demand(double units_sent,
8375 float elapsed_time,
8376 float cpu_utilization,
8377 int num_cpus)
8378
8379{
8380
8381 double unit_divisor = (float)1024.0;
8382 double service_demand;
8383 double thruput;
8384
8385 if (debug) {
8386 fprintf(where,"calc_service_demand called: units_sent = %f\n",
8387 units_sent);
8388 fprintf(where," elapsed_time = %f\n",
8389 elapsed_time);
8390 fprintf(where," cpu_util = %f\n",
8391 cpu_utilization);
8392 fprintf(where," num cpu = %d\n",
8393 num_cpus);
8394 fflush(where);
8395 }
8396
8397 if (num_cpus == 0) num_cpus = lib_num_loc_cpus;
8398
8399 if (elapsed_time == 0.0) {
8400 elapsed_time = lib_elapsed;
8401 }
8402 if (cpu_utilization == 0.0) {
8403 cpu_utilization = lib_local_cpu_util;
8404 }
8405
8406 thruput = (units_sent /
8407 (double) unit_divisor /
8408 (double) elapsed_time);
8409# 2769 "netlib.c"
8410 service_demand = (cpu_utilization*10000.0/thruput) *
8411 (float) num_cpus;
8412
8413 if (debug) {
8414 fprintf(where,"calc_service_demand using: units_sent = %f\n",
8415 units_sent);
8416 fprintf(where," elapsed_time = %f\n",
8417 elapsed_time);
8418 fprintf(where," cpu_util = %f\n",
8419 cpu_utilization);
8420 fprintf(where," num cpu = %d\n",
8421 num_cpus);
8422 fprintf(where,"calc_service_demand got: thruput = %f\n",
8423 thruput);
8424 fprintf(where," servdem = %f\n",
8425 service_demand);
8426 fflush(where);
8427 }
8428 return (float)service_demand;
8429}
8430
8431
8432
8433float
8434calibrate_local_cpu(float local_cpu_rate)
8435{
8436
8437 lib_num_loc_cpus = get_num_cpus();
8438
8439 lib_use_idle = 0;
8440
8441
8442
8443
8444
8445 if (local_cpu_rate > 0) {
8446
8447
8448
8449
8450
8451 lib_local_maxrate = local_cpu_rate;
8452 }
8453 else {
8454
8455
8456
8457 lib_local_maxrate = (float)0.0;
8458
8459 lib_local_maxrate = calibrate_idle_rate(4,10);
8460
8461 }
8462 return lib_local_maxrate;
8463}
8464
8465
8466float
8467calibrate_remote_cpu()
8468{
8469 float remrate;
8470
8471 netperf_request.content.request_type = 5;
8472 send_request();
8473
8474
8475
8476 sleep(40);
8477 recv_response();
8478 if (netperf_response.content.serv_errno) {
8479
8480
8481
8482 return((float)0.0);
8483 }
8484 else {
8485
8486 memcpy(((char *)&remrate),((char *)netperf_response.content.test_specific_data),(sizeof(remrate)));
8487
8488
8489
8490 return(remrate);
8491 }
8492}
8493
8494
8495
8496
8497
8498
8499int
8500msec_sleep( int msecs )
8501{
8502 int rval ;
8503
8504 struct timeval timeout;
8505
8506 timeout.tv_sec = msecs / 1000;
8507 timeout.tv_usec = (msecs - (msecs/1000) *1000) * 1000;
8508 if ((rval = select(0,
8509 0,
8510 0,
8511 0,
8512 &timeout))) {
8513 if ( ((*__errno_location ()) == 4) ) {
8514 return(1);
8515 }
8516 perror("msec_sleep: select");
8517 exit(1);
8518 }
8519 return(0);
8520}
8521# 3304 "netlib.c"
8522int confidence_iterations;
8523
8524double
8525 result_confid=-10.0,
8526 loc_cpu_confid=-10.0,
8527 rem_cpu_confid=-10.0,
8528
8529 measured_sum_result=0.0,
8530 measured_square_sum_result=0.0,
8531 measured_mean_result=0.0,
8532 measured_var_result=0.0,
8533
8534 measured_sum_local_cpu=0.0,
8535 measured_square_sum_local_cpu=0.0,
8536 measured_mean_local_cpu=0.0,
8537 measured_var_local_cpu=0.0,
8538
8539 measured_sum_remote_cpu=0.0,
8540 measured_square_sum_remote_cpu=0.0,
8541 measured_mean_remote_cpu=0.0,
8542 measured_var_remote_cpu=0.0,
8543
8544 measured_sum_local_service_demand=0.0,
8545 measured_square_sum_local_service_demand=0.0,
8546 measured_mean_local_service_demand=0.0,
8547 measured_var_local_service_demand=0.0,
8548
8549 measured_sum_remote_service_demand=0.0,
8550 measured_square_sum_remote_service_demand=0.0,
8551 measured_mean_remote_service_demand=0.0,
8552 measured_var_remote_service_demand=0.0,
8553
8554 measured_sum_local_time=0.0,
8555 measured_square_sum_local_time=0.0,
8556 measured_mean_local_time=0.0,
8557 measured_var_local_time=0.0,
8558
8559 measured_mean_remote_time=0.0,
8560
8561 measured_fails,
8562 measured_local_results,
8563 confidence=-10.0;
8564
8565
8566
8567
8568
8569
8570
8571void
8572init_stat()
8573{
8574 measured_sum_result=0.0;
8575 measured_square_sum_result=0.0;
8576 measured_mean_result=0.0;
8577 measured_var_result=0.0;
8578
8579 measured_sum_local_cpu=0.0;
8580 measured_square_sum_local_cpu=0.0;
8581 measured_mean_local_cpu=0.0;
8582 measured_var_local_cpu=0.0;
8583
8584 measured_sum_remote_cpu=0.0;
8585 measured_square_sum_remote_cpu=0.0;
8586 measured_mean_remote_cpu=0.0;
8587 measured_var_remote_cpu=0.0;
8588
8589 measured_sum_local_service_demand=0.0;
8590 measured_square_sum_local_service_demand=0.0;
8591 measured_mean_local_service_demand=0.0;
8592 measured_var_local_service_demand=0.0;
8593
8594 measured_sum_remote_service_demand=0.0;
8595 measured_square_sum_remote_service_demand=0.0;
8596 measured_mean_remote_service_demand=0.0;
8597 measured_var_remote_service_demand=0.0;
8598
8599 measured_sum_local_time=0.0;
8600 measured_square_sum_local_time=0.0;
8601 measured_mean_local_time=0.0;
8602 measured_var_local_time=0.0;
8603
8604 measured_mean_remote_time=0.0;
8605
8606 measured_fails = 0.0;
8607 measured_local_results=0.0,
8608 confidence=-10.0;
8609}
8610
8611
8612
8613
8614double
8615confid(int level, int freedom)
8616{
8617double t99[35],t95[35];
8618
8619 t95[1]=12.706;
8620 t95[2]= 4.303;
8621 t95[3]= 3.182;
8622 t95[4]= 2.776;
8623 t95[5]= 2.571;
8624 t95[6]= 2.447;
8625 t95[7]= 2.365;
8626 t95[8]= 2.306;
8627 t95[9]= 2.262;
8628 t95[10]= 2.228;
8629 t95[11]= 2.201;
8630 t95[12]= 2.179;
8631 t95[13]= 2.160;
8632 t95[14]= 2.145;
8633 t95[15]= 2.131;
8634 t95[16]= 2.120;
8635 t95[17]= 2.110;
8636 t95[18]= 2.101;
8637 t95[19]= 2.093;
8638 t95[20]= 2.086;
8639 t95[21]= 2.080;
8640 t95[22]= 2.074;
8641 t95[23]= 2.069;
8642 t95[24]= 2.064;
8643 t95[25]= 2.060;
8644 t95[26]= 2.056;
8645 t95[27]= 2.052;
8646 t95[28]= 2.048;
8647 t95[29]= 2.045;
8648 t95[30]= 2.042;
8649
8650 t99[1]=63.657;
8651 t99[2]= 9.925;
8652 t99[3]= 5.841;
8653 t99[4]= 4.604;
8654 t99[5]= 4.032;
8655 t99[6]= 3.707;
8656 t99[7]= 3.499;
8657 t99[8]= 3.355;
8658 t99[9]= 3.250;
8659 t99[10]= 3.169;
8660 t99[11]= 3.106;
8661 t99[12]= 3.055;
8662 t99[13]= 3.012;
8663 t99[14]= 2.977;
8664 t99[15]= 2.947;
8665 t99[16]= 2.921;
8666 t99[17]= 2.898;
8667 t99[18]= 2.878;
8668 t99[19]= 2.861;
8669 t99[20]= 2.845;
8670 t99[21]= 2.831;
8671 t99[22]= 2.819;
8672 t99[23]= 2.807;
8673 t99[24]= 2.797;
8674 t99[25]= 2.787;
8675 t99[26]= 2.779;
8676 t99[27]= 2.771;
8677 t99[28]= 2.763;
8678 t99[29]= 2.756;
8679 t99[30]= 2.750;
8680
8681 if(level==95){
8682 return(t95[freedom]);
8683 } else if(level==99){
8684 return(t99[freedom]);
8685 } else{
8686 return(0);
8687 }
8688}
8689
8690void
8691calculate_confidence(int confidence_iterations,
8692 float time,
8693 double result,
8694 float loc_cpu,
8695 float rem_cpu,
8696 float loc_sd,
8697 float rem_sd)
8698{
8699
8700 if (debug) {
8701 fprintf(where,
8702 "calculate_confidence: itr %d; time %f; res %f\n",
8703 confidence_iterations,
8704 time,
8705 result);
8706 fprintf(where,
8707 " lcpu %f; rcpu %f\n",
8708 loc_cpu,
8709 rem_cpu);
8710 fprintf(where,
8711 " lsdm %f; rsdm %f\n",
8712 loc_sd,
8713 rem_sd);
8714 fflush(where);
8715 }
8716
8717
8718 measured_sum_local_time +=
8719 (double) time;
8720 measured_square_sum_local_time +=
8721 (double) time*time;
8722 measured_mean_local_time =
8723 (double) measured_sum_local_time/confidence_iterations;
8724 measured_var_local_time =
8725 (double) measured_square_sum_local_time/confidence_iterations
8726 -measured_mean_local_time*measured_mean_local_time;
8727
8728
8729 measured_sum_result +=
8730 (double) result;
8731 measured_square_sum_result +=
8732 (double) result*result;
8733 measured_mean_result =
8734 (double) measured_sum_result/confidence_iterations;
8735 measured_var_result =
8736 (double) measured_square_sum_result/confidence_iterations
8737 -measured_mean_result*measured_mean_result;
8738
8739
8740 measured_sum_local_cpu +=
8741 (double) loc_cpu;
8742 measured_square_sum_local_cpu +=
8743 (double) loc_cpu*loc_cpu;
8744 measured_mean_local_cpu =
8745 (double) measured_sum_local_cpu/confidence_iterations;
8746 measured_var_local_cpu =
8747 (double) measured_square_sum_local_cpu/confidence_iterations
8748 -measured_mean_local_cpu*measured_mean_local_cpu;
8749
8750
8751 measured_sum_remote_cpu +=
8752 (double) rem_cpu;
8753 measured_square_sum_remote_cpu+=
8754 (double) rem_cpu*rem_cpu;
8755 measured_mean_remote_cpu =
8756 (double) measured_sum_remote_cpu/confidence_iterations;
8757 measured_var_remote_cpu =
8758 (double) measured_square_sum_remote_cpu/confidence_iterations
8759 -measured_mean_remote_cpu*measured_mean_remote_cpu;
8760
8761
8762 measured_sum_local_service_demand +=
8763 (double) loc_sd;
8764 measured_square_sum_local_service_demand+=
8765 (double) loc_sd*loc_sd;
8766 measured_mean_local_service_demand =
8767 (double) measured_sum_local_service_demand/confidence_iterations;
8768 measured_var_local_service_demand =
8769 (double) measured_square_sum_local_service_demand/confidence_iterations
8770 -measured_mean_local_service_demand*measured_mean_local_service_demand;
8771
8772
8773 measured_sum_remote_service_demand +=
8774 (double) rem_sd;
8775 measured_square_sum_remote_service_demand+=
8776 (double) rem_sd*rem_sd;
8777 measured_mean_remote_service_demand =
8778 (double) measured_sum_remote_service_demand/confidence_iterations;
8779 measured_var_remote_service_demand =
8780 (double) measured_square_sum_remote_service_demand/confidence_iterations
8781 -measured_mean_remote_service_demand*measured_mean_remote_service_demand;
8782
8783 if(confidence_iterations>1){
8784 result_confid= (double) interval -
8785 2.0 * confid(confidence_level,confidence_iterations-1)*
8786 sqrt(measured_var_result/(confidence_iterations-1.0)) /
8787 measured_mean_result;
8788
8789 loc_cpu_confid= (double) interval -
8790 2.0 * confid(confidence_level,confidence_iterations-1)*
8791 sqrt(measured_var_local_cpu/(confidence_iterations-1.0)) /
8792 measured_mean_local_cpu;
8793
8794 rem_cpu_confid= (double) interval -
8795 2.0 * confid(confidence_level,confidence_iterations-1)*
8796 sqrt(measured_var_remote_cpu/(confidence_iterations-1.0)) /
8797 measured_mean_remote_cpu;
8798
8799 if(debug){
8800 printf("Conf_itvl %2d: results:%4.1f%% loc_cpu:%4.1f%% rem_cpu:%4.1f%%\n",
8801 confidence_iterations,
8802 (interval-result_confid)*100.0,
8803 (interval-loc_cpu_confid)*100.0,
8804 (interval-rem_cpu_confid)*100.0);
8805 }
8806
8807 confidence = ((((result_confid < loc_cpu_confid) ? result_confid : loc_cpu_confid) < rem_cpu_confid) ? ((result_confid < loc_cpu_confid) ? result_confid : loc_cpu_confid) : rem_cpu_confid);
8808
8809 }
8810}
8811
8812
8813
8814void
8815retrieve_confident_values(float *elapsed_time,
8816 double *thruput,
8817 float *local_cpu_utilization,
8818 float *remote_cpu_utilization,
8819 float *local_service_demand,
8820 float *remote_service_demand)
8821
8822{
8823 *elapsed_time = (float)measured_mean_local_time;
8824 *thruput = measured_mean_result;
8825 *local_cpu_utilization = (float)measured_mean_local_cpu;
8826 *remote_cpu_utilization = (float)measured_mean_remote_cpu;
8827 *local_service_demand = (float)measured_mean_local_service_demand;
8828 *remote_service_demand = (float)measured_mean_remote_service_demand;
8829}
8830
8831
8832
8833
8834void
8835display_confidence()
8836
8837{
8838 fprintf(where,
8839 "!!! WARNING\n");
8840 fprintf(where,
8841 "!!! Desired confidence was not achieved within ");
8842 fprintf(where,
8843 "the specified iterations.\n");
8844 fprintf(where,
8845 "!!! This implies that there was variability in ");
8846 fprintf(where,
8847 "the test environment that\n");
8848 fprintf(where,
8849 "!!! must be investigated before going further.\n");
8850 fprintf(where,
8851 "!!! Confidence intervals: Throughput : %4.1f%%\n",
8852 100.0 * (interval - result_confid));
8853 fprintf(where,
8854 "!!! Local CPU util : %4.1f%%\n",
8855 100.0 * (interval - loc_cpu_confid));
8856 fprintf(where,
8857 "!!! Remote CPU util : %4.1f%%\n\n",
8858 100.0 * (interval - rem_cpu_confid));
8859}