Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/internal/common.h

    r0328987 ra3da2b2  
    3939#include <stdlib.h>
    4040
    41 #define not_implemented() do { \
    42                 static int __not_implemented_counter = 0; \
    43                 if (__not_implemented_counter == 0) { \
    44                         fprintf(stderr, "%s() not implemented in %s:%d, something will NOT work.\n", \
    45                                 __func__, __FILE__, __LINE__); \
    46                 } \
    47                 __not_implemented_counter++; \
    48         } while (0)
     41#define not_implemented() (fprintf(stderr, \
     42    "Function %s() in file %s at line %d is not implemented\n", \
     43    __func__, __FILE__, __LINE__), abort())
    4944
    50 /* Convert negative errno to positive errno */
    51 #define negerrno(func, ...) ({ \
     45/* A little helper macro to avoid typing this over and over. */
     46#define errnify(func, ...) ({ \
    5247        int rc = func(__VA_ARGS__); \
    5348        if (rc < 0) { \
    54                 errno = -errno; \
     49                errno = -rc; \
     50                rc = -1; \
    5551        } \
    5652        rc; \
Note: See TracChangeset for help on using the changeset viewer.