From 7f4c607d189ad7fbd198465555fbc1318842c6f8 Mon Sep 17 00:00:00 2001 From: "jake%acutex.net" Date: Mon, 24 Dec 2001 17:11:18 +0000 Subject: [PATCH] Changes dictated by so libxpical will build on win32. --- calendar/libxpical/makefile.win | 1 + calendar/libxpical/oeDateTimeImpl.cpp | 6 ++++-- calendar/libxpical/oeICalEventImpl.cpp | 2 +- calendar/libxpical/oeICalEventImpl.h | 4 ++-- calendar/libxpical/oeICalImpl.cpp | 2 +- calendar/libxpical/oeICalImpl.h | 2 +- calendar/libxpical/oeIICal.idl | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/calendar/libxpical/makefile.win b/calendar/libxpical/makefile.win index 4a392adffc45..469e2cee3767 100644 --- a/calendar/libxpical/makefile.win +++ b/calendar/libxpical/makefile.win @@ -57,6 +57,7 @@ OBJS = \ .\$(OBJDIR)\oeICalEventImpl.obj \ .\$(OBJDIR)\oeICalFactory.obj \ .\$(OBJDIR)\oeICalImpl.obj \ + .\$(OBJDIR)\oeDateTimeImpl.obj \ .\$(OBJDIR)\oeICalStartupHandler.obj \ $(NULL) diff --git a/calendar/libxpical/oeDateTimeImpl.cpp b/calendar/libxpical/oeDateTimeImpl.cpp index 07af0fdbdf72..d54cd83d2f6a 100644 --- a/calendar/libxpical/oeDateTimeImpl.cpp +++ b/calendar/libxpical/oeDateTimeImpl.cpp @@ -35,7 +35,9 @@ * */ +#ifndef WIN32 #include +#endif #include "oeDateTimeImpl.h" #include "nsMemory.h" @@ -143,7 +145,7 @@ NS_IMETHODIMP oeDateTimeImpl::SetMinute(PRInt16 newval) NS_IMETHODIMP oeDateTimeImpl::GetTime(PRTime *retval) { - unsigned long long result = icaltime_as_timet( m_datetime ); + PRTime result = icaltime_as_timet( m_datetime ); *retval = result*1000; return NS_OK; } @@ -156,7 +158,7 @@ NS_IMETHODIMP oeDateTimeImpl::ToString(char **retval) return NS_OK; } -NS_IMETHODIMP oeDateTimeImpl::SetTime( PRUint64 ms ) +NS_IMETHODIMP oeDateTimeImpl::SetTime( PRTime ms ) { m_datetime = ConvertFromPrtime( ms ); return NS_OK; diff --git a/calendar/libxpical/oeICalEventImpl.cpp b/calendar/libxpical/oeICalEventImpl.cpp index f82859fa7b61..7b885faed8fb 100644 --- a/calendar/libxpical/oeICalEventImpl.cpp +++ b/calendar/libxpical/oeICalEventImpl.cpp @@ -668,7 +668,7 @@ NS_IMETHODIMP oeICalEventImpl::GetNextRecurrence( PRTime begin, PRTime *retval, printf( "Wrong day in month\n" ); continue; } - unsigned long long nextinms = icaltime_as_timet( next ); + PRTime nextinms = icaltime_as_timet( next ); nextinms *= 1000; if( (nextinms > begin) && !IsExcepted( nextinms ) ) { // printf( "Result: %d-%d-%d %d:%d\n" , next.year, next.month, next.day, next.hour, next.minute ); diff --git a/calendar/libxpical/oeICalEventImpl.h b/calendar/libxpical/oeICalEventImpl.h index 264d5e492865..65793e0fefcd 100644 --- a/calendar/libxpical/oeICalEventImpl.h +++ b/calendar/libxpical/oeICalEventImpl.h @@ -67,7 +67,7 @@ oeDateEnumerator : public nsISimpleEnumerator private: PRUint32 mCurrentIndex; - vector mIdVector; + std::vector mIdVector; }; /* oeIcalEvent Header file */ @@ -108,7 +108,7 @@ private: oeDateTimeImpl *m_end; oeDateTimeImpl *m_recurend; icaltimetype m_lastalarmack; - vector m_exceptiondates; + std::vector m_exceptiondates; icaltimetype GetNextRecurrence( icaltimetype begin ); icaltimetype CalculateAlarmTime( icaltimetype date ); bool IsExcepted( PRTime date ); diff --git a/calendar/libxpical/oeICalImpl.cpp b/calendar/libxpical/oeICalImpl.cpp index b71ee82e58a9..a01266e8ae3d 100644 --- a/calendar/libxpical/oeICalImpl.cpp +++ b/calendar/libxpical/oeICalImpl.cpp @@ -73,7 +73,7 @@ oeEventEnumerator : public nsISimpleEnumerator private: PRUint32 mCurrentIndex; - vector mIdVector; + std::vector mIdVector; nsCOMPtr mICal; }; diff --git a/calendar/libxpical/oeICalImpl.h b/calendar/libxpical/oeICalImpl.h index 5f905f231da5..8f1a0104b053 100644 --- a/calendar/libxpical/oeICalImpl.h +++ b/calendar/libxpical/oeICalImpl.h @@ -140,7 +140,7 @@ class oeICalImpl : public oeIICal NS_DECL_OEIICAL void SetupAlarmManager(); private: - vector m_observerlist; + std::vector m_observerlist; bool m_batchMode; EventList m_eventlist; nsITimer *m_alarmtimer; diff --git a/calendar/libxpical/oeIICal.idl b/calendar/libxpical/oeIICal.idl index 2d3955350199..974463bd191b 100644 --- a/calendar/libxpical/oeIICal.idl +++ b/calendar/libxpical/oeIICal.idl @@ -59,7 +59,7 @@ interface oeIDateTime : nsISupports attribute short hour; attribute short minute; PRTime getTime(); - void setTime( in unsigned long long ms ); + void setTime( in PRTime ms ); string toString(); };