portability

Java cryptography generated key portability

In Java, I'm generating and serializing a symmetric key for encryption purposes: KeyGenerator keyGen = KeyGenerator.getInstance(algorithm); SecretKey symmetricKey = keyGen.generateKey(); Base64.encode(symmetricKey.getEncoded(), new FileOutputStream(filename)); where Base64 is from the Bouncycastle cryptography package ...

What is portability? How is java more portable than other languages?

I wonder how Java is more portable than C, C++ and .NET and any other language. I have read many times about java being portable due to the interpreter and JVM, but the JVM just hides the architectural differences in the hardware right? We'd still need different JVMs for different machine architectures right? What am I missing here? So i...

"Compiling php" as in making it portable.

I'm not intrested in compiling for performance but in being able to "compile" a php script in order to carry it on a usb stick or portable hard drive. I think that there may be two way: 1) Portable Apache 2) Portable command line php I undersand that some package such as xampp and so on exists, as well as using the php bin files but I...

portable mysql for linux

hi Folks... is there a portable version of MySQL for Linux available. Thanks in advance.. Rajan ...

Storing settings and password in Java SE portably

How should I store program settings and saved password in a desktop Java SE program. Program uses jsch to connect to SSH and should manage passwords and keys. How to do it portably, without implementing separate solutions per OS? Is there a library which will, for example, store things at $HOME/.myapp on GNU/Linux, in registry or in u...

Using snprintf in a cross-platform application

I am writing a C program that is expected to be compiled with all major compilers. Currently I am developing on GCC on a linux machine and will compile on MSVC before committing the code. To make the cross-compiling easy, I am compiling with -ansi and -pedantic flags. This worked well until I started using snprintf which is not available...

Searching portable C/++ COM-port library, freely licensed

As title says, I've been trying to find a portable library with C/++ bindings for doing basic COM-port communication for an application I'm servicing. Windows/Linux support is a minimum. As I'm not the original author of the software, and I'm not allowed to alter the details of the contract, the library has to be licensed so that I will...

Building a 32bit float out of its 4 composite bytes [C++]

I'm trying to build a 32bit float out of its 4 composite bytes. Is there a better (or more portable) way to do this than with the following method? #include <iostream> typedef unsigned char uchar; float bytesToFloat(uchar b0, uchar b1, uchar b2, uchar b3) { float output; *((uchar*)(&output) + 3) = b0; *((uchar*)(&output) ...

Will app built with gcc 4.x on CentOS/RHEL 4.8 run on completely un-updated CentOS/RHEL 4?

We have a commercial application that we build on 32-bit CentOS 4.8 (equivalent to Red Hat Enterprise Linux (RHEL) 4 update 8. The default gcc compiler is at 3.4.6 We are able to run our binary on both 32- and 64-bit CentOS/RHEL 4 and 5 including completely un-updated RHEL 4. THE QUESTION: If we update to a newer gcc 4 version, will t...

unix shell code portable to run on all shells

H all, Hope all is well, Can any one please let me know the coding guidelines along with code samples of unix shell scripting by using which the code can run on most of the current shells like ksh, bash, csh etc. Most of the times some of my code written for ksh would not work on normal sh. I want to make my code maximum portable. Most...

How to do portable 64 bit arithmetic, without compiler warnings.

I occasionally use 64 bit arithmetic in an open source C++ library of mine. I discovered that long long serves my purpose quite nicely. Even some 10 year old solaris box could compile it. And it works without messing around with #defines on Windows too. Now the issue is I get complaints from my users because they compile with GCC -pedan...