From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9632242F8D for ; Mon, 16 May 2022 21:23:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D8EA68B457; Tue, 17 May 2022 00:23:35 +0300 (EEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 535C468B423 for ; Tue, 17 May 2022 00:23:28 +0300 (EEST) Received: by mail-pj1-f54.google.com with SMTP id w17-20020a17090a529100b001db302efed6so526965pjh.4 for ; Mon, 16 May 2022 14:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:in-reply-to:references:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=0gVA2fKvCnahMCkE6ckhkQ1B2TquPH11Uf6lOPzeTB4=; b=ekIaH6jY6hUZ7lmEgpWM+KLpDWr3tq5drPkxRI88u8FFEDhjcNYyr5GH5pxJ80G09g W5J9ABAgpGhquBBY7UkvEbTACOKTvW55CCyxzG8p8TxeTg6D0XSamTIDPci/iD5MXEq5 rqSsyd/BEN8v6H05uzXNhq23OwlNXATv0EnPU/jVlAUrs1U3tN9VqK/EAK+JJ7qWtJYX +EUb0gW8kbH6IThohl1JUBwDzHHa1Go3YV/b46iVgwxysJlSxNYRRfZoZ8izCHYQYRBS UJ814wjJN2u1cGovTDW9G77ZxF3b61xMeoSrLfE/vcKqJgZNIvmDwouub8JIX0EIcczG ECzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:in-reply-to:references:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=0gVA2fKvCnahMCkE6ckhkQ1B2TquPH11Uf6lOPzeTB4=; b=BrugvQk3Cfu5rS8WJNSBVHbgxLPuIBYe9aoJfArpXr0aha3JFz2PQYimjaXbVlmGjD hA5UZ7Xks3Wo37qu0e85/tO/bLPpd/onI6xLWvbtCX0f0bpphSmxxYiVZwBpFznYdQoF GhhsXS+PR6sU8jx9U91pjHyP3Sv1YK1ngRTvoH0wVZegnoSEPUyUphHozLpqmMaBK5R/ i5L+2vZrAc6RLTDZ8kV390Jhjf1vKslIjyB7o6PedyhDWOUKxOj7whzVNlKSa/yGRnXY M+bkV/nNlDWXAaeVDUP5Ph7yyYtZ3cxlTv2utWy4kJMxty8gP52Hv1IjBnBQkY3uOgT2 CMsQ== X-Gm-Message-State: AOAM530jxBIh45pQJT7Wdk4KggCZuTLCQEQsZrD1KnloiR7Ve2Jfoovl AGahJ6GhIWd56Ny9t+Xek1VXRv8LJ41qxA== X-Google-Smtp-Source: ABdhPJyWs/D78r/X0Hlk3wA7RDBB46/Rzxy7dCBcyEmYxZplFBgeAlPSU5rxR5bR9eSdf/xCDoyuLA== X-Received: by 2002:a17:903:1d1:b0:15e:9607:d4c9 with SMTP id e17-20020a17090301d100b0015e9607d4c9mr19508243plh.41.1652736206805; Mon, 16 May 2022 14:23:26 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id z8-20020a170902ccc800b0015ee24acf38sm7467528ple.212.2022.05.16.14.23.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 May 2022 14:23:26 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Mon, 16 May 2022 21:23:23 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 2/2] avformat/os_support: Support long file names on Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz Signed-off-by: softworkz --- libavformat/os_support.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 5e6b32d2dc..bd8c89568f 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -49,7 +49,23 @@ # ifdef stat # undef stat # endif -# define stat _stati64 +# define stat win32_stat + + struct win32_stat + { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; + # ifdef fstat # undef fstat # endif @@ -153,7 +169,7 @@ static inline int win32_##name(const char *filename_utf8) \ wchar_t *filename_w; \ int ret; \ \ - if (utf8towchar(filename_utf8, &filename_w)) \ + if (get_extended_win32_path(filename_utf8, &filename_w)) \ return -1; \ if (!filename_w) \ goto fallback; \ @@ -177,7 +193,7 @@ static inline int win32_##name(const char *filename_utf8, partype par) \ wchar_t *filename_w; \ int ret; \ \ - if (utf8towchar(filename_utf8, &filename_w)) \ + if (get_extended_win32_path(filename_utf8, &filename_w)) \ return -1; \ if (!filename_w) \ goto fallback; \ @@ -199,9 +215,9 @@ static inline int win32_rename(const char *src_utf8, const char *dest_utf8) wchar_t *src_w, *dest_w; int ret; - if (utf8towchar(src_utf8, &src_w)) + if (get_extended_win32_path(src_utf8, &src_w)) return -1; - if (utf8towchar(dest_utf8, &dest_w)) { + if (get_extended_win32_path(dest_utf8, &dest_w)) { av_free(src_w); return -1; } -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".