¡@

Home 

c++ Programming Glossary: posix

Copy a file in an sane, safe and efficient way

http://stackoverflow.com/questions/10195343/copy-a-file-in-an-sane-safe-and-efficient-way

SEC static_cast double end start CLOCKS_PER_SEC n return 0 POSIX WAY K R use this in The C programming language more low level.. UNBUFFERED BUFFERED ANSI C fread frwite 490 000 260 000 POSIX K R read write 450 000 230 000 FSTREAM KISS Streambuffer 500.. Overwriting a existing file buffered is faster with POSIX and SENDFILE all other programs are slower. Maybe the options..

Getting a FILE* from a std::fstream

http://stackoverflow.com/questions/109449/getting-a-file-from-a-stdfstream

could try looking up funopen Unfortunately this is not a POSIX API it a BSD extension so its portability is in question. Which..

How do I get the directory that a program is running from?

http://stackoverflow.com/questions/143174/how-do-i-get-the-directory-that-a-program-is-running-from

even though the program file lives elsewhere. getcwd is a POSIX function and supported out of the box by all POSIX compliant.. is a POSIX function and supported out of the box by all POSIX compliant platforms. You would not have to do anything special..

C++: what regex library should I use?

http://stackoverflow.com/questions/181624/c-what-regex-library-should-i-use

but this question is not about software licenses 2 C not C POSIX regex #include regex.h regcomp regexec etc. 3 http freshmeat.net..

What platforms have something other than 8-bit char?

http://stackoverflow.com/questions/2098149/what-platforms-have-something-other-than-8-bit-char

what so maybe I imagined it. Another consideration is that POSIX mandates CHAR_BIT 8 . So if you're using POSIX you can assume.. is that POSIX mandates CHAR_BIT 8 . So if you're using POSIX you can assume it. If someone later needs to port your code.. later needs to port your code to a near implementation of POSIX that just so happens to have the functions you use but a different..

Get the IP address of the machine

http://stackoverflow.com/questions/212528/get-the-ip-address-of-the-machine

I found the ioctl solution problematic on os x which is POSIX compliant so should be similiar to linux . However getifaddress..

What are the rules about using an underscore in a C++ identifier?

http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier

reserved for future extensions to the C language or the POSIX.1 environment. While using these names for your own purposes.. possibility of conflict with future versions of the C or POSIX standards so you should avoid these names. Names beginning with.. end my identifiers with '_t' as this is reserved by the POSIX standard. The rule about any identifier ending with '_t' surprised..

C++ : Catch a divide by zero error

http://stackoverflow.com/questions/4747934/c-catch-a-divide-by-zero-error

handling is OS dependent and MinGW somehow emulates the POSIX signals under Windows environment. Here's the test on MinGW..

High resolution timer with C++ and Linux?

http://stackoverflow.com/questions/538609/high-resolution-timer-with-c-and-linux

basically there is a boost ptime function you can use or a POSIX clock_gettime function which can serve basically the same purpose...

How to determine CPU and memory consumption from inside a process?

http://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process

the choice that seemed obvious at first was to use the POSIX APIs like getrusage etc. I spent some time trying to get this..

In g++ is C++ 11 thread model using pthreads in the background?

http://stackoverflow.com/questions/11784153/in-g-is-c-11-thread-model-using-pthreads-in-the-background

will generally be a line that looks like Thread model posix which means that it was configured to use pthreads for its threading..

On OS X, simple C++ program gives incorrect results (which are a result of command-line options 'c++03' vs 'c++11')

http://stackoverflow.com/questions/14149835/on-os-x-simple-c-program-gives-incorrect-results-which-are-a-result-of-comma

LLVM 3.1svn Target x86_64 apple darwin12.2.0 Thread model posix NOTE This is not a C issue per se but rather an OS X build issue...

How can I catch a ctrl-c event? (C++)

http://stackoverflow.com/questions/1641182/how-can-i-catch-a-ctrl-c-event-c

C How do I catch a ctrl c event in C c event handling posix signals sigint share improve this question signal isn't..

Ubuntu Linux C++ error: undefined reference to 'clock_gettime' and 'clock_settime'

http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim

run as well. Any help would be great thank you. c c linux posix time.h share improve this question Add lrt to the list of..

C/C++ function definitions without assembly

http://stackoverflow.com/questions/2442966/c-c-function-definitions-without-assembly

is the implementation for that You ™ll find write in libc posix unistd.h Write N bytes of BUF to FD. Return the number written..

posix timer_create() function causing memory leak on linux

http://stackoverflow.com/questions/4135415/posix-timer-create-function-causing-memory-leak-on-linux

timer_create function causing memory leak on linux I am using..

How to execute a command and get output of command within C++?

http://stackoverflow.com/questions/478898/how-to-execute-a-command-and-get-output-of-command-within-c

anything that will give me what I need. c c shell boost posix share improve this question #include string #include iostream..

C++0x has no semaphores? How to synchronize threads?

http://stackoverflow.com/questions/4792449/c0x-has-no-semaphores-how-to-synchronize-threads

stackoverflow regarding the use of semaphores. I use them posix semaphores all the time to let a thread wait for some event..

sprintf for unsigned _int64

http://stackoverflow.com/questions/5140871/sprintf-for-unsigned-int64

string with right values. And this has to achieved in posix standard. Thanks for inputs void main unsigned _int64 dbFileSize..

BOOST ASIO - How to write console server

http://stackoverflow.com/questions/5210796/boost-asio-how-to-write-console-server

a sepearate thread You don't need a separate thread use a posix stream_descriptor and assign STDIN_FILENO to it. Use async_read.. n' std cout command _command std endl this read private posix stream_descriptor _input char _command int main io_service io_service..

Understanding the vtable entries

http://stackoverflow.com/questions/5712808/understanding-the-vtable-entries

with tune generic build x86_64 suse linux Thread model posix gcc version 4.4.1 gcc 4_4 branch revision 150839 SUSE Linux..

What breaking changes are introduced in C++11?

http://stackoverflow.com/questions/6399615/what-breaking-changes-are-introduced-in-c11

may have to instead include utility The global namespace posix is now reserved for standardization. Valid C 2003 code that..

Why does integer overflow on x86 with GCC cause an infinite loop?

http://stackoverflow.com/questions/7682477/why-does-integer-overflow-on-x86-with-gcc-cause-an-infinite-loop

x86_64 linux gnu Configured with .. ... Thread model posix gcc version 4.5.2 Ubuntu Linaro 4.5.2 8ubuntu4 ~ Desktop So..

Throwing exceptions from constructors

http://stackoverflow.com/questions/810839/throwing-exceptions-from-constructors

form a design point of view Lets say I'm wrapping a posix mutex in a class it would look something like this. class Mutex..

Why can't clang with libc++ in c++0x mode link this boost::program_options example?

http://stackoverflow.com/questions/8454329/why-cant-clang-with-libc-in-c0x-mode-link-this-boostprogram-options-examp

LLVM 3.0svn Target x86_64 apple darwin11.2.0 Thread model posix clang std c 0x stdlib libc lc I opt local include L opt local..

Xcode 4.3 and C++11 include paths

http://stackoverflow.com/questions/9345271/xcode-4-3-and-c11-include-paths

LLVM 3.1svn Target x86_64 apple darwin11.3.0 Thread model posix I checked the default include paths ~ `c print prog name cc1plus`.. LLVM 3.1svn Target x86_64 apple darwin11.3.0 Thread model posix usr bin clang cc1 triple x86_64 apple macosx10.7.3 emit obj..

Linux 3.0: Executing child process with piped stdin/stdout

http://stackoverflow.com/questions/9405985/linux-3-0-executing-child-process-with-piped-stdin-stdout

and then return it. What combination of linux syscalls or posix functions should I use c c linux posix glibc share improve.. linux syscalls or posix functions should I use c c linux posix glibc share improve this question The code provided by eerpini..

C++ struct alignment question

http://stackoverflow.com/questions/1455458/c-struct-alignment-question

C API string and memory copy functions and the Posix hton and ntoh functions. A good practice is to use the following.. for which there exist published standards C99 memcpy Posix htonl htons ntohl ntohs Update here is some code that should..

Understanding stack frame of function call in C/C++? [closed]

http://stackoverflow.com/questions/16088040/understanding-stack-frame-of-function-call-in-c-c

allocation tail calls continuations ABI interrupts Posix signals sigaltstack 2 getcontext 2 longjmp 3 etc.... etc.....

How to use QueryPerformanceCounter?

http://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter

is probably my safest bet. The warning on Boost Posix that it may not works on Win32 API put me off a bit . However..

How can I measure CPU time and wall clock time on both Linux/Windows?

http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows

d.dwHighDateTime 32 0.0000001 else Handle error return 0 Posix Linux #else #include sys time.h double get_wall_time struct..

C/C++ function definitions without assembly

http://stackoverflow.com/questions/2442966/c-c-function-definitions-without-assembly

here but is is not needed nor desirable for Unix or Posix like systems. Instead just indicate that offset before and after..

C++ alignment when printing cout <<

http://stackoverflow.com/questions/2485963/c-alignment-when-printing-cout

gives you all the goodness for easy formatting with printf Posix formatting string but without losing any of the power and convenience..

What's the equivalent of Windows' QueryPerformanceCounter on OSX?

http://stackoverflow.com/questions/464618/whats-the-equivalent-of-windows-queryperformancecounter-on-osx

clock_gettime and the other functions mentioned there it's Posix Will fall back to worse counters if HPET is not existent. shouldn't..

Should I include stddef.h or cstddef?

http://stackoverflow.com/questions/5079325/should-i-include-stddef-h-or-cstddef

standard C headers are required to have the cfoo header Posix headers are not. Do you know which headers are standard and..

Is Boost IPC any good? [closed]

http://stackoverflow.com/questions/5140312/is-boost-ipc-any-good

while true So by the looks of it they aimed for Posix support and blobbed everything else into an emulation layer..

Semaphore implementation

http://stackoverflow.com/questions/6000674/semaphore-implementation

libraries which provide Semaphore implementations Posix Poco Thread Tiny Threads Also You can also implement Semaphores..

Difference in MultiThread aspect between Java and C/C++

http://stackoverflow.com/questions/6583719/difference-in-multithread-aspect-between-java-and-c-c

such as Mutex read write locks record locking Posix semaphores. But in Java I know we can use synchronized works..

byte array to int c++

http://stackoverflow.com/questions/6855115/byte-array-to-int-c

a 16 bit value directly. I've also switched to standard Posix types for integers I recommend you do the same. share improve..

strdup or _strdup?

http://stackoverflow.com/questions/7582394/strdup-or-strdup

is not a standard C function. but it is apparently a Posix function and anyway it's a well known function which has been..

Override Ctrl-C

http://stackoverflow.com/questions/7623401/override-ctrl-c

signal handlers are inherited by fork ed children. The Posix function sigaction allows you to register one shot handlers.. after they're invoked once. That's more advanced and Posix specific though. Edit As @Dietrich points out you should never..

How to name a thread in Linux?

http://stackoverflow.com/questions/778085/how-to-name-a-thread-in-linux

c c linux multithreading share improve this question Posix Threads This evidently won't compile but it will give you an..