Cleaned up includes.

This commit is contained in:
Armin Novak 2017-04-19 08:27:22 +02:00
parent 8fa6020b5f
commit 73e89bffcc
3 changed files with 5 additions and 27 deletions

View File

@ -29,20 +29,11 @@
#include "config.h"
#endif
#ifndef _WIN32
#define __USE_LARGEFILE64
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#include <sys/time.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include <winpr/wtypes.h>
#include <winpr/crt.h>
@ -54,18 +45,12 @@
#include "drive_file.h"
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4244)
#endif
#ifdef WITH_DEBUG_RDPDR
#define DEBUG_WSTR(msg, wstr) do { LPSTR lpstr; ConvertFromUnicode(CP_UTF8, 0, wstr, -1, &lpstr, 0, NULL, NULL); WLog_DBG(TAG, msg, lpstr); free(lpstr); } while (0)
#else
#define DEBUG_WSTR(msg, wstr) do { } while (0)
#endif
static void drive_file_fix_path(WCHAR* path)
{
int i;
@ -630,7 +615,8 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
if (file->file_handle == INVALID_HANDLE_VALUE)
{
WLog_ERR(TAG, "Unable to truncate %s to %"PRId64" (%"PRId32")", file->fullpath, size, GetLastError());
WLog_ERR(TAG, "Unable to truncate %s to %"PRId64" (%"PRId32")", file->fullpath, size,
GetLastError());
return FALSE;
}

View File

@ -26,8 +26,7 @@
#ifndef FREERDP_CHANNEL_DRIVE_FILE_H
#define FREERDP_CHANNEL_DRIVE_FILE_H
#include <sys/types.h>
#include <sys/stat.h>
#include <winpr/stream.h>
#include <freerdp/channels/log.h>
#define TAG CHANNELS_TAG("drive.client")

View File

@ -25,14 +25,6 @@
#include "config.h"
#endif
#ifndef _WIN32
#define __USE_LARGEFILE64
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#include <sys/time.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@ -423,6 +415,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive,
switch (FsInformationClass)
{
case FileFsVolumeInformation:
/* http://msdn.microsoft.com/en-us/library/cc232108.aspx */
if ((length = ConvertToUnicode(sys_code_page, 0, volumeLabel, -1, &outStr, 0) * 2) <= 0)
{
@ -467,6 +460,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive,
break;
case FileFsAttributeInformation:
/* http://msdn.microsoft.com/en-us/library/cc232101.aspx */
if ((length = ConvertToUnicode(sys_code_page, 0, diskType, -1, &outStr, 0) * 2) <= 0)
{
@ -564,7 +558,6 @@ static UINT drive_process_irp_query_directory(DRIVE_DEVICE* drive, IRP* irp)
Stream_Read_UINT8(irp->input, InitialQuery);
Stream_Read_UINT32(irp->input, PathLength);
Stream_Seek(irp->input, 23); /* Padding */
path = (WCHAR*) Stream_Pointer(irp->input);
file = drive_get_file_by_id(drive, irp->FileId);