X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.cpp;h=8579103e96c9edf29f3889c3f8dfe9afdb4e7237;hb=b443df39386c77cf2d027e2b45c4d629261e0100;hp=fc739f9bd17916ecb8c083d097efa3dec461094d;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index fc739f9bd..8579103e9 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -30,45 +30,6 @@ #include #include -CoreExport DIR * opendir(const char * path) -{ - std::string search_path = std::string(path) + "\\*.*"; - WIN32_FIND_DATAA fd; - HANDLE f = FindFirstFileA(search_path.c_str(), &fd); - if (f != INVALID_HANDLE_VALUE) - { - DIR * d = new DIR; - memcpy(&d->find_data, &fd, sizeof(WIN32_FIND_DATA)); - d->find_handle = f; - d->first = true; - return d; - } - else - { - return 0; - } -} - -CoreExport dirent * readdir(DIR * handle) -{ - if (handle->first) - handle->first = false; - else - { - if (!FindNextFileA(handle->find_handle, &handle->find_data)) - return 0; - } - - strncpy(handle->dirent_pointer.d_name, handle->find_data.cFileName, MAX_PATH); - return &handle->dirent_pointer; -} - -CoreExport void closedir(DIR * handle) -{ - FindClose(handle->find_handle); - delete handle; -} - int optind = 1; char optarg[514]; int getopt_long(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind)