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

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