1#!/bin/sh - 2# 3# $Id: chk.offt,v 12.4 2008/05/07 12:40:56 bschmeck Exp $ 4# 5# Make sure that no off_t's have snuck into the release. 6 7d=../.. 8 9[ -f $d/LICENSE ] || { 10 echo 'FAIL: cannot find source distribution directory.' 11 exit 1 12} 13 14t=__1 15 16egrep -w off_t $d/*/*.[ch] $d/*/*.in | 17sed -e "/#undef off_t/d" \ 18 -e "/build_brew\//d" \ 19 -e "/build_wince\//d" \ 20 -e "/build_windows\//d" \ 21 -e "/db_env_set_func_ftruncate/d" \ 22 -e "/db_env_set_func_pread/d" \ 23 -e "/db_env_set_func_pwrite/d" \ 24 -e "/db_env_set_func_seek/d" \ 25 -e "/env_register.c/d" \ 26 -e "/j_ftruncate/d" \ 27 -e "/j_pread/d" \ 28 -e "/j_pwrite/d" \ 29 -e "/j_seek/d" \ 30 -e "/mp_fopen.c:.*can't use off_t's here/d" \ 31 -e "/mp_fopen.c:.*size or type off_t's or/d" \ 32 -e "/mp_fopen.c:.*where an off_t is 32-bits/d" \ 33 -e "/mutex\/tm.c:/d" \ 34 -e "/off_t because its size depends on/d" \ 35 -e "/os_ext.h/d" \ 36 -e "/os_flock.c/d" \ 37 -e "/zerofill.c:.*stat_offset/d" \ 38 -e "/zerofill.c:.*write_offset/d" \ 39 -e "/os_map.c:.*(off_t)0))/d" \ 40 -e "/os_method.c/d" \ 41 -e "/os_rw.c:/d" \ 42 -e "/os_seek.c:.*off_t offset;/d" \ 43 -e "/os_seek.c:.*offset = /d" \ 44 -e "/os_truncate.c:.*off_t offset;/d" \ 45 -e "/os_truncate.c:.*off_t stat_offset;/d" \ 46 -e "/os_truncate.c:.*offset = /d" \ 47 -e "/test_perf\/perf_misc.c:/d" \ 48 -e "/test_server\/dbs.c:/d" \ 49 -e "/test_vxworks\/vx_mutex.c:/d" > $t 50 51test -s $t && { 52 cat $t 53 echo "FAIL: found questionable off_t usage" 54 exit 1 55} 56 57exit 0 58