X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Futil.h;h=c71f027c51ef6fe523c697338871e1961be5b3b8;hb=f80022d9df98d29ee41176a4bc6cb91025da84b8;hp=b944ec793b817c56fe93a8e15da550857e01a73d;hpb=d1673b006d53fdea72c0744e835362ed1917f879;p=sliver-openvswitch.git diff --git a/lib/util.h b/lib/util.h index b944ec793..c71f027c5 100644 --- a/lib/util.h +++ b/lib/util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,8 +23,10 @@ #include #include #include +#include #include #include "compiler.h" +#include "openvswitch/types.h" #ifndef va_copy #ifdef __va_copy @@ -212,6 +214,7 @@ void ovs_error(int err_no, const char *format, ...) PRINTF_FORMAT(2, 3); void ovs_error_valist(int err_no, const char *format, va_list) PRINTF_FORMAT(2, 0); const char *ovs_retval_to_string(int); +const char *ovs_strerror(int); void ovs_hex_dump(FILE *, const void *, size_t, uintptr_t offset, bool ascii); bool str_to_int(const char *, int base, int *); @@ -265,7 +268,7 @@ ctz(uint32_t n) int log_2_floor(uint32_t); int log_2_ceil(uint32_t); -int popcount(uint32_t); +unsigned int popcount(uint32_t); /* Returns the rightmost 1-bit in 'x' (e.g. 01011000 => 00001000), or 0 if 'x' * is 0. */