igormarfin / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

test.cpp:61:9: error: 'utime' is not a member of '__os__' #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Sorry I ran into another issue o.o; lol.
2. test.cpp:61:9: error: 'utime' is not a member of '__os__'
make: *** [test] Error 1
3. This seems to be true for a few of em.

What is the expected output? What do you see instead?
Not have this issue? Part of the os.py file, so it should be in there I think?

What version of the product are you using? On what operating system?
Newest one on downloads. 8.1

Please provide any additional information below.
python:
      st = os.stat(src)
      try:
          os.utime(dst, (st.st_atime, st.st_mtime))
      except:
          pass

the output c++:
    st = __os__::stat(src);
    try {
        __os__::utime(dst, (new tuple2<__ss_int, __ss_int>(2,st->__ss_st_atime,st->__ss_st_mtime)));
    } catch (Exception *) {

Original issue reported on code.google.com by adr2tra...@gmail.com on 8 Jul 2011 at 8:57

GoogleCodeExporter commented 8 years ago
thanks for reporting :) this one is currently not supported under 
windows/mingw, probably because I couldn't quickly figure out how to support 
that a long time ago.. let's have a look at this again for 0.9.

Original comment by mark.duf...@gmail.com on 9 Jul 2011 at 9:46

GoogleCodeExporter commented 8 years ago
unfortunately mingw doesn't seem to support utime.. but I had a look at the 
cpython implementation, and copied their windows.h approach. 

I don't think nanoseconds currently work for either this or the unix version, 
but I guess those are usually not very important.

please let me know how this works for you. to test, you can copy the shedskin 
subdir in git (http://gitorious.org/shedskin -> source tree -> download) over 
the \shedskin-0.8\shedskin\shedskin directory. 

thanks again for reporting. if you'd like to help out further improve support 
for the 'os' module under windows, please see python/Modules/posixmodule.c in 
the cpython source tree, and shedskin/lib/os/__init__.?pp in the shedskin 
source tree.. :-)

Original comment by mark.duf...@gmail.com on 16 Aug 2011 at 7:39