Changeset 6cd10ac in mainline


Ignore:
Timestamp:
2012-08-21T12:07:58Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be1dcc26
Parents:
2ee05261
Message:

Bithenge: hide os.h from public include/

Location:
uspace
Files:
1 added
16 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/test.c

    r2ee05261 r6cd10ac  
    4545#include <bithenge/transform.h>
    4646#include <bithenge/tree.h>
     47#include <bithenge/os.h>
     48
     49#ifdef __HELENOS__
     50#include <str_error.h>
     51#else
     52#include <string.h>
     53#define str_error strerror
     54#endif
    4755
    4856int main(int argc, char *argv[])
  • uspace/lib/bithenge/Makefile.linux

    r2ee05261 r6cd10ac  
    5353ifdef FAILURE
    5454        CFLAGS += -DBITHENGE_FAILURE_ENABLE=1
    55         SOURCES += failure.c
     55        SOURCES += src/failure.c
    5656endif
    5757
  • uspace/lib/bithenge/include/bithenge/blob.h

    r2ee05261 r6cd10ac  
    3939
    4040#include <sys/types.h>
     41#include <errno.h>
    4142#include "tree.h"
    4243
  • uspace/lib/bithenge/include/bithenge/os.h

    r2ee05261 r6cd10ac  
    11/*
    22 * Copyright (c) 2012 Sean Bartell
     3 * Copyright (c) 2012 Vojtech Horky
    34 * All rights reserved.
    45 *
     
    3031#define BITHENGE_OS_H_
    3132
     33
    3234#ifdef __HELENOS__
    33 #include "helenos/os.h"
     35typedef int64_t bithenge_int_t;
     36#define BITHENGE_PRId PRId64
     37
    3438#else
    35 #include "linux/os.h"
    36 #endif
     39/* Assuming GNU/Linux system. */
    3740
    38 #ifdef BITHENGE_FAILURE_ENABLE
    39 #include "failure.h"
    40 #else
    41 static inline int bithenge_should_fail(void)
    42 {
    43         return 0;
    44 }
     41#include <inttypes.h>
     42#include <stdbool.h>
     43#define BITHENGE_PRId PRIdMAX
     44typedef intmax_t bithenge_int_t;
     45typedef uint64_t aoff64_t;
     46#define EOK 0
     47
    4548#endif
    4649
  • uspace/lib/bithenge/src/blob.c

    r2ee05261 r6cd10ac  
    3838#include <errno.h>
    3939#include <stdlib.h>
     40#include "common.h"
    4041#include <bithenge/blob.h>
    41 #include <bithenge/os.h>
    4242#include <bithenge/tree.h>
    4343
  • uspace/lib/bithenge/src/compound.c

    r2ee05261 r6cd10ac  
    3838#include <bithenge/compound.h>
    3939#include <bithenge/expression.h>
    40 #include <bithenge/os.h>
    4140#include <bithenge/transform.h>
    4241#include <bithenge/tree.h>
     42#include "common.h"
    4343
    4444
  • uspace/lib/bithenge/src/expression.c

    r2ee05261 r6cd10ac  
    3838#include <errno.h>
    3939#include <stdlib.h>
     40#include "common.h"
    4041#include <bithenge/blob.h>
    4142#include <bithenge/expression.h>
    42 #include <bithenge/os.h>
    4343#include <bithenge/transform.h>
    4444#include <bithenge/tree.h>
  • uspace/lib/bithenge/src/failure.c

    r2ee05261 r6cd10ac  
    4646#include <unistd.h>
    4747#define BITHENGE_FAILURE_DECLS_ONLY 1
    48 #include <bithenge/failure.h>
    49 #include "os.h"
     48#include "failure.h"
     49#include "common.h"
    5050
    5151/* This file raises fake errors from system calls, to test that Bithenge
  • uspace/lib/bithenge/src/failure.h

    r2ee05261 r6cd10ac  
    4545#include <sys/types.h>
    4646#include <unistd.h>
    47 #include "os.h"
    4847
    4948int bithenge_should_fail(void);
  • uspace/lib/bithenge/src/file.c

    r2ee05261 r6cd10ac  
    4444#include <sys/types.h>
    4545#include <unistd.h>
     46#include "common.h"
    4647#include <bithenge/blob.h>
    4748#include <bithenge/file.h>
    48 #include <bithenge/os.h>
    4949
    5050typedef struct {
  • uspace/lib/bithenge/src/helenos/common.h

    r2ee05261 r6cd10ac  
    2727 */
    2828
    29 #ifndef BITHENGE_HELENOS_OS_H_
    30 #define BITHENGE_HELENOS_OS_H_
     29#ifndef BITHENGE_HELENOS_COMMON_H_
     30#define BITHENGE_HELENOS_COMMON_H_
    3131
     32#include <bithenge/os.h>
    3233#include <bool.h>
    3334#include <byteorder.h>
     
    3738#include <mem.h>
    3839#include <stdlib.h>
     40#include <errno.h>
    3941#include <str.h>
    4042#include <str_error.h>
    4143
    42 typedef int64_t bithenge_int_t;
    4344#define BITHENGE_PRId PRId64
    4445
  • uspace/lib/bithenge/src/linux/common.h

    r2ee05261 r6cd10ac  
    2727 */
    2828
    29 #ifndef BITHENGE_LINUX_OS_H_
    30 #define BITHENGE_LINUX_OS_H_
     29#ifndef BITHENGE_LINUX_COMMON_H_
     30#define BITHENGE_LINUX_COMMON_H_
    3131
    3232#include <endian.h>
  • uspace/lib/bithenge/src/print.c

    r2ee05261 r6cd10ac  
    4343#include <bithenge/print.h>
    4444#include <bithenge/tree.h>
     45#include "common.h"
    4546
    4647typedef struct {
  • uspace/lib/bithenge/src/script.c

    r2ee05261 r6cd10ac  
    4040#include <bithenge/compound.h>
    4141#include <bithenge/expression.h>
    42 #include <bithenge/os.h>
    4342#include <bithenge/script.h>
    4443#include <bithenge/sequence.h>
    4544#include <bithenge/transform.h>
    4645#include <bithenge/tree.h>
     46#include "common.h"
    4747
    4848/** @cond internal */
  • uspace/lib/bithenge/src/sequence.c

    r2ee05261 r6cd10ac  
    3838#include <bithenge/blob.h>
    3939#include <bithenge/expression.h>
    40 #include <bithenge/os.h>
    4140#include <bithenge/sequence.h>
    4241#include <bithenge/tree.h>
     42#include "common.h"
    4343
    4444
  • uspace/lib/bithenge/src/source.c

    r2ee05261 r6cd10ac  
    4040#include <bithenge/file.h>
    4141#include <bithenge/source.h>
     42#include "common.h"
    4243
    4344#ifdef __HELENOS__
  • uspace/lib/bithenge/src/transform.c

    r2ee05261 r6cd10ac  
    4040#include <stdlib.h>
    4141#include <bithenge/blob.h>
    42 #include <bithenge/os.h>
    4342#include <bithenge/print.h>
    4443#include <bithenge/transform.h>
     44#include "common.h"
    4545
    4646
  • uspace/lib/bithenge/src/tree.c

    r2ee05261 r6cd10ac  
    3838#include <stdlib.h>
    3939#include <bithenge/blob.h>
    40 #include <bithenge/os.h>
    4140#include <bithenge/tree.h>
     41#include "common.h"
    4242
    4343static void blob_destroy(bithenge_node_t *base)
Note: See TracChangeset for help on using the changeset viewer.