Changes in / [5c5117c:f3a605be] in mainline


Ignore:
Location:
uspace/lib/posix
Files:
1 added
8 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r5c5117c rf3a605be  
    4343        stdio.c \
    4444        stdlib.c \
    45         stdlib/strtold.c \
    4645        string.c \
    4746        strings.c \
  • uspace/lib/posix/fcntl.c

    r5c5117c rf3a605be  
    3535#define LIBPOSIX_INTERNAL
    3636
    37 #include "internal/common.h"
     37#include "common.h"
    3838#include "fcntl.h"
    3939
  • uspace/lib/posix/fnmatch.c

    r5c5117c rf3a605be  
    3535#define LIBPOSIX_INTERNAL
    3636
    37 #include "internal/common.h"
     37#include "common.h"
    3838#include "fnmatch.h"
    3939
  • uspace/lib/posix/getopt.c

    r5c5117c rf3a605be  
    3535#define LIBPOSIX_INTERNAL
    3636
    37 #include "internal/common.h"
     37#include "common.h"
    3838#include "getopt.h"
    3939
  • uspace/lib/posix/stdio.c

    r5c5117c rf3a605be  
    3939#include <errno.h>
    4040
    41 #include "internal/common.h"
     41#include "common.h"
    4242#include "stdio.h"
    4343#include "string.h"
  • uspace/lib/posix/stdlib.c

    r5c5117c rf3a605be  
    3737
    3838#include "stdlib.h"
    39 #include "internal/common.h"
     39#include "common.h"
    4040
    4141/**
     
    7777
    7878/**
    79  * Converts a string representation of a floating-point number to
    80  * its native representation. See posix_strtold().
    81  *
     79 *
    8280 * @param nptr
    8381 * @param endptr
     
    8684float posix_strtof(const char *restrict nptr, char **restrict endptr)
    8785{
    88         return (float) posix_strtold(nptr, endptr);
     86        // TODO
     87        not_implemented();
    8988}
    9089
    9190/**
    92  * Converts a string representation of a floating-point number to
    93  * its native representation. See posix_strtold().
    94  *
     91 *
    9592 * @param nptr
    9693 * @param endptr
     
    9996double posix_strtod(const char *restrict nptr, char **restrict endptr)
    10097{
    101         return (double) posix_strtold(nptr, endptr);
     98        // TODO
     99        not_implemented();
     100}
     101
     102/**
     103 *
     104 * @param nptr
     105 * @param endptr
     106 * @return
     107 */
     108long double posix_strtold(const char *restrict nptr, char **restrict endptr)
     109{
     110        // TODO
     111        not_implemented();
    102112}
    103113
  • uspace/lib/posix/string.h

    r5c5117c rf3a605be  
    102102extern size_t posix_strnlen(const char *s, size_t n);
    103103
    104 /* Legacy declarations */
    105 extern int posix_ffs(int i);
    106 
    107104#ifndef LIBPOSIX_INTERNAL
    108105        #define strcpy posix_strcpy
     
    137134        #define strlen posix_strlen
    138135        #define strnlen posix_strnlen
    139 
    140         #define ffs posix_ffs
    141136#endif
    142137
  • uspace/lib/posix/strings.c

    r5c5117c rf3a605be  
    3636#define LIBPOSIX_INTERNAL
    3737
    38 #include "internal/common.h"
     38#include "common.h"
    3939#include "strings.h"
    4040#include "string.h"
    41 #include "ctype.h"
    4241
    4342/**
     
    6059int posix_strcasecmp(const char *s1, const char *s2)
    6160{
    62         return posix_strncasecmp(s1, s2, STR_NO_LIMIT);
     61        // TODO
     62        not_implemented();
    6363}
    6464
     
    7272int posix_strncasecmp(const char *s1, const char *s2, size_t n)
    7373{
    74         for (size_t i = 0; i < n; ++i) {
    75                 int cmp = tolower(s1[i]) - tolower(s2[i]);
    76                 if (cmp != 0) {
    77                         return cmp;
    78                 }
    79                
    80                 if (s1[i] == 0) {
    81                         return 0;
    82                 }
    83         }
    84        
    85         return 0;
     74        // TODO
     75        not_implemented();
    8676}
    8777
  • uspace/lib/posix/sys/stat.c

    r5c5117c rf3a605be  
    3737
    3838#include "stat.h"
    39 #include "../internal/common.h"
     39#include "../common.h"
    4040#include <mem.h>
    4141
  • uspace/lib/posix/sys/stat.h

    r5c5117c rf3a605be  
    4040#include "types.h"
    4141#include "../time.h"
    42 #include <ipc/devmap.h>
    43 #include <task.h>
    44 
    45 typedef devmap_handle_t posix_dev_t;
    46 typedef task_id_t posix_pid_t;
    4742
    4843/* values are the same as on Linux */
     
    139134
    140135#ifndef LIBPOSIX_INTERNAL
    141         #define dev_t posix_dev_t
    142         #define pid_t posix_pid_t
    143136        #define fstat posix_fstat
    144137        #define lstat posix_lstat
  • uspace/lib/posix/sys/types.h

    r5c5117c rf3a605be  
    3838
    3939#include "../libc/sys/types.h"
     40#include <ipc/devmap.h>
     41#include <task.h>
    4042
     43typedef task_id_t posix_pid_t;
     44typedef devmap_handle_t posix_dev_t;
    4145typedef unsigned int posix_ino_t;
    4246typedef unsigned int posix_nlink_t;
     
    4852
    4953#ifndef LIBPOSIX_INTERNAL
    50         #define ino_t posix_ino_t
     54        #define pid_t posix_pid_t
     55        #define dev_t posix_dev_t
    5156        #define nlink_t posix_nlink_t
    5257        #define uid_t posix_uid_t
  • uspace/lib/posix/time.c

    r5c5117c rf3a605be  
    3636#define LIBPOSIX_INTERNAL
    3737
    38 #include "internal/common.h"
     38#include "common.h"
    3939#include "time.h"
    4040
  • uspace/lib/posix/unistd.c

    r5c5117c rf3a605be  
    3636#define LIBPOSIX_INTERNAL
    3737
    38 #include "internal/common.h"
     38#include "common.h"
    3939#include "unistd.h"
    40 
    41 /* Array of environment variable strings (NAME=VALUE). */
    42 char **environ = NULL;
    4340
    4441/**
  • uspace/lib/posix/unistd.h

    r5c5117c rf3a605be  
    4848extern int getopt(int, char * const [], const char *);
    4949
    50 /* Environmental Variables */
    51 extern char **posix_environ;
    52 
    5350/* Identifying Terminals */
    5451extern int posix_isatty(int fd);
     
    8885
    8986#ifndef LIBPOSIX_INTERNAL
    90         #define environ posix_environ
    91 
    9287        #define isatty posix_isatty
    9388
Note: See TracChangeset for help on using the changeset viewer.