HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Version 1 and Version 2 of sys-devel/m4


Ignore:
Timestamp:
08/14/07 07:20:20 (8 years ago)
Author:
brecht
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sys-devel/m4

    v1 v2  
    22 
    33=== version 1.4.10 === 
     4 
     5||working||no|| 
     6||maintainer||brecht|| 
    47 
    58==== revision 1 ==== 
    … …  
    710BeOS lseek() doesn't detect pipes. m4 configure only provides a replacement lseek() for MinGW: 
    811http://www.nabble.com/lseek-always-include-windows.h--t3867842.html 
     12 
     13A BeOS-compatible replacement for lseek() is: 
     14{{{ 
     15#include <config.h> 
     16 
     17/* Specification.  */ 
     18#include <unistd.h> 
     19 
     20#include <stdlib.h> 
     21#include <sys/types.h> 
     22#include <sys/stat.h> 
     23#include <errno.h> 
     24 
     25#undef lseek 
     26 
     27off_t 
     28rpl_lseek (int fd, off_t offset, int whence) 
     29{ 
     30  int rc; 
     31  struct stat st; 
     32  if (fstat(fd, &st) < 0) 
     33    { 
     34      //fstat sets errno 
     35      return -1; 
     36    } 
     37  if (S_ISFIFO(st.st_mode)) 
     38    { 
     39      errno = ESPIPE; 
     40      return -1; 
     41    } 
     42  return lseek (fd, offset, whence);; 
     43} 
     44}}} 
     45 
     46This needs to be merged with in the m4/lseek.m4 script (I think). 
     47 
     48After replacing lseek with the above code, make check still reports 3 failed tests: 
     49 
     50{{{ 
     51ftell result is wrong after fseeko: 17. 
     52FAIL: test-fflush 
     53}}} 
     54  I'm not sure whether the problem is with fseeko or ftell. 
     55 
     56{{{ 
     57FAIL: test-ftello.sh 
     58}}} 
     59  ftell and ftello should return -1 for pipes. On BeOS, they don't. 
     60 
     61{{{ 
     62test-lseek.c:52: assertion failed 
     63Abort 
     64FAIL: test-lseek.sh 
     65}}} 
     66  Haven't investigated this yet. 

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/