From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2079 invoked by alias); 16 Jan 2014 13:14:29 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 1987 invoked by uid 48); 16 Jan 2014 13:14:24 -0000 From: "neleai at seznam dot cz" To: glibc-bugs@sourceware.org Subject: [Bug libc/16458] endian.h macros return integers of wrong type Date: Thu, 16 Jan 2014 13:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.17 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: neleai at seznam dot cz X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg00247.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16458 Ondrej Bilka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |neleai at seznam dot cz Resolution|--- |INVALID --- Comment #1 from Ondrej Bilka --- This is documented behaviour. Manpage has following prototype: SYNOPSIS #define _BSD_SOURCE /* See feature_test_macros(7) */ #include uint16_t htobe16(uint16_t host_16bits); uint16_t htole16(uint16_t host_16bits); uint16_t be16toh(uint16_t big_endian_16bits); uint16_t le16toh(uint16_t little_endian_16bits); uint32_t htobe32(uint32_t host_32bits); uint32_t htole32(uint32_t host_32bits); uint32_t be32toh(uint32_t big_endian_32bits); uint32_t le32toh(uint32_t little_endian_32bits); uint64_t htobe64(uint64_t host_64bits); uint64_t htole64(uint64_t host_64bits); uint64_t be64toh(uint64_t big_endian_64bits); uint64_t le64toh(uint64_t little_endian_64bits); So you need to use uint64_t as type of i. -- You are receiving this mail because: You are on the CC list for the bug.