[asterisk-commits] kpfleming: trunk r87498 - in /trunk/utils: ./ Makefile hashtest2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 29 17:44:50 CDT 2007
Author: kpfleming
Date: Mon Oct 29 17:44:49 2007
New Revision: 87498
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87498
Log:
UGH... while trying to fix #10995, I found all kinds of cruft in this Makefile. It should all be gone now, and as a side effect hashtest2 now builds with --enable-dev-mode enabled without a host of errors
Modified:
trunk/utils/ (props changed)
trunk/utils/Makefile
trunk/utils/hashtest2.c
Propchange: trunk/utils/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct 29 17:44:49 2007
@@ -21,3 +21,4 @@
sha1.c
astobj2.c
hashtest2
+threadstorage.c
Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?view=diff&rev=87498&r1=87497&r2=87498
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Mon Oct 29 17:44:49 2007
@@ -96,50 +96,44 @@
pval.o : ASTCFLAGS+=-DSTANDALONE
-check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o clicompat.o ../main/threadstorage.o
+check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o clicompat.o threadstorage.o
aelbison.c: ../res/ael/ael.tab.c
@cp $< $@
-aelbison.o: aelbison.c ../res/ael/ael.tab.h ../include/asterisk/ael_structs.h
+
aelbison.o: ASTCFLAGS+=-I../res/ael -DYYENABLE_NLS=0
pbx_ael.c: ../pbx/pbx_ael.c
@cp $< $@
+
pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
-
-ael_main.o: ael_main.c ../include/asterisk/ael_structs.h
aelparse.c: ../res/ael/ael_lex.c
@cp $< $@
-aelparse.o: aelparse.c ../include/asterisk/ael_structs.h ../res/ael/ael.tab.h
+
aelparse.o: ASTCFLAGS+=-I../res -DSTANDALONE_AEL
aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
-astobj2.c : ../main/astobj2.c ../include/asterisk/astobj2.h
- cp ../main/astobj2.c .
+astobj2.c: ../main/astobj2.c
+ @cp $< $@
-utils.c : ../main/utils.c
- cp ../main/utils.c .
+utils.c: ../main/utils.c
+ @cp $< $@
-sha1.c : ../main/sha1.c
- cp ../main/sha1.c .
+sha1.c: ../main/sha1.c
+ @cp $< $@
-sha1.o : sha1.c
-utils.o : utils.c
+threadstorage.c: ../main/threadstorage.c
+ @cp $< $@
-astobj2.o : astobj2.c
+hashtest2.o: ASTCFLAGS+=-O0
-hashtest2.o : hashtest2.c
- $(CC) -g -O0 -c hashtest2.c $(PTHREAD_CFLAGS) -I/usr/include -I../include
-
-hashtest2 : hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o ../main/threadstorage.o clicompat.o
- $(CC) -g -O0 -o hashtest2 hashtest2.o astobj2.o utils.o md5.o sha1.o strcompat.o ../main/threadstorage.o clicompat.o $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(LIBS)
+hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o
extconf.o : extconf.c
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
-
testexpr2s: ../main/ast_expr2f.c ../main/ast_expr2.c ../main/ast_expr2.h
$(CC) -g -c -I../include -DSTANDALONE_AEL ../main/ast_expr2f.c -o ast_expr2f.o
Modified: trunk/utils/hashtest2.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/hashtest2.c?view=diff&rev=87498&r1=87497&r2=87498
==============================================================================
--- trunk/utils/hashtest2.c (original)
+++ trunk/utils/hashtest2.c Mon Oct 29 17:44:49 2007
@@ -59,6 +59,7 @@
int64_t ast_mark(int prof_id, int x)
{
+ return 0;
}
/* my OBJECT */
@@ -71,7 +72,7 @@
static int hash_string(const void *obj, const int flags)
{
- unsigned char *str = ((struct ht_element*)obj)->key;
+ char *str = ((struct ht_element*)obj)->key;
int total;
for (total=0; *str; str++)
@@ -97,7 +98,7 @@
/* random numbers */
-my_rand(int incl_low, int incl_high, unsigned int *seedp)
+static int my_rand(int incl_low, int incl_high, unsigned int *seedp)
{
if (incl_high == 0)
return 0;
@@ -121,7 +122,7 @@
/* all the operations to perform on the hashtab */
-void ht_destroy(void *obj)
+static void ht_destroy(void *obj)
{
const struct ht_element *o = obj;
if (o->key)
@@ -219,13 +220,13 @@
int my_els_found = 0;
int my_els_traversals = 0;
int my_testno = testno++;
+ int its;
/* data will be a random number == use as a seed for random numbers */
unsigned long seed = (unsigned long)data;
printf("hashtest thread created... test beginning\n");
/* main test routine-- a global hashtab exists, pound it like crazy */
- int its;
for(its=0;its<100000;its++)
{
void *seed2 = &seed;
@@ -269,7 +270,7 @@
pthread_exit(0);
}
-void run_hashtest(int numthr)
+static void run_hashtest(int numthr)
{
pthread_t thr[numthr];
void *thrres[numthr];
@@ -321,13 +322,9 @@
}
-struct ast_app *pbx_findapp(const char *app)
-{
- return (struct ast_app*)1; /* so as not to trigger an error */
-}
-
-int ast_add_profile(const char *x, uint64_t scale)
-{
+int ast_add_profile(const char *x, uint64_t scale)
+{
+ return 0;
}
int ast_loader_register(int (*updater)(void))
@@ -355,14 +352,6 @@
void ast_unregister_file_version(const char *file)
{
-}
-
-void ast_cli_unregister_multiple(void)
-{
-}
-
-void ast_context_destroy(void)
-{
}
void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
More information about the asterisk-commits
mailing list