JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.92k stars 386 forks source link

rename itoa to fix build on x86_64-pc-msys #31

Closed fcharlie closed 9 years ago

fcharlie commented 9 years ago

I use grep find 'itoa' where is used

./include/joedog/joedog.h:66:void  itoa(int, char []);
./lib/joedog/util.c:76:itoa( int n, char s[] )
./lib/joedog/util.h:66:void   itoa(int, char []);

But , When I build siege on MSYS2 , it's failed, when I comment out those, After build and run success,so I rename itoa ,test it on Windows and linux success.

JoeDog commented 9 years ago

Charlie,

I'd like to understand how itoa (a non-standard function) is being referenced on your system. I'd rather just detect it at configure time then wrap my itoa in a macro.

Jeff

On Thu, Sep 17, 2015 at 12:04 AM, Force.Charlie-I notifications@github.com wrote:

I use grep find 'itoa' where is used

./include/joedog/joedog.h:66:void itoa(int, char []); ./lib/joedog/util.c:76:itoa( int n, char s[] ) ./lib/joedog/util.h:66:void itoa(int, char []);

But , When I build siege on MSYS2 http://msys2.github.io/ , it's failed, when I comment out those, After build and run success,so I rename

itoa ,test it on Windows and linux success.

You can view, comment on, or merge this pull request online at:

https://github.com/JoeDog/siege/pull/31 Commit Summary

  • rename itoa

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/JoeDog/siege/pull/31.

fcharlie commented 9 years ago

Hi Jeff itoa in stdio.h

char *  itoa ( int value, char * str, int base );

but in siege

void  itoa(int, char []);

If C++ is not a problem, but c would appear to redefine This is a simple question, you can rename or delete this function, after all, is not found in other places using itoa

Thanks Charlie

JoeDog commented 9 years ago

Yeah, I can just delete it.

On Thu, Sep 17, 2015 at 10:03 AM, Force.Charlie-I notifications@github.com wrote:

Hi Jeff itoa in stdio.h

char * itoa ( int value, char * str, int base );

but in siege

void itoa(int, char []);

If C++ is not a problem, but c would appear to redefine This is a simple question, you can rename or delete this function, after all, is not found in other places using itoa

Thanks Charlie

— Reply to this email directly or view it on GitHub https://github.com/JoeDog/siege/pull/31#issuecomment-141096428.

fcharlie commented 9 years ago

Build it success , Thanks. 0001

$ tree
.
├── bin
│   ├── bombardment.exe
│   ├── siege.config.exe
│   ├── siege.exe
│   └── siege2csv.pl.exe
├── etc
│   ├── siegerc
│   └── urls.txt
└── share
    └── man
        ├── man1
        │   ├── bombardment.1
        │   ├── siege.1
        │   ├── siege.config.1
        │   └── siege2csv.1
        ├── man5
        │   └── urls_txt.5
        └── man7
            └── layingsiege.7

7 directories, 12 files