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 ADF3C42678 for ; Wed, 25 May 2022 14:48:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0D36168B511; Wed, 25 May 2022 17:48:03 +0300 (EEST) Received: from msg-6.mailo.com (ip-16.mailobj.net [213.182.54.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C12168B26D for ; Wed, 25 May 2022 17:47:56 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1653490075; bh=oOGOj9lCcu+ayO7S5F1f0JUhiOnuUeC4YFuZDAIhrdU=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fKeIe/hr8/xQqXNpm5mndnFx9CpLHuqoYMZ8MuvFu4STjcJcjLZgITXmd7VF3RLds GwlgOD4jvWpdEMz1aWuBgpHbtYiHtHEQxq9wyKQxm5Kzz52MnV7Yhn6i60Ae3WZhK3 5BdafjtzU/cpVyI//Orn39mzuHRZvY9lTzhFlqeM= Received: by www-7.mailo.com with http webmail; Wed, 25 May 2022 16:47:55 +0200 (CEST) X-EA-Auth: AGvWVxSGF4V/QSF4gNnJIeJ8az1b2uS7QPGotT24BpMuiIB0h8V8YgdtmKJrq14EEumxIwccP95AbILNWEWwYdhAEUU8km12 From: nil-admirari@mailo.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 May 2022 16:47:55 +0200 (CEST) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA21.01/r20220415 Message-ID: In-Reply-To: <7751335906bcaa5da249928c9830fcc75b01970c.1653430851.git.ffmpegagent@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH v7 2/3] 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 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: > + struct win32_stat > + { > + _dev_t st_dev; /* ID of device containing file */ > + _ino_t st_ino; /* inode number */ > + unsigned short st_mode; /* protection */ > + short st_nlink; /* number of hard links */ > + short st_uid; /* user ID of owner */ > + short st_gid; /* group ID of owner */ > + _dev_t st_rdev; /* device ID (if special file) */ > + int64_t st_size; /* total size, in bytes */ > + int64_t st_atime; /* time of last access */ > + int64_t st_mtime; /* time of last modification */ > + int64_t st_ctime; /* time of last status change */ > + }; Wouldn't it make sense to add a static_assert(sizeof(struct win32_stat) == sizeof(struct _stati64)) somewhere? > +static inline int win32_access(const char *filename_utf8, int par) > +static inline void copy_stat(struct _stati64 *winstat, struct win32_stat *par) > +static inline int win32_stat(const char *filename_utf8, struct win32_stat *par) > +static inline int win32_fstat(int fd, struct win32_stat *par) How about renaming par to something more appropriate? > +static inline void copy_stat(struct _stati64 *winstat, struct win32_stat *par) > +{ > + par->st_dev = winstat->st_dev; > + par->st_ino = winstat->st_ino; > + par->st_mode = winstat->st_mode; > + par->st_nlink = winstat->st_nlink; > + par->st_uid = winstat->st_uid; > + par->st_gid = winstat->st_gid; > + par->st_rdev = winstat->st_rdev; > + par->st_size = winstat->st_size; > + par->st_atime = winstat->st_atime; > + par->st_mtime = winstat->st_mtime; > + par->st_ctime = winstat->st_ctime; > } Would memcpy make more sense here? > +static inline int win32_stat(const char *filename_utf8, struct win32_stat *par) > +{ > + struct _stati64 winstat = { 0 }; > ... > > +static inline int win32_fstat(int fd, struct win32_stat *par) > +{ > + struct _stati64 winstat = { 0 }; > ... Functions use _stati64 internally, which is affected by _USE_32BIT_TIME_T. win32_stat does not take _USE_32BIT_TIME_T into account at all. It was already pointed out that _USE_32BIT_TIME_T is actually used: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296731.html. _______________________________________________ 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".