summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libezxml/src/ezxml.c2
-rw-r--r--libpiano/src/main.c2
-rw-r--r--libpiano/src/xml.c2
-rw-r--r--libwaitress/src/main.c3
-rw-r--r--libwaitress/src/waitress.h4
-rw-r--r--libwardrobe/src/main.c2
-rw-r--r--src/main.c3
-rw-r--r--src/settings.c2
-rw-r--r--src/terminal.c7
-rw-r--r--src/terminal.h4
-rw-r--r--src/ui.c4
-rw-r--r--src/ui.h8
-rw-r--r--src/ui_readline.c2
-rw-r--r--src/ui_readline.h2
14 files changed, 34 insertions, 13 deletions
diff --git a/libezxml/src/ezxml.c b/libezxml/src/ezxml.c
index 4ba607a..52deb95 100644
--- a/libezxml/src/ezxml.c
+++ b/libezxml/src/ezxml.c
@@ -22,6 +22,8 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#define _BSD_SOURCE /* required by strdup() */
+
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/libpiano/src/main.c b/libpiano/src/main.c
index f5e9b85..0510830 100644
--- a/libpiano/src/main.c
+++ b/libpiano/src/main.c
@@ -21,6 +21,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _BSD_SOURCE /* required by strdup() */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c
index 5045440..8e8fb2a 100644
--- a/libpiano/src/xml.c
+++ b/libpiano/src/xml.c
@@ -21,6 +21,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _BSD_SOURCE /* required by strdup() */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/libwaitress/src/main.c b/libwaitress/src/main.c
index cc06ec6..545aa0a 100644
--- a/libwaitress/src/main.c
+++ b/libwaitress/src/main.c
@@ -21,6 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _POSIX_C_SOURCE 1 /* required by getaddrinfo() */
+#define _BSD_SOURCE /* snprintf() */
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
diff --git a/libwaitress/src/waitress.h b/libwaitress/src/waitress.h
index d8c379d..0dab545 100644
--- a/libwaitress/src/waitress.h
+++ b/libwaitress/src/waitress.h
@@ -64,8 +64,8 @@ void WaitressSetProxy (WaitressHandle_t *, const char *, const char *);
char *WaitressUrlEncode (const char *);
char WaitressSplitUrl (const char *, char *, size_t, char *, size_t, char *,
size_t);
-inline char WaitressSetUrl (WaitressHandle_t *, const char *);
-inline void WaitressSetHPP (WaitressHandle_t *, const char *, const char *,
+char WaitressSetUrl (WaitressHandle_t *, const char *);
+void WaitressSetHPP (WaitressHandle_t *, const char *, const char *,
const char *);
WaitressReturn_t WaitressFetchBuf (WaitressHandle_t *, char **);
WaitressReturn_t WaitressFetchCall (WaitressHandle_t *);
diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c
index e13c09d..d822aa5 100644
--- a/libwardrobe/src/main.c
+++ b/libwardrobe/src/main.c
@@ -53,7 +53,7 @@ inline void WardrobeInit (WardrobeHandle_t *wh) {
* @param pointer
* @param size or 0 to disable zeroing
*/
-inline void WardrobeFree (void *ptr, size_t size) {
+void WardrobeFree (void *ptr, size_t size) {
if (ptr != NULL) {
if (size > 0) {
memset (ptr, 0, size);
diff --git a/src/main.c b/src/main.c
index 65f5bfd..4549118 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,6 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _POSIX_C_SOURCE 1 /* fileno() */
+#define _BSD_SOURCE /* strdup() */
+
/* system includes */
#include <stdlib.h>
#include <string.h>
diff --git a/src/settings.c b/src/settings.c
index 341510f..a7d6f61 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -23,6 +23,8 @@ THE SOFTWARE.
/* application settings */
+#define _BSD_SOURCE /* strdup() */
+
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/terminal.c b/src/terminal.c
index ab96004..2875638 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -21,6 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _POSIX_C_SOURCE 1 /* fileno() */
+#define _BSD_SOURCE /* setlinebuf() */
+
#include <termios.h>
#include <stdio.h>
@@ -60,14 +63,14 @@ void BarTermSetBuffer (char enable) {
/* Save old terminal settings
* @param save settings here
*/
-inline void BarTermSave (struct termios *termOrig) {
+void BarTermSave (struct termios *termOrig) {
tcgetattr (fileno (stdin), termOrig);
}
/* Restore terminal settings
* @param Old settings
*/
-inline void BarTermRestore (struct termios *termOrig) {
+void BarTermRestore (struct termios *termOrig) {
tcsetattr (fileno (stdin), TCSANOW, termOrig);
}
diff --git a/src/terminal.h b/src/terminal.h
index 13e9d57..e7aded9 100644
--- a/src/terminal.h
+++ b/src/terminal.h
@@ -26,7 +26,7 @@ THE SOFTWARE.
void BarTermSetEcho (char);
void BarTermSetBuffer (char);
-inline void BarTermSave (struct termios *);
-inline void BarTermRestore (struct termios *termOrig);
+void BarTermSave (struct termios *);
+void BarTermRestore (struct termios *termOrig);
#endif /* _TERMINAL_H */
diff --git a/src/ui.c b/src/ui.c
index 8fd5f0f..575bdc5 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -23,12 +23,16 @@ THE SOFTWARE.
/* everything that interacts with the user */
+#define _POSIX_C_SOURCE 1 /* fileno() */
+#define _BSD_SOURCE /* strdup() */
+
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <strings.h>
/* waitpid () */
#include <sys/types.h>
diff --git a/src/ui.h b/src/ui.h
index 8726a13..37c83e8 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -31,16 +31,16 @@ THE SOFTWARE.
typedef enum {MSG_NONE, MSG_INFO, MSG_PLAYING, MSG_TIME, MSG_ERR,
MSG_QUESTION, MSG_LIST} uiMsg_t;
-inline void BarUiMsg (uiMsg_t type, const char *format, ...);
-inline PianoReturn_t BarUiPrintPianoStatus (PianoReturn_t ret);
+void BarUiMsg (uiMsg_t type, const char *format, ...);
+PianoReturn_t BarUiPrintPianoStatus (PianoReturn_t ret);
PianoStation_t *BarUiSelectStation (PianoHandle_t *ph, const char *prompt,
FILE *curFd);
PianoSong_t *BarUiSelectSong (PianoSong_t *startSong, FILE *curFd);
PianoArtist_t *BarUiSelectArtist (PianoArtist_t *startArtist, FILE *curFd);
char *BarUiSelectMusicId (PianoHandle_t *ph, FILE *curFd, char *);
void BarStationFromGenre (PianoHandle_t *ph, FILE *curFd);
-inline void BarUiPrintStation (PianoStation_t *);
-inline void BarUiPrintSong (PianoSong_t *, PianoStation_t *);
+void BarUiPrintStation (PianoStation_t *);
+void BarUiPrintSong (PianoSong_t *, PianoStation_t *);
void BarUiStartEventCmd (const BarSettings_t *settings, const char *type,
const PianoStation_t *curStation, const PianoSong_t *curSong,
PianoReturn_t);
diff --git a/src/ui_readline.c b/src/ui_readline.c
index 6b92ca6..b368a56 100644
--- a/src/ui_readline.c
+++ b/src/ui_readline.c
@@ -167,7 +167,7 @@ size_t BarReadline (char *buf, size_t bufSize, const char *mask,
* @param buffer size
* @return number of bytes read from stdin
*/
-inline size_t BarReadlineStr (char *buf, size_t bufSize, char noEcho,
+size_t BarReadlineStr (char *buf, size_t bufSize, char noEcho,
FILE *fd) {
return BarReadline (buf, bufSize, NULL, 0, noEcho, fd);
}
diff --git a/src/ui_readline.h b/src/ui_readline.h
index 194668a..f9620b6 100644
--- a/src/ui_readline.h
+++ b/src/ui_readline.h
@@ -22,7 +22,7 @@ THE SOFTWARE.
*/
size_t BarReadline (char *, size_t, const char *, char, char, FILE *);
-inline size_t BarReadlineStr (char *, size_t, char, FILE *);
+size_t BarReadlineStr (char *, size_t, char, FILE *);
size_t BarReadlineInt (int *, FILE *);
int BarReadlineYesNo (char def, FILE *);