On Thu, 8 Mar 2012 15:25:53 +0100 Vincent Torri <vincent.to...@gmail.com> said:
i see u did it already! thnx! :) > On Thu, Mar 8, 2012 at 3:22 PM, Vincent Torri <vincent.to...@gmail.com> wrote: > > On Thu, Mar 8, 2012 at 2:54 PM, Enlightenment SVN > > <no-re...@enlightenment.org> wrote: > >> Log: > >> From: cnook <kimci...@gmail.com> > >> Subject: [E-devel] [Patch][Eina] eina_file_win32 - using > >> eina_file_statat(); > >> > >> On windows, Elementary gives build error. cause.. > >> The elm_config.c uses eina_file_statat(); but It is not in the > >> eina_file_win32.c > >> So the attached patch comes. Please keep the patch in the up stream. > >> Thanks. > >> > >> > >> > >> Author: raster > >> Date: 2012-03-08 05:54:01 -0800 (Thu, 08 Mar 2012) > >> New Revision: 69058 > >> Trac: http://trac.enlightenment.org/e/changeset/69058 > >> > >> Modified: > >> trunk/eina/src/lib/eina_file_win32.c > >> > >> Modified: trunk/eina/src/lib/eina_file_win32.c > >> =================================================================== > >> --- trunk/eina/src/lib/eina_file_win32.c 2012-03-08 13:51:58 UTC > >> (rev 69057) +++ trunk/eina/src/lib/eina_file_win32.c 2012-03-08 > >> 13:54:01 UTC (rev 69058) @@ -1154,3 +1154,34 @@ > >> on_exit: > >> eina_lock_release(&file->lock); > >> } > >> + > >> +EAPI int > >> +eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat > >> *st) +{ > >> + WIN32_FILE_ATTRIBUTE_DATA fad; > >> + ULARGE_INTEGER length; > >> + ULARGE_INTEGER mtime; > >> + ULARGE_INTEGER atime; > >> + > >> + EINA_SAFETY_ON_NULL_RETURN_VAL(info, -1); > >> + EINA_SAFETY_ON_NULL_RETURN_VAL(st, -1); > >> + > >> + if (!GetFileAttributesEx(info->path, GetFileExInfoStandard, &fad)) > >> + { > >> + if (info->type != EINA_FILE_LNK) > >> + info->type = EINA_FILE_UNKNOWN; > >> + return -1; > >> + } > >> + > >> + length.u.LowPart = fad.nFileSizeLow; > >> + length.u.HighPart = fad.nFileSizeHigh; > >> + atime.u.LowPart = fad.ftLastAccessTime.dwLowDateTime; > >> + atime.u.HighPart = fad.ftLastAccessTime.dwHighDateTime; > >> + mtime.u.LowPart = fad.ftLastWriteTime.dwLowDateTime; > >> + mtime.u.HighPart = fad.ftLastWriteTime.dwHighDateTime; > >> + > >> + st->size = length.QuadPart; > >> + st->atime = atime.QuadPart; > >> + st->mtime = mtime.QuadPart; > >> + return 0; > >> +} > >> > > > > i think that we should memset to 0 st, then fill the fields above > > > > Vincent > > also, maybe stat() is better : > > http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.71%29.aspx > > Vincent > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel