Changeset 4e6a610 in mainline for uspace/lib/c/include/stdio.h


Ignore:
Timestamp:
2018-06-25T09:54:28Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bfe90b6
Parents:
fb0ec570
git-author:
Jiri Svoboda <jiri@…> (2018-06-24 17:51:54)
git-committer:
Jiri Svoboda <jiri@…> (2018-06-25 09:54:28)
Message:

Temporary file functions rework. Fix libposix access() not working on directories.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdio.h

    rfb0ec570 r4e6a610  
    4040#include <stdarg.h>
    4141#include <io/verify.h>
     42#include <_bits/NULL.h>
    4243#include <_bits/size_t.h>
    4344#include <_bits/wchar_t.h>
    4445#include <_bits/wint_t.h>
    45 
    46 #define EOF  (-1)
    47 
    48 #ifndef SEEK_SET
    49 #define SEEK_SET  0
    50 #endif
    51 
    52 #ifndef SEEK_CUR
    53 #define SEEK_CUR  1
    54 #endif
    55 
    56 #ifndef SEEK_END
    57 #define SEEK_END  2
    58 #endif
    59 
    60 /** Default size for stream I/O buffers */
    61 #define BUFSIZ  4096
    62 
    63 /** Max number of files that is guaranteed to be able to open at the same time */
    64 #define FOPEN_MAX VFS_MAX_OPEN_FILES
    65 
    66 /** Recommended size of fixed-size array for holding file names. */
    67 #define FILENAME_MAX 4096
    6846
    6947/** Forward declaration */
     
    7553        off64_t pos;
    7654} fpos_t;
     55
     56#ifndef _HELENOS_SOURCE
     57#define _IONBF 0
     58#define _IOLBF 1
     59#define _IOFBF 2
     60#endif
     61
     62/** Default size for stream I/O buffers */
     63#define BUFSIZ  4096
     64
     65#define EOF  (-1)
     66
     67/** Max number of files that is guaranteed to be able to open at the same time */
     68#define FOPEN_MAX VFS_MAX_OPEN_FILES
     69
     70/** Recommended size of fixed-size array for holding file names. */
     71#define FILENAME_MAX 4096
     72
     73/** Length of "/tmp/tmp.XXXXXX" + 1 */
     74#define L_tmpnam 16
     75
     76#ifndef SEEK_SET
     77#define SEEK_SET  0
     78#endif
     79
     80#ifndef SEEK_CUR
     81#define SEEK_CUR  1
     82#endif
     83
     84#ifndef SEEK_END
     85#define SEEK_END  2
     86#endif
     87
     88/** Minimum number of unique temporary file names */
     89#define TMP_MAX 1000000
    7790
    7891extern FILE *stdin;
     
    157170
    158171/* Misc file functions */
     172extern int remove(const char *);
    159173extern int rename(const char *, const char *);
    160 extern int remove(const char *);
    161 
    162 #ifndef _HELENOS_SOURCE
    163 #define _IONBF 0
    164 #define _IOLBF 1
    165 #define _IOFBF 2
    166 
    167 #endif
     174
     175extern FILE *tmpfile(void);
     176extern char *tmpnam(char *s) __attribute__((deprecated));
    168177
    169178#ifdef _HELENOS_SOURCE
Note: See TracChangeset for help on using the changeset viewer.