diff options
Diffstat (limited to 'src/shared/util.h')
| -rw-r--r-- | src/shared/util.h | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/src/shared/util.h b/src/shared/util.h index 3aac165e67..cfb54939cd 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -684,3 +684,15 @@ int unlink_noerrno(const char *path);                  _new_ = alloca(_len_);                  \                  (void *) memset(_new_, 0, _len_);       \          }) + +#define strappenda(a, b)                                \ +        ({                                              \ +                const char *_a_ = (a), *_b_ = (b);      \ +                char *_c_;                              \ +                size_t _x_, _y_;                        \ +                _x_ = strlen(_a_);                      \ +                _y_ = strlen(_b_);                      \ +                _c_ = alloca(_x_ + _y_ + 1);            \ +                strcpy(stpcpy(_c_, _a_), _b_);          \ +                _c_;                                    \ +        }) | 
