Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=baceeb0dae25892bd61c7e2e5139af473b8d622c
commit baceeb0dae25892bd61c7e2e5139af473b8d622c Author: Michel Hermier <herm...@frugalware.org> Date: Sat Nov 16 21:37:00 2013 +0100 libpacman: Add f_ptrcmp. diff --git a/lib/libpacman/fstdlib.h b/lib/libpacman/fstdlib.h new file mode 100644 index 0000000..bea2601 --- /dev/null +++ b/lib/libpacman/fstdlib.h @@ -0,0 +1,34 @@ +/* + * fstdlib.h + * + * Copyright (c) 2013 by Michel Hermier <herm...@frugalware.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +#ifndef _F_STDLIB_H +#define _F_STDLIB_H + +#include <stdlib.h> +#include <stdint.h> + +static +int f_ptrcmp(const void *ptr1, const void *ptr2) { + return (uintptr_t)ptr1 - (uintptr_t)ptr2; +} + +#endif /* _F_STDLIB_H */ + +/* vim: set ts=2 sw=2 noet: */ _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git