Changes in / [9df6b0f:7ddc2c7] in mainline


Ignore:
Location:
uspace/lib/posix
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r9df6b0f r7ddc2c7  
    3636
    3737INCLUDE_LIBC = ./include/libc
     38INCLUDE_LIBMATH = ./include/libmath
    3839
    3940LIBC_FILE = $(LIBC_PREFIX)/libc.a
     
    4647COLLISIONS_LIST = collisions.list
    4748
    48 PRE_DEPEND = $(INCLUDE_LIBC)
     49PRE_DEPEND = $(INCLUDE_LIBC) $(INCLUDE_LIBMATH)
    4950EXTRA_CLEAN = \
    50         $(INCLUDE_LIBC) \
     51        $(INCLUDE_LIBC) $(INCLUDE_LIBMATH) \
    5152        $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \
    5253        $(COLLISIONS_LIST)
     
    8485        ln -s -f -n ../$^ $@
    8586
     87$(INCLUDE_LIBMATH): ../math/include
     88        ln -s -f -n ../$^ $@
     89
    8690$(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    8791        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
  • uspace/lib/posix/include/posix/math.h

    r9df6b0f r7ddc2c7  
    3131 */
    3232/** @file Mathematical operations.
    33  *
    34  * The purpose of this file is only to provide prototypes of mathematical
    35  * functions defined by C standard and by POSIX.
    36  *
    37  * It is up to the application to correctly link with either libmath
    38  * (provided by HelenOS) or by some other math library (such as fdlibm).
    3933 */
    4034
     
    4236#define POSIX_MATH_H_
    4337
    44 #ifdef __GNUC__
    45         #define HUGE_VAL (__builtin_huge_val())
    46 #endif
    47 
    48 extern double ldexp(double, int);
    49 extern double frexp(double, int *);
    50 
    51 extern double fabs(double);
    52 extern double floor(double);
    53 extern double ceil(double);
    54 extern double modf(double, double *);
    55 extern double fmod(double, double);
    56 extern double pow(double, double);
    57 extern double exp(double);
    58 extern double frexp(double, int *);
    59 extern double expm1(double);
    60 extern double sqrt(double);
    61 extern double log(double);
    62 extern double log10(double);
    63 extern double sin(double);
    64 extern double sinh(double);
    65 extern double asin(double);
    66 extern double asinh(double);
    67 extern double cos(double);
    68 extern double cosh(double);
    69 extern double acos(double);
    70 extern double acosh(double);
    71 extern double tan(double);
    72 extern double tanh(double);
    73 extern double atan(double);
    74 extern double atanh(double);
    75 extern double atan2(double, double);
    76 extern double copysign(double, double);
     38#include "libmath/math.h"
    7739
    7840#endif /* POSIX_MATH_H_ */
  • uspace/lib/posix/include/posix/stdio.h

    r9df6b0f r7ddc2c7  
    6464#define EOF (-1)
    6565
    66 /** Size of buffers used in stdio header. */
    6766#define BUFSIZ  4096
    68 
    69 /** Maximum size in bytes of the longest filename. */
    70 #define FILENAME_MAX 4096
    7167
    7268typedef struct _IO_FILE FILE;
     
    159155
    160156/* File Positioning */
    161 typedef struct {
    162         off64_t offset;
    163 } __POSIX_DEF__(fpos_t);
    164 
     157typedef struct _posix_fpos __POSIX_DEF__(fpos_t);
    165158extern int __POSIX_DEF__(fsetpos)(FILE *stream, const __POSIX_DEF__(fpos_t) *pos);
    166159extern int __POSIX_DEF__(fgetpos)(FILE *restrict stream, __POSIX_DEF__(fpos_t) *restrict pos);
  • uspace/lib/posix/source/stdio.c

    r9df6b0f r7ddc2c7  
    309309}
    310310
     311struct _posix_fpos {
     312        off64_t offset;
     313};
     314
    311315/** Restores stream a to position previously saved with fgetpos().
    312316 *
Note: See TracChangeset for help on using the changeset viewer.