This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 353 for ps


Ignore:
Timestamp:
06/02/04 17:31:55 (21 years ago)
Author:
Simon Brenner
Message:

Linux/GCC compat, a few newlines at end of file, minor changes

Location:
ps/trunk/source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/lib/precompiled.h

    r334 r353  
    2626#pragma warning(disable:4786)   // identifier truncated to 255 chars
    2727#endif
     28
     29#include "config.h"
  • ps/trunk/source/lib/res/file.cpp

    r334 r353  
    512512        aio_suspend(&cb, 1, NULL);
    513513
    514     p = cb->aio_buf;
     514    // posix has aio_buf as volatile void, and gcc doesn't like to cast it
     515    // implicitly
     516    p = (void *)cb->aio_buf;
    515517
    516518    // return how much was actually transferred,
  • ps/trunk/source/lib/res/tex.cpp

    r334 r353  
    4040
    4141#ifndef NO_PNG
    42 # include <libpng10/png.h>
    43 # ifdef _MSC_VER
    44 #  pragma comment(lib, "libpng10.lib")
     42# ifdef _WIN32
     43#  include <libpng10/png.h>
     44# else
     45#  include <png.h>
     46#  ifdef _MSC_VER
     47#   pragma comment(lib, "libpng10.lib")
     48#  endif
    4549# endif
    4650#endif
     
    127131{
    128132    UNUSED(size)    // only need first 4 chars
    129 
     133   
    130134    return *(u32*)ptr == FOURCC('D','D','S',' ');
    131135}
  • ps/trunk/source/lib/timer.cpp

    r334 r353  
    5858
    5959    gettimeofday(&cur, 0);
    60     t = (cur.tv_sec - start.tv_sec) + (cur.tv_nsec - start.tv_nsec)*1e-6;
     60    t = (cur.tv_sec - start.tv_sec) + (cur.tv_usec - start.tv_usec)*1e-6;
    6161
    6262#else
  • ps/trunk/source/lib/types.h

    r334 r353  
    88// defines instead of typedefs so we can #undef conflicting decls
    99
    10 #define ulong unsigned long
    11 
    12 #define uint unsigned int
     10// Workaround: GCC won't parse constructor-casts with multi-word types, while
     11// visual studio will. Define uint/long to a namespaced one-word typedef.
     12typedef unsigned long PS_ulong;
     13typedef unsigned int PS_uint;
     14#define ulong PS_ulong
     15#define uint PS_uint
    1316
    1417#define i8 int8_t
  • ps/trunk/source/ps/CStr.cpp

    r332 r353  
    8484unsigned int CStr::ToUInt() const
    8585{
    86     return unsigned int(_ttoi(m_String.c_str()));
     86    return uint(_ttoi(m_String.c_str()));
    8787}
    8888
     
    9494unsigned long CStr::ToULong() const
    9595{
    96     return unsigned long(_ttol(m_String.c_str()));
     96    return ulong(_ttol(m_String.c_str()));
    9797}
    9898
Note: See TracChangeset for help on using the changeset viewer.