Changeset 5d4e90f0 in mainline


Ignore:
Timestamp:
2007-09-27T12:35:36Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bcf23cf
Parents:
8c20b26
Message:

Header cleanup.
Move off_t, size_t and ssize_t into sys/types.h.
Get rid off the non-standard and dummy types.h.

Location:
uspace
Files:
1 deleted
51 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/tester.h

    r8c20b26 r5d4e90f0  
    3636#define TESTER_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <bool.h>
    4040#include <ipc/ipc.h>
  • uspace/lib/libc/arch/amd64/include/fibril.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_amd64_FIBRIL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040/* According to ABI the stack MUST be aligned on
  • uspace/lib/libc/arch/amd64/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned long long sysarg_t;
    39 typedef unsigned long size_t;
    40 typedef signed long ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef signed char int8_t;
  • uspace/lib/libc/arch/arm32/include/fibril.h

    r8c20b26 r5d4e90f0  
    3737#define LIBC_arm32_FIBRIL_H_
    3838
    39 #include <types.h>
     39#include <sys/types.h>
    4040#include <align.h>
    4141#include "thread.h"
  • uspace/lib/libc/arch/arm32/include/types.h

    r8c20b26 r5d4e90f0  
    3838
    3939typedef unsigned int sysarg_t;
    40 typedef unsigned int size_t;
    41 typedef signed int ssize_t;
    42 typedef ssize_t off_t;
    4340
    4441typedef char int8_t;
  • uspace/lib/libc/arch/ia32/include/fibril.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_ia32_FIBRIL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040/* According to ABI the stack MUST be aligned on
  • uspace/lib/libc/arch/ia32/include/stackarg.h

    r8c20b26 r5d4e90f0  
    4141#define LIBC_ia32_STACKARG_H_
    4242
    43 #include <types.h>
     43#include <sys/types.h>
    4444
    4545/* dont allow to define it second time in stdarg.h */
  • uspace/lib/libc/arch/ia32/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned int sysarg_t;
    39 typedef unsigned int size_t;
    40 typedef signed int ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef char int8_t;
  • uspace/lib/libc/arch/ia64/include/fibril.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_ia64_FIBRIL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <align.h>
    4040#include <libarch/stack.h>
  • uspace/lib/libc/arch/ia64/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned long long sysarg_t;
    39 typedef unsigned long size_t;
    40 typedef signed long ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef char int8_t;
  • uspace/lib/libc/arch/mips32/include/fibril.h

    r8c20b26 r5d4e90f0  
    3737#define LIBC_mips32_FIBRIL_H_
    3838
    39 #include <types.h>
     39#include <sys/types.h>
    4040
    4141/* We define our own context_set, because we need to set
  • uspace/lib/libc/arch/mips32/include/stackarg.h

    r8c20b26 r5d4e90f0  
    4040#define __VARARGS_DEFINED
    4141
    42 #include <types.h>
     42#include <sys/types.h>
    4343
    4444/**
  • uspace/lib/libc/arch/mips32/include/types.h

    r8c20b26 r5d4e90f0  
    3838
    3939typedef unsigned int sysarg_t;
    40 typedef unsigned int size_t;
    41 typedef signed int ssize_t;
    42 typedef ssize_t off_t;
    4340
    4441typedef char int8_t;
  • uspace/lib/libc/arch/ppc32/include/fibril.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_ppc32_FIBRIL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040/* We define our own context_set, because we need to set
  • uspace/lib/libc/arch/ppc32/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned int sysarg_t;
    39 typedef unsigned int size_t;
    40 typedef signed int ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef char int8_t;
  • uspace/lib/libc/arch/ppc64/include/fibril.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_ppc64_FIBRIL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040/* We define our own context_set, because we need to set
  • uspace/lib/libc/arch/ppc64/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned long sysarg_t;
    39 typedef unsigned long size_t;
    40 typedef signed long ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef char int8_t;
  • uspace/lib/libc/arch/sparc64/include/atomic.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_sparc64_ATOMIC_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040/** Atomic add operation.
  • uspace/lib/libc/arch/sparc64/include/fibril.h

    r8c20b26 r5d4e90f0  
    3737
    3838#include <libarch/stack.h>
    39 #include <types.h>
     39#include <sys/types.h>
    4040#include <align.h>
    4141
  • uspace/lib/libc/arch/sparc64/include/syscall.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_sparc64_SYSCALL_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <kernel/syscall/syscall.h>
    4040
  • uspace/lib/libc/arch/sparc64/include/types.h

    r8c20b26 r5d4e90f0  
    3737
    3838typedef unsigned long sysarg_t;
    39 typedef unsigned long size_t;
    40 typedef signed long ssize_t;
    41 typedef ssize_t off_t;
    4239
    4340typedef signed char int8_t;
  • uspace/lib/libc/generic/as.c

    r8c20b26 r5d4e90f0  
    3737#include <unistd.h>
    3838#include <align.h>
    39 #include <types.h>
     39#include <sys/types.h>
    4040#include <bitops.h>
    4141
  • uspace/lib/libc/generic/futex.c

    r8c20b26 r5d4e90f0  
    3737#include <libc.h>
    3838#include <stdio.h>
    39 #include <types.h>
     39#include <sys/types.h>
    4040#include <kernel/synch/synch.h>
    4141
  • uspace/lib/libc/generic/io/stream.c

    r8c20b26 r5d4e90f0  
    4646#include <unistd.h>
    4747#include <async.h>
     48#include <sys/types.h>
    4849
    4950#define FDS 32
  • uspace/lib/libc/generic/mman.c

    r8c20b26 r5d4e90f0  
    3434
    3535#include <sys/mman.h>
     36#include <sys/types.h>
    3637#include <as.h>
    3738#include <unistd.h>
  • uspace/lib/libc/generic/string.c

    r8c20b26 r5d4e90f0  
    3838#include <limits.h>
    3939#include <align.h>
     40#include <sys/types.h>
    4041
    4142
  • uspace/lib/libc/include/as.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_AS_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <task.h>
    4040#include <kernel/mm/as.h>
  • uspace/lib/libc/include/async.h

    r8c20b26 r5d4e90f0  
    5656
    5757aid_t async_send_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
    58                    ipc_call_t *dataptr);
     58    ipc_call_t *dataptr);
    5959aid_t async_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
    60                    ipcarg_t arg3, ipc_call_t *dataptr);
     60    ipcarg_t arg3, ipc_call_t *dataptr);
    6161void async_wait_for(aid_t amsgid, ipcarg_t *result);
    6262int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout);
     
    6868 * @return Return code of message
    6969 */
    70 static inline ipcarg_t async_req_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2)
     70static inline ipcarg_t async_req_2(int phoneid, ipcarg_t method, ipcarg_t arg1,
     71    ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2)
    7172{
    7273        ipc_call_t result;
     
    8182        return rc;
    8283}
    83 #define async_req(phoneid, method, arg1, r1) async_req_2(phoneid, method, arg1, 0, r1, 0)
     84#define async_req(phoneid, method, arg1, r1) \
     85    async_req_2(phoneid, method, arg1, 0, r1, 0)
    8486
    8587static inline ipcarg_t async_req_3(int phoneid, ipcarg_t method, ipcarg_t arg1,
    86                                    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1,
    87                                    ipcarg_t *r2, ipcarg_t *r3)
     88    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1, ipcarg_t *r2, ipcarg_t *r3)
    8889{
    8990        ipc_call_t result;
     
    114115/* Primitve functions for IPC communication */
    115116void async_msg_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
    116                 ipcarg_t arg3);
     117    ipcarg_t arg3);
    117118void async_msg_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2);
    118119#define async_msg(ph, m, a1) async_msg_2(ph, m, a1, 0)
  • uspace/lib/libc/include/bitops.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_BITOPS_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040
  • uspace/lib/libc/include/futex.h

    r8c20b26 r5d4e90f0  
    3737
    3838#include <atomic.h>
    39 #include <types.h>
     39#include <sys/types.h>
    4040
    4141#define FUTEX_INITIALIZER     {1}
  • uspace/lib/libc/include/io/io.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_IO_H_
    3737
    38 #include <libarch/types.h>
     38#include <sys/types.h>
    3939
    4040int putnchars(const char * buf, size_t count);
  • uspace/lib/libc/include/io/printf_core.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_PRINTF_CORE_H_
    3737
    38 #include <libarch/types.h>
     38#include <sys/types.h>
    3939#include <stdarg.h>
    4040
  • uspace/lib/libc/include/ipc/ipc.h

    r8c20b26 r5d4e90f0  
    3939#include <kernel/ddi/irq.h>
    4040#include <libc.h>
    41 #include <types.h>
     41#include <sys/types.h>
    4242#include <kernel/synch/synch.h>
    4343
  • uspace/lib/libc/include/libc.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_LIBC_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <kernel/syscall/syscall.h>
    4040#include <libarch/syscall.h>
  • uspace/lib/libc/include/stdarg.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_STDARG_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <libarch/stackarg.h>
    4040
  • uspace/lib/libc/include/stddef.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_STDDEF_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040#endif
  • uspace/lib/libc/include/stdint.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_STDINT_H_
    3737
    38 /* Definitions of types with fixed size*/
    39 #include <types.h>
     38/* Definitions of types with fixed size */
     39#include <libarch/types.h>
    4040
    4141#define MAX_INT8 (0x7F)
  • uspace/lib/libc/include/stdio.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_STDIO_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <stdarg.h>
    4040
  • uspace/lib/libc/include/string.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_STRING_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040#define bzero(ptr, len) memset((ptr), 0, (len))
  • uspace/lib/libc/include/sys/mman.h

    r8c20b26 r5d4e90f0  
    3737
    3838#include <as.h>
     39#include <sys/types.h>
    3940
    4041#define MAP_FAILED  ((void *) -1)
     
    4950#define PROTO_EXEC   AS_AREA_EXEC
    5051
    51 extern void  *mmap(void  *start, size_t length, int prot, int flags, int fd,
    52                    off_t offset);
     52extern void *mmap(void  *start, size_t length, int prot, int flags, int fd,
     53    off_t offset);
    5354extern int munmap(void *start, size_t length);
    5455
  • uspace/lib/libc/include/sys/time.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_TIME_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040#define DST_NONE 0
  • uspace/lib/libc/include/sys/types.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_SYS_TYPES_H_
    3737
    38 #include <types.h>
     38#include <libarch/types.h>
     39
     40typedef unsigned long size_t;
     41typedef signed long ssize_t;
     42typedef long off_t;
    3943
    4044#endif
  • uspace/lib/libc/include/syscall.h

    r8c20b26 r5d4e90f0  
    3838#define LIBC_SYSCALL_H_
    3939
    40 #include <types.h>
     40#include <sys/types.h>
    4141#include <kernel/syscall/syscall.h>
    4242
  • uspace/lib/libc/include/task.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_TASK_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939
    4040typedef uint64_t task_id_t;
  • uspace/lib/libc/include/thread.h

    r8c20b26 r5d4e90f0  
    3838#include <kernel/proc/uarg.h>
    3939#include <libarch/thread.h>
    40 #include <types.h>
     40#include <sys/types.h>
    4141
    4242typedef uint64_t thread_id_t;
  • uspace/lib/libc/include/unistd.h

    r8c20b26 r5d4e90f0  
    3636#define LIBC_UNISTD_H_
    3737
    38 #include <types.h>
     38#include <sys/types.h>
    3939#include <libarch/config.h>
    4040
  • uspace/srv/fb/ppm.c

    r8c20b26 r5d4e90f0  
    2727 */
    2828
    29 #include <types.h>
     29#include <sys/types.h>
    3030#include <errno.h>
    3131
     
    3535{
    3636retry:
    37         while (**data == ' ' || **data == '\t' || **data == '\n' || **data == '\r')
     37        while (**data == ' ' || **data == '\t' || **data == '\n' ||
     38            **data == '\r')
    3839                (*data)++;
    3940        if (**data == '#') {
     
    5758}
    5859
    59 int ppm_get_data(unsigned char *data, size_t dtsz, unsigned int *width, unsigned int *height)
     60int ppm_get_data(unsigned char *data, size_t dtsz, unsigned int *width,
     61    unsigned int *height)
    6062{
    6163        /* Read magic */
     
    8284 * @param putpixel Putpixel function used to print bitmap
    8385 */
    84 int ppm_draw(unsigned char *data, size_t datasz, unsigned int sx,
    85              unsigned int sy,
    86              unsigned int maxwidth, unsigned int maxheight,
    87              putpixel_cb_t putpixel, void *vport)
     86int ppm_draw(unsigned char *data, size_t datasz, unsigned int sx,
     87    unsigned int sy, unsigned int maxwidth, unsigned int maxheight,
     88    putpixel_cb_t putpixel, void *vport)
    8889{
    8990        unsigned int width, height;
     
    106107        data++;
    107108
    108         if (maxcolor == 0 || maxcolor > 255 || width*height > datasz) {
     109        if (maxcolor == 0 || maxcolor > 255 || width * height > datasz) {
    109110                return EINVAL;
    110111        }
    111         coef = 255/maxcolor;
    112         if (coef*maxcolor > 255)
     112        coef = 255 / maxcolor;
     113        if (coef * maxcolor > 255)
    113114                coef -= 1;
    114115       
    115         for (i=0; i < width*height; i++) {
     116        for (i = 0; i < width * height; i++) {
    116117                /* Crop picture if we don't fit into region */
    117                 if (i % width > maxwidth || i/width > maxheight) {
     118                if (i % width > maxwidth || i / width > maxheight) {
    118119                        data += 3;
    119120                        continue;
    120121                }
    121                 color = ((data[0]*coef) << 16) + ((data[1]*coef) << 8) + data[2]*coef;
     122                color = ((data[0] * coef) << 16) + ((data[1] * coef) << 8) +
     123                    data[2] * coef;
    122124               
    123                 (*putpixel)(vport, sx+(i % width), sy+(i / width), color);
     125                (*putpixel)(vport, sx + (i % width), sy + (i / width), color);
    124126                data += 3;
    125127        }
  • uspace/srv/fb/ppm.h

    r8c20b26 r5d4e90f0  
    3131
    3232#include "fb.h"
     33#include <sys/types.h>
    3334
    3435extern int ppm_draw(unsigned char *, size_t, unsigned int, unsigned int,
  • uspace/srv/kbd/arch/sparc64/src/kbd.c

    r8c20b26 r5d4e90f0  
    4141#include <keys.h>
    4242#include <stdio.h>
    43 #include <types.h>
     43#include <sys/types.h>
    4444#include <genarch/kbd.h>
    4545
  • uspace/srv/kbd/include/key_buffer.h

    r8c20b26 r5d4e90f0  
    3838#define __KEY_BUFFER_H__
    3939
    40 #include <types.h>
     40#include <sys/types.h>
    4141
    4242/** Size of buffer for pressed keys */
  • uspace/srv/pci/libpci/types.h

    r8c20b26 r5d4e90f0  
    99 */
    1010
    11 #include <types.h>
     11#include <sys/types.h>
    1212
    1313#ifndef PCI_HAVE_Uxx_TYPES
Note: See TracChangeset for help on using the changeset viewer.