Hi,

At Thu, 31 Jan 2002 01:01:11 +0900,
nobu.nokada / softhome.net wrote:
> You may get SYS_lutime value with this.
> 
> $ {echo '#include <sys/syscall.h>';echo SYS_utime;}|gcc -E -|tail -1

Shell script to make system call module, needs GCC.

#!/bin/sh
: ${CC=gcc}

echo "# system call module for `uname -sr`"
echo "# made at `LANG=C date`"
echo 'module Syscall'
echo '  NR = {}'
{
  echo '#include <sys/syscall.h>'
  echo
  echo '#include <sys/syscall.h>' |
  $CC -dMM -E - |
  sed -n 's/#define SYS_\([^ ]*\).*/  NR[:\1]="SYS_\1"=SYS_\1; def \1(*args) syscall(SYS_\1, *args) end/p'
} |
$CC -E - |
sed -n 's/"\(SYS_[^ ]*\)"/\1/p' |
sort -t= +2n
echo 'end'

-- 
Nobu Nakada