File:  [DVB] / dietlibc / libcompat / ftok.c
Revision 1.1: download - view: text, annotated - select for diffs
Sat Mar 15 02:36:42 2003 UTC (21 years, 3 months ago) by fefe
Branches: MAIN
CVS tags: branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, HEAD
add ctermid and ftok (now perl should compile)
add some more linker warnings (we sure are accumulating lots of junk)

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ipc.h>
#include <dietwarning.h>

key_t ftok(const char* path, int id) {
  struct stat s;
  if (stat(path,&s)) return -1;
  return (key_t) (id << 24 | (s.st_dev & 0xff) << 16 | (s.st_ino & 0xffff));
}

link_warning("ftok","ftok is obsolete _and_ repugnant junk, don't use!");

LinuxTV legacy CVS <linuxtv.org/cvs>