Search:

Type: Posts; User: Andreea

Search: Search took 0.00 seconds.

  1. Writing a new errno is a way of making your code...

    Writing a new errno is a way of making your code not portable, not upgrading the C library. Optimizing C library code just asks for it, but better not!



    Yes, but . You ask the parent to read...
  2. The memory ordering of bit-fields into their...

    The memory ordering of bit-fields into their storage unit is not specified by the ANSI C Standard. We do agree that the differences appear at compiling time. It all depends on how your compiler...
  3. One char ? :D LOL errno is defined by the ISO...

    One char ? :D LOL

    errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared.In C++ errno is always declared as a macro...
  4. The program does not need to know, unless you...

    The program does not need to know, unless you writing endian sensitive code. Bit arithmetic code is not endian sensitive. Casts with information loss are.





    The code proposed by Intel to...
  5. Because no system wrapper was provided, once a...

    Because no system wrapper was provided, once a system call fails, the proper approach is to analyze errno (the global variable) in which the error is saved. You do not want to quit before. Why?...
  6. If execve() does not fail the man tells you that...

    If execve() does not fail the man tells you that the data, bss and stack are freed as well as any memory allocation based on mmap(). Malloc() aggregates small memory requests into larger brk() calls....
  7. LOL it was actually fun to follow the links and...

    LOL it was actually fun to follow the links and read the answers. The treat was to see a post about Commodore C64 and its floppy drive VC1541 on a nowadays discussion list.
  8. Forgot! The point of the > echo "" | gcc -E...

    Forgot! The point of the
    > echo "" | gcc -E -dM -x c - | sort
    was to list all the "built-in"/predefined macros of the gcc and of course it does not list any endian macro.
  9. Replies
    18
    Views
    2,874

    Nice :) a really good idea! The one with a...

    Nice :)


    a really good idea! The one with a small is a straightforward hack.
  10. The point of a nibble is that you can need a bit...

    The point of a nibble is that you can need a bit field less than a byte. There is a need to talk about bit-field ordering. You do need nibbles for an IP address. I do not know a real programming...
  11. However, even during shift operations you are not...

    However, even during shift operations you are not "hurt " by the bit-order. Why?
    "Endianness only makes sense when you're breaking up a multi-byte quantity and are trying to store the bytes at...
  12. I am afraid Intel does not agree with you :...

    I am afraid Intel does not agree with you : http://www.intel.com/design/intarch/papers/endian.pdf

    On pp12 Bit Fields and Bit MasksBit operations are endian-sensitive. Even a bit field defined...
  13. There is such a thing called bit nibble:) Even if...

    There is such a thing called bit nibble:) Even if there is no address for a bit.. you are still allowed to put them by hand using a nibble.

    And a piece of code :

    ...
  14. The low-level read(), write() system calls just...

    The low-level read(), write() system calls just read/write bytes. The profile of this functions (see man 2 read) requires only a valid memory address (void *) to start writing/reading from it.

    If...
  15. Replies
    18
    Views
    2,874

    :D I saw , but the thinking step between a quick...

    :D I saw , but the thinking step between a quick fix and a big integer library is not so big.
  16. Replies
    18
    Views
    2,874

    Correct. Point taken:). However there are no...

    Correct. Point taken:).
    However there are no pseudo-primes for all the bases.
    I messed it up with only 2 as a base, but the idea was that for numbers below 1 million is enough to test first 2 ...
  17. Replies
    18
    Views
    2,874

    As a matter of fact for large prime numbers it is...

    As a matter of fact for large prime numbers it is customary to use a primality test. The Miller-Rabin primality test (see wikipedia) is used by RSA. It is a probabilistic algorithm for determining...
Results 1 to 17 of 17