[LLVMdev] Which StatusInfo fields should have values set when dealing with win32 platform
Reid Spencer
reid at x10sys.com
Mon Dec 13 20:48:15 PST 2004
Okay. Sounds good. Look forward to it.
Reid
On Mon, 2004-12-13 at 20:34, Jeff Cohen wrote:
> I'm implementing this right now. BY_HANDLE_FILE_INFORMATION isn't the
> correct API, as Path doesn't have an open file handle handy. Nor does
> it need one.
>
> Reid Spencer wrote:
>
> >Henrik,
> >
> >modTime.fromWin32Time(ftLastWriteTime);
> > Note that you'll need write a "fromWin32Time" for the TimeValue
> > class to make the conversion of ftLastWriteTime to TimeValue's
> > notion of normalized time.
> >
> >isDir = dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
> >
> >fileSize = nFileSizeLow + (nFileSizeHigh << sizeof(DWORD)*8);
> >
> >The mode, user, and group fields aren't applicabe to Win32 so just set
> >them as follows (to avoid Unix issues):
> >
> >user = 9999;
> >group = 9999;
> >mode = 0777;
> >
> >Reid.
> >
> >On Mon, 2004-12-13 at 15:15, Henrik Bach wrote:
> >
> >
> >>Hi,
> >>
> >>Does any one have an idea which fields and how to the values correctly of
> >>the StatusInfo struct when dealing with the information returned in the
> >>BY_HANDLE_FILE_INFORMATION struct
> >>(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/by_handle_file_information_str.asp)
> >>from windows instead of the unix stuff in getStatusInfo:
> >>
> >>--- (excerpt start) -------------
> >> info.fileSize = buf.st_size;
> >> info.modTime.fromEpochTime(buf.st_mtime);
> >> info.mode = buf.st_mode;
> >> info.user = buf.st_uid;
> >> info.group = buf.st_gid;
> >> info.isDir = S_ISDIR(buf.st_mode);
> >> if (info.isDir && path[path.length()-1] != '/')
> >> path += '/';
> >>--- (excerpt end) -------------
> >>
> >>The getStatusInfo is used in the code of gccld and is missing in win32
> >>Path.cpp file.
> >>
> >>Henrik.
> >>
> >>=============================================================
> >>Henrik Bach
> >>Open Source Developer
> >>
> >>e-mail: henrik_bach_llvm at hotmail.com
> >>=============================================================
> >>Got Freedom?
> >>Software Freedom Day 2004 - 28th of August
> >>http://www.softwarefreedomday.org/
> >>=============================================================
> >>
> >>_________________________________________________________________
> >>Del din verden med MSN Spaces http://spaces.msn.com
> >>
> >>_______________________________________________
> >>LLVM Developers mailing list
> >>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> >>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>LLVM Developers mailing list
> >>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> >>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> >>
> >>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041213/128246f5/attachment.sig>
More information about the llvm-dev
mailing list