home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 13,643 of 14,669   
   Rick Jones to Jorgen Grahn   
   Re: htonl()/ntohl() evaluation?   
   08 Oct 10 18:31:02   
   
   From: rick.jones2@hp.com   
      
   Jorgen Grahn  wrote:   
   > A brief question: are htonl(), ntohl() and friends allowed to   
   > evaluate their argument more than once (i.e. if they're implemented   
   > naively as macros?)   
      
   > The man pages I've seen are silent on the subject so one would   
   > assume they behave like normal functions -- but I've wasted a day   
   > debugging a problem caused by my (in-house) implementation   
   > evaluating the argument four times.   
      
   Not that I've ever seen any real chapter and verse on htonl/ntohl, my   
   gut is telling me I bet that sort of issue was never really   
   considered and so would be undefined.   
      
   rick jones   
   --   
   denial, anger, bargaining, depression, acceptance, rebirth...   
                                        where do you want to be today?   
   these opinions are mine, all mine; HP might not want them anyway... :)   
   feel free to post, OR email to rick.jones2 in hp.com  but NOT BOTH...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca