X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flpp%2Flpp_comm.c;h=4af7b41cca983f09efff4b1a2f3c5bad768c01d4;hb=6ccff2965d94c272f71df2a1655336af47bb7753;hp=63d344c32e7f827c129a9090c1dc8c8865813b87;hpb=57b6a519027f2fe175dc067c2b9ab29457b8af9b;p=libfirm diff --git a/ir/lpp/lpp_comm.c b/ir/lpp/lpp_comm.c index 63d344c32..4af7b41cc 100644 --- a/ir/lpp/lpp_comm.c +++ b/ir/lpp/lpp_comm.c @@ -1,13 +1,29 @@ -/** - * @file lpp_comm.c - * @date 21.07.2005 - * @author Sebastian Hack +/* + * Copyright (C) 2005-2011 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. * - * Protocol stuff for lpp server + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. * - * Copyright (C) 2005 Universitaet Karlsruhe - * Released under the GPL + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ + +/** + * @file + * @brief Protocol stuff for lpp server + * @author Sebastian Hack + */ +#include "config.h" + #include #include #include @@ -24,16 +40,11 @@ #include #endif -#include "config.h" - -#include "irtools.h" +#include "util.h" #include "debug.h" #include "lpp_comm.h" -/* undef to disable debugging */ -#undef ENABLE_DEBUGGING - struct _lpp_comm_t { int fd; size_t buf_size; @@ -44,6 +55,7 @@ struct _lpp_comm_t { char *r_buf; }; +#ifdef DEBUG_libfirm static inline firm_dbg_module_t *get_dbg_module(void) { static firm_dbg_module_t *dbg = NULL; @@ -53,8 +65,8 @@ static inline firm_dbg_module_t *get_dbg_module(void) return dbg; } - #define dbg get_dbg_module() +#endif /** * Try to read some bytes but block until a certain amount is read.