commit d1f0c6e23a4b29ad9a89d966f66335e18d12e7e4 Author: David Goulet dgoulet@ev0ke.net Date: Thu Jun 6 20:34:29 2013 -0400
Add macros.h with useful call
Signed-off-by: David Goulet dgoulet@ev0ke.net --- src/common/macros.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/src/common/macros.h b/src/common/macros.h new file mode 100644 index 0000000..5702b2e --- /dev/null +++ b/src/common/macros.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2013 - David Goulet dgoulet@ev0ke.net + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License, version 2 only, as + * published by the Free Software Foundation. + * + * 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., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef TORSOCKS_MACROS_H +#define TORSOCKS_MACROS_H + +/* Memory allocation zeroed. */ +#define zmalloc(x) calloc(1, x) + +#ifndef ATTR_HIDDEN +#define ATTR_HIDDEN __attribute__((visibility("hidden"))) +#endif + +#endif /* TORSOCKS_MACROS_H */
tor-commits@lists.torproject.org