User Profile

Collapse

Profile Sidebar

Collapse
simbasaurus
simbasaurus
Last Activity: Mar 6 '08, 08:07 AM
Joined: Aug 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • simbasaurus
    started a topic HTTP library
    in C

    HTTP library

    Hello!

    Can you please recommend a free HTTP library, for C/C++, that works
    in Linux? It should provide simple functions like connecting to a URL,
    and reading data from a URL.
    If you know, please specify whether it is multithread-safe(it's important
    that it is).

    Thank you very much,
    Simbasaurus.
    See more | Go to post

  • simbasaurus
    replied to Timers on Linux vs Windows
    in C
    Could you please elaborate on the part with setting that flag.
    I don't want the thread to be interrupted during IO, but i haven't
    found any mechanism to block the signal delivery during IO.

    Thanks for clearing things,
    Simbasaurus....
    See more | Go to post

    Leave a comment:


  • simbasaurus
    started a topic weak symbols in shared library
    in C

    weak symbols in shared library

    Hello!

    I built a shared object on linux from several object files.
    In one of the files i redefined the global new and delete C++
    operators. I deffinately do not want these operators to be seen from
    outside the library, however the output i get from nm shows that
    delete is exported as a weak symbol.

    Output of nm -C -l | grep delete :

    0004cab4 W operator delete(void*) ...
    See more | Go to post

  • simbasaurus
    started a topic Timers on Linux vs Windows
    in C

    Timers on Linux vs Windows

    Hello!!

    I am trying to create a Linux timer that emulates the functionality of
    SetTimer from Windows.

    I used timer_create() which sends a signal to the current process when
    the timer expires, so the process stops execution and enters the
    signal handler.

    However, the functionality of SetTimer on Windows is different: the
    current process is interrupted if and only if it is in...
    See more | Go to post

  • simbasaurus
    replied to overloaded global new and delete operators
    in C
    Can you be more specific?...
    See more | Go to post

    Leave a comment:


  • simbasaurus
    started a topic overloaded global new and delete operators
    in C

    overloaded global new and delete operators

    Hello!

    I am working on a really big project, in which the global new and delete operators can be overloaded, by including the file "overloadedops. h".
    The graphical interface was written using wxWidgets.
    The program crashes with SIGSEGV because my new and operators get called by wx functions.
    Could anyone explain why this happens and how can i avoid it (how can i make wx functions use the normal new and...
    See more | Go to post

  • simbasaurus
    started a topic void* to int / int to void *
    in C

    void* to int / int to void *

    Is the following code in any way illegal/wrong/dirty?
    Could it fail to compile on some platforms?

    void *p;
    int x,y;

    x=3;
    p=(void*)x;

    p=&y;
    x=(int)p;

    Thanks for your help,
    Simbasaurus
    See more | Go to post

  • simbasaurus
    replied to makefile problem
    in C
    Thank you, this has been of great help.
    I guess that vpath only builds a list of object files once and that's why it doesn't know about the new object files that were created.
    Your idea with a separate makefile that builds only binaries works great.

    Regards,
    Simbasaurus
    See more | Go to post

    Leave a comment:


  • simbasaurus
    replied to makefile problem
    in C
    well, one mistake was that i wrote
    vpath %.obj $(OBJ)
    instead of
    vpath %.o $(OBJ)

    But i still have to call make twice to produce the shared object.
    See more | Go to post

    Leave a comment:


  • simbasaurus
    started a topic makefile problem
    in C

    makefile problem

    Hello!

    I am trying to write a simple makefile that compiles some C++
    sources from ~/testmake/src and places the object files in
    ~/testmake/obj.

    The makefile looks like this:

    CC=g++
    BASEDIR = ~/testmake
    SRC = $(BASEDIR)/src
    OBJ = $(BASEDIR)/obj

    SOURCES = s1.cpp s2.cpp
    OBJECTS = $(SOURCES:.cpp= .o)


    vpath %.cpp $(SRC)
    vpath...
    See more | Go to post

  • simbasaurus
    replied to behaviour of "new" on bad_alloc
    in C
    Jos, thanks for the reply.
    But should i wrap each of the two int* in a separate class, so that the destructor of the wrapper will release the fully allocated array?
    Is this the only way?
    See more | Go to post

    Leave a comment:


  • simbasaurus
    started a topic behaviour of "new" on bad_alloc
    in C

    behaviour of "new" on bad_alloc

    Hello!

    I am trying to make sure that I clean up and free all the resources that I allocate in my code.

    In the following code, I am assuming that if new throws bad_alloc, than the value of array1 or array2 is unmodified,
    that is, they remain NULL.
    In this case, if allocation of array1 succeeds, and allocation of array2 fails, then array1 will be deallocated.
    What if new does modify the value of the...
    See more | Go to post
No activity results to display
Show More
Working...