/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <wchar.h>

int fwide(FILE *stream, int c) {
    void *fptr;
    int retval;
    
#if defined(_WIN32_)
    dlrunfun(_Ch_fwide, &retval, fwide, stream, c);
#else
    fptr = dlsym(_ChWchar_handle, "fwide_chdl");
    if(fptr == NULL) { 
        printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
        return 0;
    }
    dlrunfun(fptr, &retval, fwide, stream, c);
#endif
    return retval;
}
