Re: [Vala] Vala broken on non-gnu systems

/* Result of the benchmark:
$ time ./a.out 1

real    0m0.225s
user    0m0.223s
sys     0m0.000s
$ time ./a.out 0

real    0m0.380s
user    0m0.377s
sys     0m0.000s
#include <string.h>
#include <sys/types.h>
#define ITERS 100000
int slen = 9999;
char *str;

static inline size_t  mystrnlen(const char*  str, size_t  maxlen) {
    char*  p = memchr(str, 0, maxlen);

    if (p == NULL)
        return maxlen;
        return (p - str);

int test_memchr () {
        int i;
        int ret = 0;
        for (i=0; i< ITERS; i++) {
                ret += mystrnlen (str, slen);
        return ret;

void test_strnlen () {
        int i;
        int ret = 0;
        for (i=0; i< ITERS; i++) {
                ret += strnlen (str, slen);
        return ret;

main(int argc, char **argv) {
        if (argc>1) {
                str = malloc (slen+1);
                memset (str, 'A', slen);
                str[slen] = 0;
                switch (atoi (argv[1])) {
                case 0: test_memchr (); break;
                case 1: test_strnlen (); break;
        } else printf ("Usage: memchr [0|1]\n");

On 03/16/11 09:59, Anatol Pomozov wrote:

On Wed, Mar 16, 2011 at 1:37 AM, Alexander Kojevnikov
<alexander kojevnikov com>  wrote:
On 16 March 2011 16:33, Anatol Pomozov<anatol pomozov gmail com>  wrote:
But now tests are broken because of other error:

make  check-TESTS
TEST: Building...                                                      FAIL
cc1: error: -Wuninitialized is not supported without -O
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
make[4]: *** [check-TESTS] Error 1
make[3]: *** [check-am] Error 2
make[2]: *** [check] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2

This should be fixed by the patch in the other bug I mentioned, please
give it a try:
Thanks for your patches. It is much better now.

Now only dbus tests fail with

   /dbus/basic-types/server:                                            FAIL
Failed to start message bus: launchd's environment variable
DBUS_LAUNCHD_SESSION_BUS_SOCKET is empty, but should contain a socket

EOF in dbus-launch reading address from bus daemon

** CRITICAL **: file /Users/anatol/sources/vala/tests/_test/main.c:
line 19824: uncaught error: Error connecting: No such file or
directory (g-io-error-quark, 1)
dbus.basic_types.server.check: line 4: 74545 Abort trap
./test /dbus/basic-types/server
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec
... or kill -l [sigspec]

It looks similar to this issue
vala-list mailing list
vala-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]