Top "Portability" questions

Portable code can be run with little to no modification in multiple environments.

Is there any "standard" htonl-like function for 64 bits integers in C++?

I'm working on an implementation of the memcache protocol which, at some points, uses 64 bits integer values. These values must …

c++ 64-bit portability endianness htonl
Checking the gcc version in a Makefile?

I would like to use some gcc warning switchs that aren't available in older gcc versions (eg. -Wtype-limits). Is there …

gcc makefile version portability compiler-warnings
Is there a portable equivalent to DebugBreak()/__debugbreak?

In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on …

c++ portability debugbreak
Portability of #warning preprocessor directive

I know that the #warning directive is not standard C/C++, but several compilers support it, including gcc/g++. But …

c++ compiler-construction warnings c-preprocessor portability
Is it possible to create Portable VM?

I want to know that is it possible to create a fully portable virtual machine using any of the VMWare …

vmware virtualization virtual-machine virtualbox portability
GLIBCXX versions

If I compile a C++ program on my machine, and run it on another one (with older software) I get: /…

c++ linux portability glibc
Why bit endianness is an issue in bitfields?

Any portable code that uses bitfields seems to distinguish between little- and big-endian platforms. See the declaration of struct iphdr …

c cross-platform portability low-level bit-fields
Why should I not #include <bits/stdc++.h>?

I posted a question with my code whose only #include directive was the following: #include <bits/stdc++.h> …

c++ portability turbo-c++ c++-faq implementation-defined-behavior
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 …

java c programming-languages portability
How does one include TR1?

Different compilers seem to have different ideas about TR1. G++ only seems to accept includes of the type: #include <…

c++ include c++11 portability tr1