Changeset 9df6b0f in mainline


Ignore:
Timestamp:
2014-03-17T19:50:17Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9a5abb78
Parents:
7ddc2c7 (diff), dc5a1f26 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge (minor) libposix changes

  • math.h in libposix is more standalone (i.e. no inclusion of libc headers)
  • added FILENAME_MAX
  • actually allow usage of functions with fpos_t
Location:
uspace/lib/posix
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r7ddc2c7 r9df6b0f  
    3636
    3737INCLUDE_LIBC = ./include/libc
    38 INCLUDE_LIBMATH = ./include/libmath
    3938
    4039LIBC_FILE = $(LIBC_PREFIX)/libc.a
     
    4746COLLISIONS_LIST = collisions.list
    4847
    49 PRE_DEPEND = $(INCLUDE_LIBC) $(INCLUDE_LIBMATH)
     48PRE_DEPEND = $(INCLUDE_LIBC)
    5049EXTRA_CLEAN = \
    51         $(INCLUDE_LIBC) $(INCLUDE_LIBMATH) \
     50        $(INCLUDE_LIBC) \
    5251        $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \
    5352        $(COLLISIONS_LIST)
     
    8584        ln -s -f -n ../$^ $@
    8685
    87 $(INCLUDE_LIBMATH): ../math/include
    88         ln -s -f -n ../$^ $@
    89 
    9086$(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    9187        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
  • uspace/lib/posix/include/posix/math.h

    r7ddc2c7 r9df6b0f  
    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).
    3339 */
    3440
     
    3642#define POSIX_MATH_H_
    3743
    38 #include "libmath/math.h"
     44#ifdef __GNUC__
     45        #define HUGE_VAL (__builtin_huge_val())
     46#endif
     47
     48extern double ldexp(double, int);
     49extern double frexp(double, int *);
     50
     51extern double fabs(double);
     52extern double floor(double);
     53extern double ceil(double);
     54extern double modf(double, double *);
     55extern double fmod(double, double);
     56extern double pow(double, double);
     57extern double exp(double);
     58extern double frexp(double, int *);
     59extern double expm1(double);
     60extern double sqrt(double);
     61extern double log(double);
     62extern double log10(double);
     63extern double sin(double);
     64extern double sinh(double);
     65extern double asin(double);
     66extern double asinh(double);
     67extern double cos(double);
     68extern double cosh(double);
     69extern double acos(double);
     70extern double acosh(double);
     71extern double tan(double);
     72extern double tanh(double);
     73extern double atan(double);
     74extern double atanh(double);
     75extern double atan2(double, double);
     76extern double copysign(double, double);
    3977
    4078#endif /* POSIX_MATH_H_ */
  • uspace/lib/posix/include/posix/stdio.h

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

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