Changeset 052f535 in mainline


Ignore:
Timestamp:
2010-11-26T13:22:37Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d47279b
Parents:
273b958
Message:

use portable constant macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/macros.h

    r273b958 r052f535  
    104104#define STRING_ARG(arg)  #arg
    105105
    106 #define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
    107 #define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
     106#define LOWER32(arg)  (((uint64_t) (arg)) & UINT32_C(0xffffffff))
     107#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & UINT32_C(0xffffffff))
    108108
    109109#define MERGE_LOUP32(lo, up) \
    110         ((((uint64_t) (lo)) & 0xffffffff) \
    111             | ((((uint64_t) (up)) & 0xffffffff) << 32))
     110        ((((uint64_t) (lo)) & UINT32_C(0xffffffff)) \
     111            | ((((uint64_t) (up)) & UINT32_C(0xffffffff)) << 32))
    112112
    113113/** Pseudorandom generator
Note: See TracChangeset for help on using the changeset viewer.