[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Byte order conversions
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-10-27 13:32:31
Message-ID: 200410271032.31747.thiago.macieira () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Szombathelyi György wrote:
>> htons, htonl, ntohs, ntohl should do the big-endian to machine-endian
>> stuff.
>
>Then why these functions are not used? Is there any portabiliy issues?

I could guess that the reasons are:

1) people don't know they exist

2) people don't want to
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
just to have them
(unlike glibc on Linux, some systems out there require that you include the 
dependencies yourself)

3) people require little-endian to host-endian conversions

Aside from that, they are mandated to exist by sockets, so I don't believe 
there are portability issues.
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic