stdlib.h
001: 
002: 
003: 
004: 
005: 
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: 
022: 
023: #ifndef _STDLIB_H
024: 
025: #include <features.h>
026: 
027: 
028: #define         __need_size_t
029: #ifndef __need_malloc_and_calloc
030: # define        __need_wchar_t
031: # define        __need_NULL
032: #endif
033: #include <stddef.h>
034: 
035: __BEGIN_DECLS
036: 
037: #ifndef __need_malloc_and_calloc
038: #define _STDLIB_H       1
039: 
040: #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
041: 
042: # include <bits/waitflags.h>
043: # include <bits/waitstatus.h>
044: 
045: # ifdef __USE_BSD
046: 
047: 
048: 
049: 
050: #  if defined __GNUC__ && !defined __cplusplus
051: #   define __WAIT_INT(status) \
052:   (__extension__ (((union { __typeof(status) __in; int __i; }) \
053:                    { .__in = (status) }).__i))
054: #  else
055: #   define __WAIT_INT(status)   (*(int *) &(status))
056: #  endif
057: 
058: 
059: 
060: 
061: 
062: 
063: #  if !defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus
064: #   define __WAIT_STATUS        void *
065: #   define __WAIT_STATUS_DEFN   void *
066: #  else
067: 
068: typedef union
069:   {
070:     union wait *__uptr;
071:     int *__iptr;
072:   } __WAIT_STATUS __attribute__ ((__transparent_union__));
073: #   define __WAIT_STATUS_DEFN   int *
074: #  endif
075: 
076: # else 
077: 
078: #  define __WAIT_INT(status)    (status)
079: #  define __WAIT_STATUS         int *
080: #  define __WAIT_STATUS_DEFN    int *
081: 
082: # endif 
083: 
084: 
085: # define WEXITSTATUS(status)    __WEXITSTATUS (__WAIT_INT (status))
086: # define WTERMSIG(status)       __WTERMSIG (__WAIT_INT (status))
087: # define WSTOPSIG(status)       __WSTOPSIG (__WAIT_INT (status))
088: # define WIFEXITED(status)      __WIFEXITED (__WAIT_INT (status))
089: # define WIFSIGNALED(status)    __WIFSIGNALED (__WAIT_INT (status))
090: # define WIFSTOPPED(status)     __WIFSTOPPED (__WAIT_INT (status))
091: # ifdef __WIFCONTINUED
092: #  define WIFCONTINUED(status)  __WIFCONTINUED (__WAIT_INT (status))
093: # endif
094: #endif  
095: 
096: __BEGIN_NAMESPACE_STD
097: 
098: typedef struct
099:   {
100:     int quot;                   
101:     int rem;                    
102:   } div_t;
103: 
104: 
105: #ifndef __ldiv_t_defined
106: typedef struct
107:   {
108:     long int quot;              
109:     long int rem;               
110:   } ldiv_t;
111: # define __ldiv_t_defined       1
112: #endif
113: __END_NAMESPACE_STD
114: 
115: #if defined __USE_ISOC99 && !defined __lldiv_t_defined
116: __BEGIN_NAMESPACE_C99
117: 
118: __extension__ typedef struct
119:   {
120:     long long int quot;         
121:     long long int rem;          
122:   } lldiv_t;
123: # define __lldiv_t_defined      1
124: __END_NAMESPACE_C99
125: #endif
126: 
127: 
128: 
129: #define RAND_MAX        2147483647
130: 
131: 
132: 
133: 
134: #define EXIT_FAILURE    1       
135: #define EXIT_SUCCESS    0       
136: 
137: 
138: 
139: #define MB_CUR_MAX      (__ctype_get_mb_cur_max ())
140: extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
141: 
142: 
143: __BEGIN_NAMESPACE_STD
144: 
145: extern double atof (__const char *__nptr)
146:      __THROW __attribute_pure__ __nonnull ((1)) __wur;
147: 
148: extern int atoi (__const char *__nptr)
149:      __THROW __attribute_pure__ __nonnull ((1)) __wur;
150: 
151: extern long int atol (__const char *__nptr)
152:      __THROW __attribute_pure__ __nonnull ((1)) __wur;
153: __END_NAMESPACE_STD
154: 
155: #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
156: __BEGIN_NAMESPACE_C99
157: 
158: __extension__ extern long long int atoll (__const char *__nptr)
159:      __THROW __attribute_pure__ __nonnull ((1)) __wur;
160: __END_NAMESPACE_C99
161: #endif
162: 
163: __BEGIN_NAMESPACE_STD
164: 
165: extern double strtod (__const char *__restrict __nptr,
166:                       char **__restrict __endptr)
167:      __THROW __nonnull ((1)) __wur;
168: __END_NAMESPACE_STD
169: 
170: #ifdef  __USE_ISOC99
171: __BEGIN_NAMESPACE_C99
172: 
173: extern float strtof (__const char *__restrict __nptr,
174:                      char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
175: 
176: extern long double strtold (__const char *__restrict __nptr,
177:                             char **__restrict __endptr)
178:      __THROW __nonnull ((1)) __wur;
179: __END_NAMESPACE_C99
180: #endif
181: 
182: __BEGIN_NAMESPACE_STD
183: 
184: extern long int strtol (__const char *__restrict __nptr,
185:                         char **__restrict __endptr, int __base)
186:      __THROW __nonnull ((1)) __wur;
187: 
188: extern unsigned long int strtoul (__const char *__restrict __nptr,
189:                                   char **__restrict __endptr, int __base)
190:      __THROW __nonnull ((1)) __wur;
191: __END_NAMESPACE_STD
192: 
193: #if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
194: 
195: __extension__
196: extern long long int strtoq (__const char *__restrict __nptr,
197:                              char **__restrict __endptr, int __base)
198:      __THROW __nonnull ((1)) __wur;
199: 
200: __extension__
201: extern unsigned long long int strtouq (__const char *__restrict __nptr,
202:                                        char **__restrict __endptr, int __base)
203:      __THROW __nonnull ((1)) __wur;
204: #endif 
205: 
206: #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
207: __BEGIN_NAMESPACE_C99
208: 
209: __extension__
210: extern long long int strtoll (__const char *__restrict __nptr,
211:                               char **__restrict __endptr, int __base)
212:      __THROW __nonnull ((1)) __wur;
213: 
214: __extension__
215: extern unsigned long long int strtoull (__const char *__restrict __nptr,
216:                                         char **__restrict __endptr, int __base)
217:      __THROW __nonnull ((1)) __wur;
218: __END_NAMESPACE_C99
219: #endif 
220: 
221: 
222: #ifdef __USE_GNU
223: 
224: 
225: 
226: 
227: 
228: 
229: 
230: 
231: 
232: 
233: 
234: 
235: 
236: # include <xlocale.h>
237: 
238: 
239: 
240: extern long int strtol_l (__const char *__restrict __nptr,
241:                           char **__restrict __endptr, int __base,
242:                           __locale_t __loc) __THROW __nonnull ((1, 4)) __wur;
243: 
244: extern unsigned long int strtoul_l (__const char *__restrict __nptr,
245:                                     char **__restrict __endptr,
246:                                     int __base, __locale_t __loc)
247:      __THROW __nonnull ((1, 4)) __wur;
248: 
249: __extension__
250: extern long long int strtoll_l (__const char *__restrict __nptr,
251:                                 char **__restrict __endptr, int __base,
252:                                 __locale_t __loc)
253:      __THROW __nonnull ((1, 4)) __wur;
254: 
255: __extension__
256: extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
257:                                           char **__restrict __endptr,
258:                                           int __base, __locale_t __loc)
259:      __THROW __nonnull ((1, 4)) __wur;
260: 
261: extern double strtod_l (__const char *__restrict __nptr,
262:                         char **__restrict __endptr, __locale_t __loc)
263:      __THROW __nonnull ((1, 3)) __wur;
264: 
265: extern float strtof_l (__const char *__restrict __nptr,
266:                        char **__restrict __endptr, __locale_t __loc)
267:      __THROW __nonnull ((1, 3)) __wur;
268: 
269: extern long double strtold_l (__const char *__restrict __nptr,
270:                               char **__restrict __endptr,
271:                               __locale_t __loc)
272:      __THROW __nonnull ((1, 3)) __wur;
273: #endif 
274: 
275: 
276: #ifdef __USE_EXTERN_INLINES
277: __BEGIN_NAMESPACE_STD
278: __extern_inline double
279: __NTH (atof (__const char *__nptr))
280: {
281:   return strtod (__nptr, (char **) NULL);
282: }
283: __extern_inline int
284: __NTH (atoi (__const char *__nptr))
285: {
286:   return (int) strtol (__nptr, (char **) NULL, 10);
287: }
288: __extern_inline long int
289: __NTH (atol (__const char *__nptr))
290: {
291:   return strtol (__nptr, (char **) NULL, 10);
292: }
293: __END_NAMESPACE_STD
294: 
295: # if defined __USE_MISC || defined __USE_ISOC99
296: __BEGIN_NAMESPACE_C99
297: __extension__ __extern_inline long long int
298: __NTH (atoll (__const char *__nptr))
299: {
300:   return strtoll (__nptr, (char **) NULL, 10);
301: }
302: __END_NAMESPACE_C99
303: # endif
304: #endif 
305: 
306: 
307: #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
308: 
309: 
310: 
311: extern char *l64a (long int __n) __THROW __wur;
312: 
313: 
314: extern long int a64l (__const char *__s)
315:      __THROW __attribute_pure__ __nonnull ((1)) __wur;
316: 
317: #endif  
318: 
319: #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED || defined __USE_BSD
320: # include <sys/types.h> 
321: 
322: 
323: 
324: 
325: 
326: 
327: extern long int random (void) __THROW;
328: 
329: 
330: extern void srandom (unsigned int __seed) __THROW;
331: 
332: 
333: 
334: 
335: 
336: extern char *initstate (unsigned int __seed, char *__statebuf,
337:                         size_t __statelen) __THROW __nonnull ((2));
338: 
339: 
340: 
341: extern char *setstate (char *__statebuf) __THROW __nonnull ((1));
342: 
343: 
344: # ifdef __USE_MISC
345: 
346: 
347: 
348: 
349: struct random_data
350:   {
351:     int32_t *fptr;              
352:     int32_t *rptr;              
353:     int32_t *state;             
354:     int rand_type;              
355:     int rand_deg;               
356:     int rand_sep;               
357:     int32_t *end_ptr;           
358:   };
359: 
360: extern int random_r (struct random_data *__restrict __buf,
361:                      int32_t *__restrict __result) __THROW __nonnull ((1, 2));
362: 
363: extern int srandom_r (unsigned int __seed, struct random_data *__buf)
364:      __THROW __nonnull ((2));
365: 
366: extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
367:                         size_t __statelen,
368:                         struct random_data *__restrict __buf)
369:      __THROW __nonnull ((2, 4));
370: 
371: extern int setstate_r (char *__restrict __statebuf,
372:                        struct random_data *__restrict __buf)
373:      __THROW __nonnull ((1, 2));
374: # endif 
375: #endif  
376: 
377: 
378: __BEGIN_NAMESPACE_STD
379: 
380: extern int rand (void) __THROW;
381: 
382: extern void srand (unsigned int __seed) __THROW;
383: __END_NAMESPACE_STD
384: 
385: #ifdef __USE_POSIX
386: 
387: extern int rand_r (unsigned int *__seed) __THROW;
388: #endif
389: 
390: 
391: #if defined __USE_SVID || defined __USE_XOPEN
392: 
393: 
394: 
395: extern double drand48 (void) __THROW;
396: extern double erand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1));
397: 
398: 
399: extern long int lrand48 (void) __THROW;
400: extern long int nrand48 (unsigned short int __xsubi[3])
401:      __THROW __nonnull ((1));
402: 
403: 
404: extern long int mrand48 (void) __THROW;
405: extern long int jrand48 (unsigned short int __xsubi[3])
406:      __THROW __nonnull ((1));
407: 
408: 
409: extern void srand48 (long int __seedval) __THROW;
410: extern unsigned short int *seed48 (unsigned short int __seed16v[3])
411:      __THROW __nonnull ((1));
412: extern void lcong48 (unsigned short int __param[7]) __THROW __nonnull ((1));
413: 
414: # ifdef __USE_MISC
415: 
416: 
417: 
418: struct drand48_data
419:   {
420:     unsigned short int __x[3];  
421:     unsigned short int __old_x[3]; 
422:     unsigned short int __c;     
423:     unsigned short int __init;  
424:     unsigned long long int __a; 
425:   };
426: 
427: 
428: extern int drand48_r (struct drand48_data *__restrict __buffer,
429:                       double *__restrict __result) __THROW __nonnull ((1, 2));
430: extern int erand48_r (unsigned short int __xsubi[3],
431:                       struct drand48_data *__restrict __buffer,
432:                       double *__restrict __result) __THROW __nonnull ((1, 2));
433: 
434: 
435: extern int lrand48_r (struct drand48_data *__restrict __buffer,
436:                       long int *__restrict __result)
437:      __THROW __nonnull ((1, 2));
438: extern int nrand48_r (unsigned short int __xsubi[3],
439:                       struct drand48_data *__restrict __buffer,
440:                       long int *__restrict __result)
441:      __THROW __nonnull ((1, 2));
442: 
443: 
444: extern int mrand48_r (struct drand48_data *__restrict __buffer,
445:                       long int *__restrict __result)
446:      __THROW __nonnull ((1, 2));
447: extern int jrand48_r (unsigned short int __xsubi[3],
448:                       struct drand48_data *__restrict __buffer,
449:                       long int *__restrict __result)
450:      __THROW __nonnull ((1, 2));
451: 
452: 
453: extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
454:      __THROW __nonnull ((2));
455: 
456: extern int seed48_r (unsigned short int __seed16v[3],
457:                      struct drand48_data *__buffer) __THROW __nonnull ((1, 2));
458: 
459: extern int lcong48_r (unsigned short int __param[7],
460:                       struct drand48_data *__buffer)
461:      __THROW __nonnull ((1, 2));
462: # endif 
463: #endif  
464: 
465: #endif 
466: 
467: #ifndef __malloc_and_calloc_defined
468: # define __malloc_and_calloc_defined
469: __BEGIN_NAMESPACE_STD
470: 
471: extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
472: 
473: extern void *calloc (size_t __nmemb, size_t __size)
474:      __THROW __attribute_malloc__ __wur;
475: __END_NAMESPACE_STD
476: #endif
477: 
478: #ifndef __need_malloc_and_calloc
479: __BEGIN_NAMESPACE_STD
480: 
481: 
482: 
483: 
484: 
485: extern void *realloc (void *__ptr, size_t __size)
486:      __THROW __attribute_warn_unused_result__;
487: 
488: extern void free (void *__ptr) __THROW;
489: __END_NAMESPACE_STD
490: 
491: #ifdef  __USE_MISC
492: 
493: extern void cfree (void *__ptr) __THROW;
494: #endif 
495: 
496: #if defined __USE_GNU || defined __USE_BSD || defined __USE_MISC
497: # include <alloca.h>
498: #endif 
499: 
500: #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
501:     || defined __USE_BSD
502: 
503: extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
504: #endif
505: 
506: #ifdef __USE_XOPEN2K
507: 
508: extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
509:      __THROW __nonnull ((1)) __wur;
510: #endif
511: 
512: __BEGIN_NAMESPACE_STD
513: 
514: extern void abort (void) __THROW __attribute__ ((__noreturn__));
515: 
516: 
517: 
518: extern int atexit (void (*__func) (void)) __THROW __nonnull ((1));
519: 
520: #ifdef __USE_GNU
521: 
522: 
523: 
524: # ifdef __cplusplus
525: extern "C++" int at_quick_exit (void (*__func) (void))
526:      __THROW __asm ("at_quick_exit") __nonnull ((1));
527: # else
528: extern int at_quick_exit (void (*__func) (void)) __THROW __nonnull ((1));
529: # endif
530: #endif
531: __END_NAMESPACE_STD
532: 
533: #ifdef  __USE_MISC
534: 
535: 
536: extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
537:      __THROW __nonnull ((1));
538: #endif
539: 
540: __BEGIN_NAMESPACE_STD
541: 
542: 
543: 
544: extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
545: 
546: #ifdef __USE_GNU
547: 
548: 
549: 
550: 
551: 
552: extern void quick_exit (int __status) __THROW __attribute__ ((__noreturn__));
553: #endif
554: __END_NAMESPACE_STD
555: 
556: #ifdef __USE_ISOC99
557: __BEGIN_NAMESPACE_C99
558: 
559: 
560: extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__));
561: __END_NAMESPACE_C99
562: #endif
563: 
564: 
565: __BEGIN_NAMESPACE_STD
566: 
567: extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur;
568: __END_NAMESPACE_STD
569: 
570: 
571: 
572: extern char *__secure_getenv (__const char *__name)
573:      __THROW __nonnull ((1)) __wur;
574: 
575: #if defined __USE_SVID || defined __USE_XOPEN
576: 
577: 
578: 
579: extern int putenv (char *__string) __THROW __nonnull ((1));
580: #endif
581: 
582: #if defined __USE_BSD || defined __USE_XOPEN2K
583: 
584: 
585: extern int setenv (__const char *__name, __const char *__value, int __replace)
586:      __THROW __nonnull ((2));
587: 
588: 
589: extern int unsetenv (__const char *__name) __THROW __nonnull ((1));
590: #endif
591: 
592: #ifdef  __USE_MISC
593: 
594: 
595: 
596: extern int clearenv (void) __THROW;
597: #endif
598: 
599: 
600: #if defined __USE_MISC \
601:     || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
602: 
603: 
604: 
605: 
606: extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;
607: #endif
608: 
609: #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
610:     || defined __USE_XOPEN2K8
611: 
612: 
613: 
614: 
615: 
616: 
617: 
618: 
619: # ifndef __USE_FILE_OFFSET64
620: extern int mkstemp (char *__template) __nonnull ((1)) __wur;
621: # else
622: #  ifdef __REDIRECT
623: extern int __REDIRECT (mkstemp, (char *__template), mkstemp64)
624:      __nonnull ((1)) __wur;
625: #  else
626: #   define mkstemp mkstemp64
627: #  endif
628: # endif
629: # ifdef __USE_LARGEFILE64
630: extern int mkstemp64 (char *__template) __nonnull ((1)) __wur;
631: # endif
632: #endif
633: 
634: #ifdef __USE_MISC
635: 
636: 
637: 
638: 
639: 
640: 
641: # ifndef __USE_FILE_OFFSET64
642: extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur;
643: # else
644: #  ifdef __REDIRECT
645: extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen),
646:                        mkstemps64) __nonnull ((1)) __wur;
647: #  else
648: #   define mkstemps mkstemps64
649: #  endif
650: # endif
651: # ifdef __USE_LARGEFILE64
652: extern int mkstemps64 (char *__template, int __suffixlen)
653:      __nonnull ((1)) __wur;
654: # endif
655: #endif
656: 
657: #if defined __USE_BSD || defined __USE_XOPEN2K8
658: 
659: 
660: 
661: 
662: 
663: extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur;
664: #endif
665: 
666: #ifdef __USE_GNU
667: 
668: 
669: 
670: 
671: 
672: 
673: # ifndef __USE_FILE_OFFSET64
674: extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur;
675: # else
676: #  ifdef __REDIRECT
677: extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64)
678:      __nonnull ((1)) __wur;
679: #  else
680: #   define mkostemp mkostemp64
681: #  endif
682: # endif
683: # ifdef __USE_LARGEFILE64
684: extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur;
685: # endif
686: 
687: 
688: 
689: 
690: 
691: 
692: 
693: # ifndef __USE_FILE_OFFSET64
694: extern int mkostemps (char *__template, int __suffixlen, int __flags)
695:      __nonnull ((1)) __wur;
696: # else
697: #  ifdef __REDIRECT
698: extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen,
699:                                    int __flags), mkostemps64)
700:      __nonnull ((1)) __wur;
701: #  else
702: #   define mkostemps mkostemps64
703: #  endif
704: # endif
705: # ifdef __USE_LARGEFILE64
706: extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
707:      __nonnull ((1)) __wur;
708: # endif
709: #endif
710: 
711: 
712: __BEGIN_NAMESPACE_STD
713: 
714: 
715: 
716: 
717: extern int system (__const char *__command) __wur;
718: __END_NAMESPACE_STD
719: 
720: 
721: #ifdef  __USE_GNU
722: 
723: 
724: extern char *canonicalize_file_name (__const char *__name)
725:      __THROW __nonnull ((1)) __wur;
726: #endif
727: 
728: #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
729: 
730: 
731: 
732: 
733: 
734: extern char *realpath (__const char *__restrict __name,
735:                        char *__restrict __resolved) __THROW __wur;
736: #endif
737: 
738: 
739: 
740: #ifndef __COMPAR_FN_T
741: # define __COMPAR_FN_T
742: typedef int (*__compar_fn_t) (__const void *, __const void *);
743: 
744: # ifdef __USE_GNU
745: typedef __compar_fn_t comparison_fn_t;
746: # endif
747: #endif
748: #ifdef __USE_GNU
749: typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
750: #endif
751: 
752: __BEGIN_NAMESPACE_STD
753: 
754: 
755: extern void *bsearch (__const void *__key, __const void *__base,
756:                       size_t __nmemb, size_t __size, __compar_fn_t __compar)
757:      __nonnull ((1, 2, 5)) __wur;
758: 
759: 
760: 
761: extern void qsort (void *__base, size_t __nmemb, size_t __size,
762:                    __compar_fn_t __compar) __nonnull ((1, 4));
763: #ifdef __USE_GNU
764: extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
765:                      __compar_d_fn_t __compar, void *__arg)
766:   __nonnull ((1, 4));
767: #endif
768: 
769: 
770: 
771: extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
772: extern long int labs (long int __x) __THROW __attribute__ ((__const__)) __wur;
773: __END_NAMESPACE_STD
774: 
775: #ifdef __USE_ISOC99
776: __extension__ extern long long int llabs (long long int __x)
777:      __THROW __attribute__ ((__const__)) __wur;
778: #endif
779: 
780: 
781: __BEGIN_NAMESPACE_STD
782: 
783: 
784: 
785: extern div_t div (int __numer, int __denom)
786:      __THROW __attribute__ ((__const__)) __wur;
787: extern ldiv_t ldiv (long int __numer, long int __denom)
788:      __THROW __attribute__ ((__const__)) __wur;
789: __END_NAMESPACE_STD
790: 
791: #ifdef __USE_ISOC99
792: __BEGIN_NAMESPACE_C99
793: __extension__ extern lldiv_t lldiv (long long int __numer,
794:                                     long long int __denom)
795:      __THROW __attribute__ ((__const__)) __wur;
796: __END_NAMESPACE_C99
797: #endif
798: 
799: 
800: #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
801:     || defined __USE_SVID
802: 
803: 
804: 
805: 
806: 
807: 
808: extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
809:                    int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur;
810: 
811: 
812: 
813: 
814: extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
815:                    int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur;
816: 
817: 
818: 
819: 
820: extern char *gcvt (double __value, int __ndigit, char *__buf)
821:      __THROW __nonnull ((3)) __wur;
822: 
823: 
824: # ifdef __USE_MISC
825: 
826: extern char *qecvt (long double __value, int __ndigit,
827:                     int *__restrict __decpt, int *__restrict __sign)
828:      __THROW __nonnull ((3, 4)) __wur;
829: extern char *qfcvt (long double __value, int __ndigit,
830:                     int *__restrict __decpt, int *__restrict __sign)
831:      __THROW __nonnull ((3, 4)) __wur;
832: extern char *qgcvt (long double __value, int __ndigit, char *__buf)
833:      __THROW __nonnull ((3)) __wur;
834: 
835: 
836: 
837: 
838: extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
839:                    int *__restrict __sign, char *__restrict __buf,
840:                    size_t __len) __THROW __nonnull ((3, 4, 5));
841: extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
842:                    int *__restrict __sign, char *__restrict __buf,
843:                    size_t __len) __THROW __nonnull ((3, 4, 5));
844: 
845: extern int qecvt_r (long double __value, int __ndigit,
846:                     int *__restrict __decpt, int *__restrict __sign,
847:                     char *__restrict __buf, size_t __len)
848:      __THROW __nonnull ((3, 4, 5));
849: extern int qfcvt_r (long double __value, int __ndigit,
850:                     int *__restrict __decpt, int *__restrict __sign,
851:                     char *__restrict __buf, size_t __len)
852:      __THROW __nonnull ((3, 4, 5));
853: # endif 
854: #endif  
855: 
856: 
857: __BEGIN_NAMESPACE_STD
858: 
859: 
860: extern int mblen (__const char *__s, size_t __n) __THROW __wur;
861: 
862: 
863: extern int mbtowc (wchar_t *__restrict __pwc,
864:                    __const char *__restrict __s, size_t __n) __THROW __wur;
865: 
866: 
867: extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
868: 
869: 
870: 
871: extern size_t mbstowcs (wchar_t *__restrict  __pwcs,
872:                         __const char *__restrict __s, size_t __n) __THROW;
873: 
874: extern size_t wcstombs (char *__restrict __s,
875:                         __const wchar_t *__restrict __pwcs, size_t __n)
876:      __THROW;
877: __END_NAMESPACE_STD
878: 
879: 
880: #ifdef __USE_SVID
881: 
882: 
883: 
884: 
885: extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur;
886: #endif
887: 
888: 
889: #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
890: 
891: 
892: 
893: 
894: 
895: 
896: extern int getsubopt (char **__restrict __optionp,
897:                       char *__const *__restrict __tokens,
898:                       char **__restrict __valuep)
899:      __THROW __nonnull ((1, 2, 3)) __wur;
900: #endif
901: 
902: 
903: #ifdef __USE_XOPEN
904: 
905: extern void setkey (__const char *__key) __THROW __nonnull ((1));
906: #endif
907: 
908: 
909: 
910: 
911: #ifdef __USE_XOPEN2KXSI
912: 
913: extern int posix_openpt (int __oflag) __wur;
914: #endif
915: 
916: #ifdef __USE_XOPEN
917: 
918: 
919: 
920: 
921: extern int grantpt (int __fd) __THROW;
922: 
923: 
924: 
925: extern int unlockpt (int __fd) __THROW;
926: 
927: 
928: 
929: 
930: extern char *ptsname (int __fd) __THROW __wur;
931: #endif
932: 
933: #ifdef __USE_GNU
934: 
935: 
936: 
937: extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
938:      __THROW __nonnull ((2));
939: 
940: 
941: extern int getpt (void);
942: #endif
943: 
944: #ifdef __USE_BSD
945: 
946: 
947: 
948: extern int getloadavg (double __loadavg[], int __nelem)
949:      __THROW __nonnull ((1));
950: #endif
951: 
952: 
953: 
954: #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
955: # include <bits/stdlib.h>
956: #endif
957: #ifdef __LDBL_COMPAT
958: # include <bits/stdlib-ldbl.h>
959: #endif
960: 
961: #endif 
962: #undef __need_malloc_and_calloc
963: 
964: __END_DECLS
965: 
966: #endif 
967: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved