Changeset 55092672 in mainline
- Timestamp:
- 2018-06-15T13:06:18Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8338a81
- Parents:
- 1ae9c07
- git-author:
- Jiri Svoboda <jiri@…> (2018-06-14 22:05:23)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-06-15 13:06:18)
- Location:
- uspace
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/scli.h
r1ae9c07 r55092672 31 31 32 32 #include "config.h" 33 #include <errno.h> 33 34 #include <stdint.h> 34 35 #include <stdio.h> -
uspace/app/sbi/src/os/os.h
r1ae9c07 r55092672 30 30 #define OS_H_ 31 31 32 #include <errno.h> 33 32 34 char *os_str_acat(const char *a, const char *b); 33 35 char *os_str_aslice(const char *str, size_t start, size_t length); -
uspace/app/untar/main.c
r1ae9c07 r55092672 33 33 */ 34 34 35 #include <errno.h> 35 36 #include <stdio.h> 36 37 #include <stdarg.h> -
uspace/lib/bithenge/include/bithenge/os.h
r1ae9c07 r55092672 33 33 34 34 #ifdef __HELENOS__ 35 #include <stdint.h> 35 36 typedef int64_t bithenge_int_t; 36 37 #define BITHENGE_PRId PRId64 -
uspace/lib/c/generic/elf/elf.c
r1ae9c07 r55092672 27 27 */ 28 28 29 #include <assert.h> 29 30 #include <elf/elf.h> 30 31 #include <assert.h> 31 #include <stdbool.h> 32 32 #include <stdlib.h> 33 33 -
uspace/lib/c/generic/strtol.c
r1ae9c07 r55092672 37 37 */ 38 38 39 #include <assert.h> 40 #include <ctype.h> 41 #include <errno.h> 39 42 #include <inttypes.h> 43 #include <limits.h> 44 #include <stdbool.h> 40 45 #include <stdlib.h> 41 #include <limits.h>42 #include <ctype.h>43 #include <assert.h>44 46 45 47 // TODO: unit tests -
uspace/lib/c/include/stdio.h
r1ae9c07 r55092672 59 59 #define BUFSIZ 4096 60 60 61 /** Recommended size of fixed-size array for holding file names. */ 62 #define FILENAME_MAX 4096 63 61 64 /** Forward declaration */ 62 65 struct _IO_FILE; … … 68 71 69 72 /* Character and string input functions */ 73 #define getc fgetc 70 74 extern int fgetc(FILE *); 71 75 extern char *fgets(char *, int, FILE *); … … 74 78 75 79 /* Character and string output functions */ 80 #define putc fputc 76 81 extern int fputc(int, FILE *); 77 82 extern int fputs(const char *, FILE *); … … 96 101 extern int snprintf(char *, size_t, const char *, ...) 97 102 _HELENOS_PRINTF_ATTRIBUTE(3, 4); 103 #if defined(_HELENOS_SOURCE) || defined(_GNU_SOURCE) 98 104 extern int vasprintf(char **, const char *, va_list); 99 105 extern int asprintf(char **, const char *, ...) 106 #endif 100 107 _HELENOS_PRINTF_ATTRIBUTE(2, 3); 101 108 extern int vsnprintf(char *, size_t, const char *, va_list); … … 137 144 #define _IOLBF 1 138 145 #define _IOFBF 2 146 147 extern char *gets(char *, size_t); 148 139 149 #endif 140 150 … … 168 178 extern FILE *fdopen(int, const char *); 169 179 extern int fileno(FILE *); 170 extern char *gets(char *, size_t);171 180 172 181 #include <offset.h> -
uspace/lib/c/include/stdlib.h
r1ae9c07 r55092672 38 38 #include <malloc.h> 39 39 #include <qsort.h> 40 #include <stacktrace.h>41 40 42 41 #define RAND_MAX 714025 42 43 #define EXIT_FAILURE 1 44 #define EXIT_SUCCESS 0 43 45 44 46 extern int rand(void); -
uspace/lib/posix/include/posix/stdio.h
r1ae9c07 r55092672 40 40 41 41 #include "stddef.h" 42 #include "unistd.h"43 42 #include "libc/io/verify.h" 44 43 #include "sys/types.h" … … 46 45 #include "limits.h" 47 46 48 /*49 * These are the same as in HelenOS libc.50 * It would be possible to directly include <stdio.h> but51 * it is better not to pollute POSIX namespace with other functions52 * defined in that header.53 *54 * Because libposix is always linked with libc, providing only these55 * forward declarations ought to be enough.56 */57 #define EOF (-1)58 59 /** Size of buffers used in stdio header. */60 #define BUFSIZ 409661 62 /** Maximum size in bytes of the longest filename. */63 #define FILENAME_MAX 409664 65 typedef struct _IO_FILE FILE;66 67 extern FILE *stdin;68 extern FILE *stdout;69 extern FILE *stderr;70 71 extern int fgetc(FILE *);72 extern char *fgets(char *, int, FILE *);73 74 extern int getchar(void);75 extern char *gets(char *, size_t);76 77 extern int fputc(int, FILE *);78 extern int fputs(const char *, FILE *);79 80 extern int putchar(int);81 extern int puts(const char *);82 83 extern int fprintf(FILE *, const char *, ...) _HELENOS_PRINTF_ATTRIBUTE(2, 3);84 extern int vfprintf(FILE *, const char *, va_list);85 86 extern int printf(const char *, ...) _HELENOS_PRINTF_ATTRIBUTE(1, 2);87 extern int vprintf(const char *, va_list);88 89 extern int snprintf(char *, size_t, const char *, ...) _HELENOS_PRINTF_ATTRIBUTE(3, 4);90 #ifdef _GNU_SOURCE91 extern int vasprintf(char **, const char *, va_list);92 extern int asprintf(char **, const char *, ...) _HELENOS_PRINTF_ATTRIBUTE(2, 3);93 #endif94 extern int vsnprintf(char *, size_t, const char *, va_list);95 96 extern FILE *fopen(const char *, const char *);97 47 extern FILE *fdopen(int, const char *); 98 extern int fclose(FILE *);99 100 extern size_t fread(void *, size_t, size_t, FILE *);101 extern size_t fwrite(const void *, size_t, size_t, FILE *);102 103 extern void rewind(FILE *);104 extern int feof(FILE *);105 48 extern int fileno(FILE *); 106 107 extern int fflush(FILE *);108 extern int ferror(FILE *);109 extern void clearerr(FILE *);110 111 extern void setvbuf(FILE *, void *, int, size_t);112 extern void setbuf(FILE *, void *);113 114 /* POSIX specific stuff. */115 49 116 50 /* Identifying the Terminal */ … … 119 53 extern char *ctermid(char *s); 120 54 121 /* Error Recovery */122 extern void clearerr(FILE *stream);123 124 55 /* Input/Output */ 125 #undef putc126 #define putc fputc127 extern int fputs(const char *__restrict__ s, FILE *__restrict__ stream);128 #undef getc129 #define getc fgetc130 extern int ungetc(int c, FILE *stream);131 56 extern ssize_t getdelim(char **__restrict__ lineptr, size_t *__restrict__ n, 132 57 int delimiter, FILE *__restrict__ stream); 133 58 extern ssize_t getline(char **__restrict__ lineptr, size_t *__restrict__ n, 134 59 FILE *__restrict__ stream); 135 136 /* Opening Streams */137 extern FILE *freopen(const char *__restrict__ filename,138 const char *__restrict__ mode, FILE *__restrict__ stream);139 60 140 61 /* Error Messages */ … … 148 69 extern int fsetpos(FILE *stream, const fpos_t *pos); 149 70 extern int fgetpos(FILE *__restrict__ stream, fpos_t *__restrict__ pos); 150 extern int fseek(FILE *stream, long offset, int whence);151 71 extern int fseeko(FILE *stream, off_t offset, int whence); 152 extern long ftell(FILE *stream);153 72 extern off_t ftello(FILE *stream); 154 155 /* Flushing Buffers */156 extern int fflush(FILE *stream);157 73 158 74 /* Formatted Output */ … … 173 89 extern int putchar_unlocked(int c); 174 90 175 /* Deleting Files */176 extern int remove(const char *path);177 178 /* Renaming Files */179 extern int rename(const char *oldname, const char *newname);180 181 91 /* Temporary Files */ 182 92 #undef L_tmpnam … … 186 96 extern FILE *tmpfile(void); 187 97 188 189 98 #endif /* POSIX_STDIO_H_ */ 190 99 -
uspace/lib/posix/include/posix/stdlib.h
r1ae9c07 r55092672 37 37 #define POSIX_STDLIB_H_ 38 38 39 #include "libc/stdlib.h" 39 40 #include "sys/types.h" 40 41 41 42 #include <_bits/NULL.h> 42 43 43 #define RAND_MAX 714025 44 /* Process Termination */ 45 #define _Exit exit 44 46 45 /* Process Termination */46 #undef EXIT_FAILURE47 #define EXIT_FAILURE 148 #undef EXIT_SUCCESS49 #define EXIT_SUCCESS 050 #define _Exit exit51 47 extern int atexit(void (*func)(void)); 52 extern void exit(int status) __attribute__((noreturn));53 extern void abort(void) __attribute__((noreturn));54 48 55 49 /* Absolute Value */ … … 77 71 78 72 /* Array Functions */ 79 extern void qsort(void *array, size_t count, size_t size,80 int (*compare)(const void *, const void *));81 73 extern void *bsearch(const void *key, const void *base, 82 74 size_t nmemb, size_t size, int (*compar)(const void *, const void *)); … … 96 88 extern long double strtold(const char *__restrict__ nptr, char **__restrict__ endptr); 97 89 98 /* Integer Conversion */99 extern int atoi(const char *nptr);100 extern long int atol(const char *nptr);101 extern long long int atoll(const char *nptr);102 extern long int strtol(const char *__restrict__ nptr,103 char **__restrict__ endptr, int base);104 extern long long int strtoll(const char *__restrict__ nptr,105 char **__restrict__ endptr, int base);106 extern unsigned long int strtoul(const char *__restrict__ nptr,107 char **__restrict__ endptr, int base);108 extern unsigned long long int strtoull(109 const char *__restrict__ nptr, char **__restrict__ endptr, int base);110 111 /* Memory Allocation */112 extern void *malloc(size_t size)113 __attribute__((malloc));114 extern void *calloc(size_t nelem, size_t elsize)115 __attribute__((malloc));116 extern void *realloc(void *ptr, size_t size)117 __attribute__((warn_unused_result));118 extern void free(void *ptr);119 120 90 /* Temporary Files */ 121 91 extern int mkstemp(char *tmpl); 122 123 /* Pseudo-random number generator */124 extern int rand(void);125 extern void srand(unsigned int seed);126 92 127 93 /* Legacy Declarations */
Note:
See TracChangeset
for help on using the changeset viewer.