Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311759

Summary: [tcf] Patches for Symbian TCF agent porting support
Product: [Tools] TCF Reporter: Ed Swartz <ed.swartz>
Component: CoreAssignee: Project Inbox <dsdp.tm.tcf-inbox>
Status: VERIFIED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene
Version: unspecified   
Target Milestone: 0.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patches (via svn diff) against rev 943
eugene: iplog+
minor patch update mober.at+eclipse: iplog+

Description Ed Swartz CLA 2010-05-05 11:34:27 EDT
Created attachment 167163 [details]
patches (via svn diff) against rev 943

We've been working on porting the reference TCF agent to Symbian.  Attached are an initial set of  patches against rev 943 needed to build for Symbian and Open C / PIPS.  

While most of the changes are localized to mdep.c/.h changes, there are a few extra trace() calls added which help us out in a tough-to-debug environment (discovery_udp.c, asynscreq.c).  I hope they can be retained.  Let me know if, on the other hand, a more specialized LOG_... selector should be used for these.

I verified the agent still builds for Cygwin (my other readily available host environment).

Note: our agent uses the TCF agent as a library, so the actual Symbian-specific implementation is outside these sources and not included in this patch.  Thus, the patch will not allow you to build a full agent for Symbian.  (Unfortunately, we won't be able to release sources for a full functioning agent since that would depend on proprietary internal APIs.)  But it would be nice if we don't have to manually apply the attached changes when syncing against the upstream.
Comment 1 Eugene Tarassov CLA 2010-05-05 19:19:04 EDT
I have committed the patch, with few minor changes: 

in trace.c:
removed RDEBUG_TRACE - it seems not needed since you can log to stderr if you call open_log_file("-") or use -L- option in the agent command line.

in mdep.c:
reused Windows/VxWorks implementation of pread/pwrite since it is identical to  Symbian implementation.

in asyncreq.c:
req->error should be assigned before calling trace(), because the call can overwrite errno, also not sure why errno was printed two times, so I changed the code to print it only once.

Thanks.
Comment 2 Ed Swartz CLA 2010-05-06 08:56:34 EDT
(In reply to comment #1)
> I have committed the patch, with few minor changes: 
> 
> in trace.c:
> removed RDEBUG_TRACE - it seems not needed since you can log to stderr if you
> call open_log_file("-") or use -L- option in the agent command line.

This is fine for now -- but note that the (unspoken) benefit with that macro was that the trace could be "tee"'d to both stderr and to a file.  But this support has been disabled for a while, so it's okay.

> 
> in mdep.c:
> reused Windows/VxWorks implementation of pread/pwrite since it is identical to 
> Symbian implementation.
> 
> in asyncreq.c:
> req->error should be assigned before calling trace(), because the call can
> overwrite errno, also not sure why errno was printed two times, so I changed
> the code to print it only once.

Ok, that makes sense; thanks.
Comment 3 Ed Swartz CLA 2010-05-06 12:40:15 EDT
Created attachment 167340 [details]
minor patch update

I realized when trying to build from a Linux host that we had an unnecessarily upper-cased #include in the Symbian mdep.h section.  Could you apply this too?
Comment 4 Eugene Tarassov CLA 2010-05-06 13:31:40 EDT
(In reply to comment #3)
> Created an attachment (id=167340) [details]
> minor patch update
> 
> I realized when trying to build from a Linux host that we had an unnecessarily
> upper-cased #include in the Symbian mdep.h section.  Could you apply this too?

Done
Comment 5 Ed Swartz CLA 2010-05-06 13:37:54 EDT
Thanks!
Comment 6 Martin Oberhuber CLA 2010-05-28 13:58:25 EDT
Comment on attachment 167340 [details]
minor patch update

According to the discussion log, the patch update has also been applied, so marking as iplog+.
Comment 7 Martin Oberhuber CLA 2010-05-28 14:09:00 EDT
Bulk update: Marking all TCF fixes from the Helios period (2009-06-29 until 2010-06-01) as target 3.2 since they go through release review along with the TM 3.2 release.
Comment 8 Doug Schaefer CLA 2011-05-17 10:48:38 EDT
Moving bugs to new home for IP log.
Comment 9 Martin Oberhuber CLA 2013-06-05 06:25:52 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3