Changeset 7f9df7b9 in mainline for uspace/lib/posix/src/sys


Ignore:
Timestamp:
2018-01-22T22:42:57Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a08c70
Parents:
e0f47f5
Message:

Remove unnecessary symbol renaming from libposix.

Location:
uspace/lib/posix/src/sys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/src/sys/mman.c

    re0f47f5 r7f9df7b9  
    3333 */
    3434
    35 #define LIBPOSIX_INTERNAL
    36 #define __POSIX_DEF__(x) posix_##x
    37 
    3835#include "../internal/common.h"
    3936#include <posix/sys/mman.h>
     
    4239#include <posix/unistd.h>
    4340
    44 void *posix_mmap(void *start, size_t length, int prot, int flags, int fd,
    45     __POSIX_DEF__(off_t) offset)
     41void *mmap(void *start, size_t length, int prot, int flags, int fd,
     42    off_t offset)
    4643{
    4744        if (!start)
     
    5754}
    5855
    59 int posix_munmap(void *start, size_t length)
     56int munmap(void *start, size_t length)
    6057{
    6158        int rc = as_area_destroy(start);
  • uspace/lib/posix/src/sys/stat.c

    re0f47f5 r7f9df7b9  
    3434 */
    3535
    36 #define LIBPOSIX_INTERNAL
    37 #define __POSIX_DEF__(x) posix_##x
    38 
    3936#include "../internal/common.h"
    4037#include "posix/sys/stat.h"
     
    5249 * @return 0 on success, -1 on error.
    5350 */
    54 static int stat_to_posix(struct posix_stat *dest, vfs_stat_t *src)
     51static int stat_to_posix(struct stat *dest, vfs_stat_t *src)
    5552{
    56         memset(dest, 0, sizeof(struct posix_stat));
     53        memset(dest, 0, sizeof(struct stat));
    5754       
    5855        dest->st_dev = src->service;
     
    8683 * @return Zero on success, -1 otherwise.
    8784 */
    88 int posix_fstat(int fd, struct posix_stat *st)
     85int fstat(int fd, struct stat *st)
    8986{
    9087        vfs_stat_t hst;
     
    10198 * @return Zero on success, -1 otherwise.
    10299 */
    103 int posix_lstat(const char *restrict path, struct posix_stat *restrict st)
     100int lstat(const char *restrict path, struct stat *restrict st)
    104101{
    105102        /* There are currently no symbolic links in HelenOS. */
    106         return posix_stat(path, st);
     103        return stat(path, st);
    107104}
    108105
     
    114111 * @return Zero on success, -1 otherwise.
    115112 */
    116 int posix_stat(const char *restrict path, struct posix_stat *restrict st)
     113int stat(const char *restrict path, struct stat *restrict st)
    117114{
    118115        vfs_stat_t hst;
     
    129126 * @return Zero on success, -1 otherwise.
    130127 */
    131 int posix_chmod(const char *path, posix_mode_t mode)
     128int chmod(const char *path, mode_t mode)
    132129{
    133130        /* HelenOS doesn't support permissions, return success. */
     
    142139 * @return Previous file mode creation mask.
    143140 */
    144 posix_mode_t posix_umask(posix_mode_t mask)
     141mode_t umask(mode_t mask)
    145142{
    146143        /* HelenOS doesn't support permissions, return empty mask. */
     
    155152 * @return Zero on success, -1 otherwise.
    156153 */
    157 int posix_mkdir(const char *path, posix_mode_t mode)
     154int mkdir(const char *path, mode_t mode)
    158155{
    159156        if (failed(vfs_link_path(path, KIND_DIRECTORY, NULL)))
  • uspace/lib/posix/src/sys/wait.c

    re0f47f5 r7f9df7b9  
    3333/** @file Support for waiting.
    3434 */
    35 
    36 #define LIBPOSIX_INTERNAL
    37 #define __POSIX_DEF__(x) posix_##x
    3835
    3936#include "../internal/common.h"
     
    7673 *     -1 on signal interrupt, (pid_t)-1 otherwise.
    7774 */
    78 posix_pid_t posix_wait(int *stat_ptr)
     75pid_t wait(int *stat_ptr)
    7976{
    8077        /* HelenOS does not support this. */
    8178        errno = ENOSYS;
    82         return (posix_pid_t) -1;
     79        return (pid_t) -1;
    8380}
    8481
     
    9491 *     no child process whose status can be reported, (pid_t)-1 otherwise.
    9592 */
    96 posix_pid_t posix_waitpid(posix_pid_t pid, int *stat_ptr, int options)
     93pid_t waitpid(pid_t pid, int *stat_ptr, int options)
    9794{
    9895        assert(stat_ptr != NULL);
     
    104101        if (failed(task_wait_task_id((task_id_t) pid, &texit, &retval))) {
    105102                /* Unable to retrieve status. */
    106                 return (posix_pid_t) -1;
     103                return (pid_t) -1;
    107104        }
    108105       
Note: See TracChangeset for help on using the changeset viewer.