/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/***********************************************************
* Function File: telldir.dl
* Purpose: POSIX function for handling directory
* History: created by Harry H. Cheng, 4/1/1997
**********************************************************/
#include <dirent.h>
long telldir(DIR *dirp) {
  void *fptr;
  long retval;

  fptr = dlsym(_ChDirent_handle, "telldir_chdl");
  if(fptr == NULL)  {
     printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
     return -1;
  }
  dlrunfun(fptr, &retval, telldir, dirp);
  return retval;
}
