On 14 Aug 2003 12:47:19 -0500, Sam Lang wrote
> During the compile process for AxisC++, I'm getting a bunch of warnings
> from the headers:
> 
> warning: no newline at end of file
> 
this happens when we develop in both VC++ and Linux. As you know in Windows 
we have CR+LF instead of newline charactor. For the time being running 
dos2unix on all the source will work.
Anyway we will solve this immediatly.

> g++ gives this warning, but VC++ doesn't.  Because C++ compilers can
> differ dramatically across platforms, it might be worthwhile to have 
> a set of C++ coding guidelines, to ensure this kind of problem 
> doesn't happen.  The mozilla project has a set of guidelines for 
> this purpose:
> 
> http://www.mozilla.org/hacking/portable-cpp.html

We are going through this and we find we have to do small changes to comply 
with this.

> 
> which addresses the above problem:
> 
> --snip--
> 10. Put a new line at end-of-file
> 
> Not having a new-line char at the end of file breaks .h files with 
> the Sun WorkShop compiler and it breaks .cpp files on HP. --snip--
> 
> I would recommend adopting their guidelines, or coming up with your own.
> 
> Also, In the following code (HandlerPool.cpp), when WIN32 is not defined
> 
> (on unix platforms), 'sleep' goes undefined because unistd.h isn't being
> #included.  So right now this doesn't compile on linux with g++.
> 
> Instead of using system calls directly here to wait for the handler, 
> it would be nice if there were an AX_wait function that could be overridden
> by application developers that want to use other threading models.  This
> would allow them to plugin their own implementations of wait.

Exactly, I will do it today.

> 
> -slang
> 

Thanks,

Susantha.

--
Lanka Software Foundation (http://www.opensource.lk)
Promoting Open-Source Development in Sri Lanka

Reply via email to