Changeset 55092672 in mainline for uspace/lib/c


Ignore:
Timestamp:
2018-06-15T13:06:18Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
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)
Message:

Clean up libposix stdio.h and stdlib.h a bit.

Location:
uspace/lib/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/elf/elf.c

    r1ae9c07 r55092672  
    2727 */
    2828
     29#include <assert.h>
    2930#include <elf/elf.h>
    30 
    31 #include <assert.h>
     31#include <stdbool.h>
    3232#include <stdlib.h>
    3333
  • uspace/lib/c/generic/strtol.c

    r1ae9c07 r55092672  
    3737 */
    3838
     39#include <assert.h>
     40#include <ctype.h>
     41#include <errno.h>
    3942#include <inttypes.h>
     43#include <limits.h>
     44#include <stdbool.h>
    4045#include <stdlib.h>
    41 #include <limits.h>
    42 #include <ctype.h>
    43 #include <assert.h>
    4446
    4547// TODO: unit tests
  • uspace/lib/c/include/stdio.h

    r1ae9c07 r55092672  
    5959#define BUFSIZ  4096
    6060
     61/** Recommended size of fixed-size array for holding file names. */
     62#define FILENAME_MAX 4096
     63
    6164/** Forward declaration */
    6265struct _IO_FILE;
     
    6871
    6972/* Character and string input functions */
     73#define getc fgetc
    7074extern int fgetc(FILE *);
    7175extern char *fgets(char *, int, FILE *);
     
    7478
    7579/* Character and string output functions */
     80#define putc fputc
    7681extern int fputc(int, FILE *);
    7782extern int fputs(const char *, FILE *);
     
    96101extern int snprintf(char *, size_t, const char *, ...)
    97102    _HELENOS_PRINTF_ATTRIBUTE(3, 4);
     103#if defined(_HELENOS_SOURCE) || defined(_GNU_SOURCE)
    98104extern int vasprintf(char **, const char *, va_list);
    99105extern int asprintf(char **, const char *, ...)
     106#endif
    100107    _HELENOS_PRINTF_ATTRIBUTE(2, 3);
    101108extern int vsnprintf(char *, size_t, const char *, va_list);
     
    137144#define _IOLBF 1
    138145#define _IOFBF 2
     146
     147extern char *gets(char *, size_t);
     148
    139149#endif
    140150
     
    168178extern FILE *fdopen(int, const char *);
    169179extern int fileno(FILE *);
    170 extern char *gets(char *, size_t);
    171180
    172181#include <offset.h>
  • uspace/lib/c/include/stdlib.h

    r1ae9c07 r55092672  
    3838#include <malloc.h>
    3939#include <qsort.h>
    40 #include <stacktrace.h>
    4140
    4241#define RAND_MAX  714025
     42
     43#define EXIT_FAILURE 1
     44#define EXIT_SUCCESS 0
    4345
    4446extern int rand(void);
Note: See TracChangeset for help on using the changeset viewer.