Slashdot Mirror


APR 1.0.0 Goes Gold

cliffwoolley writes "After several years of development, the Apache Portable Runtime, which is the portability library underlying the Apache HTTP Server 2.x, has finally reached its own 1.0.0 release. If you want to write a portable app without the headaches, APR is the way to do it. Grab a copy and check it out. The full announcement is here."

8 of 111 comments (clear)

  1. Re:APR by Electrum · · Score: 4, Informative

    Any comparisons out there between APR and things like SDL?

    APR is for servers, SDL is for games.

  2. Re:java-ish? by dollargonzo · · Score: 4, Informative

    this a C library, not a virtual machine/language like jvm/java. the idea is not to have code run without recompile on all platforms, but rather that *all* you need is a recompile. more specifically, you don't need to have platform specific cases in your code. code becomes pretty unmaintainable when it is littered with #ifdefs

    --
    BSD is for people who love UNIX. Linux is for those who hate Microsoft.
  3. Re:APR by cbrocious · · Score: 4, Informative

    But SDL provides cross-platform threading and such. It's been used in many things other than just games (which is why it's not just sound and video)

    --
    Disconnect and self-destruct, one bullet at a time.
  4. Re:glib? by DylanQuixote · · Score: 5, Informative

    glib didn't exist at the time the APR was started. Also glib is still not quite useful on windows.

  5. Re:glib? by E-Lad · · Score: 4, Informative

    You have the wrong idea of what APR is.

    APR is a library which, at its basic level, provides wrapper functions to syscalls of many different operating systems. Why? because the same syscall on one OS sometimes behaves differently, have bugs, or take slightly different arguments from the same syscall on other OSes.

    APR addresses these differences and provides you, the app developer, with a common set of functions.

    So if you're say coding your own FTP server project and you main development platform is linux or what have you, if you use APR's wrtite() or APR's sendfile(), you know that your call to that will also work on Solaris, FreeBSD, Darwin, etc... because APR takes care of all the abstraction at compile time. /dale

  6. Some info on APR ... by pikine · · Score: 5, Informative

    First of all, APR is not a virtual machine or bytecode interpreter like that of .NET common language runtime or JVM. APR is a library (collection of functions) written in C, for C programs. It contains a lot of wrappers to the real standard C library functions, because some conventions of standard library still varies from OS to OS.

    For example, the path separator is different in Unix ("/"), Windows ("\"), MacOS (":" - pre X, but also Finder in OS X). Another example is loading dynamically linked libraries (DSO in APR speech). Yet another example is threads.

    Besides wrappers, APR has its own memory management routines. APR also adds utility functions not found in the standard library, such as hash table.

    By the way, it would be helpful if someone can post a comparison between NSPR (netscape portable runtime) and APR.

    --
    I once had a signature.
    1. Re:Some info on APR ... by DrXym · · Score: 4, Informative
      The NSPR offers similar functionality. Info about the NSPR is here.

      I'm guessing by this stage that both the APR and NSPR are industrial strength libs to write cross-platforms against. Both have similar functionality because both underpin web servers (yes NSPR is used by the AOL/Sun iPlanet webserver, and not just Mozilla).

      What it might boil down to in the end is which runtime's licence is most compatible with what you have in mind.

  7. Re:Yet another library for an obsolete language by Billly+Gates · · Score: 4, Informative

    Unfortunatly g++ is not a good c++ compiler so all the Unix nerds look at the size of the compiled program and time to execute and assume the problem is with C++ itself and then continue to work in C.

    There is alot of anti c++ sentiment in the unix community because of that.