Changeset 95c675b in mainline for uspace/lib/posix/source/dlfcn.c


Ignore:
Timestamp:
2017-10-17T13:11:35Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60af4cdb
Parents:
dbf32b1 (diff), a416d070 (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 mainline

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/dlfcn.c

    rdbf32b1 r95c675b  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2017 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup genericddi
     29/** @addtogroup libposix
    3030 * @{
    3131 */
    32 /**
    33  * @file
    34  * @brief Device numbers.
    35  */
    3632
    37 #include <typedefs.h>
    38 #include <ddi/device.h>
    39 #include <atomic.h>
    40 #include <debug.h>
     33#define LIBPOSIX_INTERNAL
     34#define __POSIX_DEF__(x) posix_##x
    4135
    42 static atomic_t last;
     36#include "internal/common.h"
     37#include "posix/dlfcn.h"
    4338
    44 /** Assign new device number.
    45  *
    46  * @return Unique device number.
    47  */
    48 devno_t device_assign_devno(void)
     39#include "libc/dlfcn.h"
     40
     41void *posix_dlopen(const char *filename, int flags)
    4942{
    50         devno_t devno = (devno_t) atomic_postinc(&last);
    51         ASSERT(devno >= 0);
     43        if (flags != 0) {
     44                fprintf(stderr, "dlopen() not implemented with non-zero flags (%s:%d), something will NOT work.\n", __FILE__, __LINE__);
     45        }
    5246       
    53         return devno;
     47        return dlopen(filename, 0);
    5448}
    5549
    56 sysarg_t sys_device_assign_devno(void)
     50void *posix_dlsym(void *handle, const char *symbol)
    5751{
    58         return (sysarg_t) device_assign_devno();
     52        return dlsym(handle, symbol);
     53}
     54
     55int posix_dlclose(void *handle)
     56{
     57        not_implemented();
     58        return 0;
     59}
     60
     61char *posix_dlerror(void)
     62{
     63        not_implemented();
     64        return (char *)"dlerror()";
    5965}
    6066
Note: See TracChangeset for help on using the changeset viewer.