home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4588 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  1.2 KB

  1. Path: sparky!uunet!spool.mu.edu!yale.edu!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Sun's XDR routines won't work on Sun machines ...
  5. Date: 9 Sep 1992 16:15:48 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 17
  8. Message-ID: <18l7vkINNfb3@early-bird.think.com>
  9. References: <WRU6L3V@mailgzrz.tu-berlin.de>
  10. NNTP-Posting-Host: telecaster.think.com
  11.  
  12. In article <WRU6L3V@mailgzrz.tu-berlin.de> mauriti@cs.tu-berlin.de (Frank Hartlep) writes:
  13. >        BufferSize += 50000;
  14. >        Buffer = malloc (BufferSize);
  15. >        Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
  16. >        sprintf (Buffer, ARCHIVED "%s", Description);
  17. >        xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);
  18.  
  19. Someone just pointed out in comp.sys.sun.<something> that Sun's
  20. implementation of the xdrmem_* functions require the buffer to be
  21. word-aligned, as they make use of the "coincidence" that the XDR
  22. representation of many data types matches the 68000/SPARC representation.
  23. This restriction isn't documented.
  24. -- 
  25. Barry Margolin
  26. System Manager, Thinking Machines Corp.
  27.  
  28. barmar@think.com          {uunet,harvard}!think!barmar
  29.