portability Questions

1

Solved

The man page explains little to nothing about that option and while there are tons of information available on the web and in answers on StackOverflow, I discovered that many of the information pro...
Adiaphorism asked 23/4, 2022 at 0:56

9

Solved

I need to pass /DEF:c:\filepath\myLib.def" command line option from a bash script to MS compiler/linker. The path is generated as part of build process by a bash script. Basically, the argument tha...
Cribbing asked 18/8, 2012 at 2:25

9

I'm developing an application for Android, and I'm thinking that it's functionality might be useful on other (Java-running) platforms (say a regular desktop app -- although I hope that the other pl...
Tollbooth asked 12/2, 2011 at 8:33

2

Solved

(This is something that's cropped up for me mainly when using GitHub, so I don't mind too much if any solution is GitHub-specific. But the problem isn't GitHub-specific per se, and any solution nee...
Atonsah asked 5/11, 2016 at 0:35

4

Solved

Consider: std::tuple<int , const A&> func (const A& a) { return std::make_tuple( 0 , std::ref(a) ); } Is the std::ref required for writing correct and portable code? (It co...
Implicatory asked 6/8, 2012 at 17:30

3

Solved

From this comment in GCC bug #53119: In C, {0} is the universal zero initializer equivalent to C++'s {} (the latter being invalid in C). It is necessary to use whenever you want a zero-initi...
Hydrous asked 30/11, 2021 at 13:20

3

What is the best way to get meaningful file access error messages, in a portable way from std::fstreams ? The primitiveness of badbits and failbits is getting to be bit annoying. I have written my ...
Pizza asked 14/4, 2010 at 16:52

4

Solved

Many libraries I have seen/used have typedefs to provide portable, fixed size variables, eg int8, uint8, int16, uint16, etc which will be the correct size regardless of platform (and c++11 does it ...
Learn asked 22/7, 2013 at 17:3

10

Solved

I'm porting a relatively simple console program written for Unix to the Windows platform (Visual C++ 8.0). All the source files include "unistd.h", which doesn't exist. Removing it, I get...
Moribund asked 4/12, 2008 at 19:51

10

Solved

I'm trying to print types like off_t and size_t. What is the correct placeholder for printf() that is portable? Or is there a completely different way to print those variables?
Invercargill asked 25/2, 2009 at 17:11

9

Solved

I was looking through the strlen code here and I was wondering if the optimizations used in the code are really needed? For example, why wouldn't something like the following work equally good or b...
Richly asked 26/8, 2019 at 1:24

4

Solved

After looking at a bunch of other questions and their answers, I get the impression that there is no widespread agreement on what the "volatile" keyword in C means exactly. Even the standard itsel...
Halcomb asked 4/11, 2019 at 14:18

3

Solved

C11, 4. Conformance, footnote 5 (emphasis added): Strictly conforming programs are intended to be maximally portable among conforming implementations. Why does the combination of strictly conform...
Cavorelievo asked 11/5, 2021 at 12:56

11

Solved

In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard co...
Haem asked 6/10, 2008 at 8:57

10

Solved

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.
Liberalize asked 4/8, 2009 at 18:30

6

Solved

Recently I came across a gcc extension that I have found rather useful: __attribute__(cleanup) Basically, this allows you to assign a cleanup call to a local variable at the time it exits scope. F...
Clomp asked 1/12, 2009 at 20:7

7

Solved

All, I have been practicing coding problems online. Currently I am working on a problem statement Problems where we need to convert Big Endian <-> little endian. But I am not able to jot down t...
Enaenable asked 1/10, 2010 at 20:26

1

The portable version of wireshark from: https://www.wireshark.org/download.html works fine on my windows 10, but doesn't include portable capturing triber Libpcap or WinPcap. On the Npcap page http...
Overwrite asked 24/1, 2021 at 18:28

1

Solved

I was trying to understand std::variant: #include <cstdint> #include <variant> std::variant<int64_t, double> v; I wanted to assign an int64_t variant: v = 5L; That compiles on x...
Portrait asked 22/12, 2020 at 10:14

8

Solved

TiddlyWiki is a great idea, brilliantly implemented. I'm using it as a portable personal "knowledge manager," and these are the prize virtues: It travels on my USB flash memory stick and runs on ...

3

Solved

I'd like to deploy Python to non-programmers in my organization such that the install process consists entirely of syncing a directory from Perforce and maybe running one batch file that sets up en...
Pyelography asked 11/10, 2016 at 18:51

0

I'm writing a library. In one of my unit tests, I want to create a temporary file, make some library calls involving that file, and delete the file on exit (success, failure and exception - cleanup...
Neolamarckism asked 2/10, 2020 at 17:24

3

Solved

anyone know a portable version of mysql? I know xampp but it comes with PHP and Apache together anyone know how to isolate the mysql?
Cataplasm asked 5/12, 2009 at 5:4

6

Solved

I'm trying to build a 32-bit 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 cha...

6

Solved

I would like to get ahold of a lightweight, portable fiber lib with MIT license (or looser). Boost.Coroutine does not qualify (not lightweight), neither do Portable Coroutine Library nor Kent C++CS...
Falsify asked 17/8, 2009 at 0:12

© 2022 - 2024 — McMap. All rights reserved.