portability

C++ Process Management

Is there a well known, portable, good library for c++ process management? I found a promising library called Boost.Process (http://www.netbsd.org/~jmmv/process/) but it's only a candidate for inclusion in the Boost library. Has anyone use this? Does anyone know why it isn't a part of Boost? Thanks! ...

What is the Preferred Cross-platform 'main' Definition Using boost::program_options?

I'm trying to develop a cross-platform application using C++ with boost. I typically program in a *nix environment, where I've always defined 'main' as follows: int main( const int argc, const char* argv[] ) { ... } For this application, I'm starting in the Windows environment, using Visual Studio 2003. When I try to use boost::pro...

Is C or C++ better for making portable code?

I am trying to have some fun in summer. Writing a piece of code that enables presenting Arabic language in systems that support Unicode but no support for eastern languages it. I am writing only the logic hopefully with no integration code initially. Should I use C++ or C? Which is the easier language to write portable code and easier...

Is there a standard method to add to ENV variables conditionally on being empty?`

I am creating a script to configure and launch software. My current application requires appending to LD_LIBRARY_PATH. I know that I can test if this is empty first and set it outright and append it otherwise. The following does not appear to work and it keeps appending to the variable even if it contains the string I am testing for i...

64 bit floating point porting issues

I'm porting my application from 32 bit to 64 bit. Currently, the code compiles under both architectures, but the results are different. For various reasons, I'm using floats instead of doubles. I assume that there is some implicit upconverting from float to double happening on one machine and not the other. Is there a way to control ...

Are web applications more portable than desktop applications?

I often hear people praising web applications (as opposed to desktop apps) for their portability. Indeed, making a desktop application available on multiple operating systems is difficult. However, I'd think web-applications have to deal with portability issues equally well, only between browsers instead of operating systems. Or is it no...

Is Google App Engine good for scalablity and portability?

I'm evaluating hosted production environments and currently have interest in Google App Engine. Currently I'm enjoying the free quotas. I'm concerned if it is efficient to scale up using Google App Engine. Portability is being analyzed as well. Please advise if Google App Engine is good for scalability and portability. Thank you in ...

Portable PostgreSQL for development off a usb drive

In order to take some development work home I have to be able to run a PostgreSQL database. I don't want to install anything on the machine at home. Everything should run off the usb drive. http://stackoverflow.com/questions/408511/what-development-tools-do-you-carry-on-your-usb-drive That question covers pretty much everything else,...

Platform C Preprocessor Definitions

Hey all, I'm writing a small library in C++ that I need to be able to build on quite a few different platforms, including iPhone, Windows, Linux, Mac and Symbian S60. I've written most of the code so that it is platform-agnostic but there are some portions that must be written on a per-platform basis. Currently I accomplish this by...

How important is portability?

I was just writing a procedure that is looking for a newline and I was contemplating using Environment.NewLine vs '\n'. Syntactically: Is Environment.NewLine clearer than '\n'? And how important is portability really? ...

A portable way of getting the nr of processing units (# cpu,cores) in c?

Is there a way to get the nr of processing units like cpus or cores in a system? I am going to write an app with pthreads so if there is a posix call that would be great. I know about reading from /proc/cpuinfo but that is not so portable. Is there another more portable way? ...

Porting from WAMP to LAMP

Hi, Completely developed in WAMP and I need to deploy it on a LAMP setup in the organisation. I want to make sure the deployment goes of smoothly and takes as little time as possible. What are the thing I would need to change before deploying it in LAMP? Also is there any way I can test it in some simulated LAMP environment? Edit: I us...

How do I convert my Git repository to Mercurial and bring along its tags

I am wanting to toy around with Mercurial a bit, so I am trying to convert one of my existing repositories over. I run the following command on my Mac: hg convert myrepos myrepos-hg The command successfully imports all of my commits, but it doesn't bring along the 8 or so tags that were marked in the Git repository (nor are any of th...

Portable Compare And Swap (atomic operations) C/C++ library?

Is there any small library, that wrapps various processors' CAS-like operations into macros or functions, that are portable across multiple compilers? PS. The atomic.hpp library is inside boost::interprocess::detail namespace. The author refuses to make it a public, well maintained library. Lets reopen the question, and see if there ar...

What is fadvise/madvise equivalent on windows ?

On UNIX, I can, for example, tell the OS that the mapping will be needed in the future with posix_fadvise(POSIX_FADV_WILLNEED). It will then read-ahead the data if it feels so. How to tell the access intend to Windows ? ...

Database portability (sql server to mysql, postgresql)

I am working on a business app (asp.net). Right now I am using sql server. But I plan to support at least mysql and postgresql down the road. What are the issues that I should consider to avoid future headaches? Especially about datatypes (column types). E.g. I think BIT column is not supported on some dbs so I use tinyint? I mostly u...

Portable thread-safety in C?

Purpose I'm writing a small library for which portability is the biggest concern. It has been designed to assume only a mostly-compliant C90 (ISO/IEC 9899:1990) environment... nothing more. The set of functions provided by the library all operate (read/write) on an internal data structure. I've considered some other design alternatives,...

Portable SQL to determine if a table exists or not?

Is there a portable way of determining if a database table already exists or not? ...

How does one include TR1?

Different compilers seem to have different ideas about TR1. G++ only seems to accept includes of the type: #include <tr1/unordered_map> #include <tr1/memory> ... While Microsofts compiler only accept: #include <unordered_map> #include <memory> ... As for as I understand TR1, the Microsoft way is the correct one. Is there a way to ...

How to Declare a 32-bit Integer in C

What's the best way to declare an integer type which is always 4 byte on any platforms? I don't worry about certain device or old machines which has 16-bit int. ...