Filewatcher File Search File Search
Catalog
Content Search
» » » » » » perl-CGI-SpeedyCGI-2.22-12.fc17.src.rpm » Content »
pkg://perl-CGI-SpeedyCGI-2.22-12.fc17.src.rpm:166028/  info  HEADER  downloads

perl-CGI-SpeedyCGI - Speed up perl scripts by running them persistently…  more info»

perl-CGI-SpeedyCGI-2.22-c99_inline.patch

Patch by Andreas Thienemann <andreas@bawue.net> for perl-CGI-SpeedyCGI >= 2.22, to get it building
with GCC versions supporting c99 inline. GCC seems to have changed it's understanding of inline
functions which are optimized into oblivion. The patch changes these inline functions into external
ones, making the thing compile. It's dirty and someone should fix it up in order to be conditional
or so depending on the compiler understanding of inlineness, but it should work for now. Further
information and references:

 - http://www.greenend.org.uk/rjk/2003/03/inline.html
 - http://www.nabble.com/inline-functions-with-gnu99-td16231641.html
 - https://bugzilla.redhat.com/show_bug.cgi?id=464963

--- CGI-SpeedyCGI-2.22/src/speedy_file.c			2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_file.c.c99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -109,7 +109,7 @@
 
 
 #ifdef SPEEDY_BACKEND
-SPEEDY_INLINE void speedy_file_fd_is_suspect(void) {
+void speedy_file_fd_is_suspect(void) {
     fd_is_suspect = 1;
 }
 
@@ -293,7 +293,7 @@
     }
 }
 
-SPEEDY_INLINE int speedy_file_set_state(int new_state) {
+int speedy_file_set_state(int new_state) {
     int retval = cur_state;
 
     if (new_state != cur_state) {
--- CGI-SpeedyCGI-2.22/src/speedy_file.h			2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_file.hc99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -49,8 +49,8 @@
 #define FS_CORRUPT	3	/* Locked, mmaped, non-atomic writes to file */
 
 extern speedy_file_t *speedy_file_maddr;
-SPEEDY_INLINE void speedy_file_fd_is_suspect(void);
+void speedy_file_fd_is_suspect(void);
 int speedy_file_size(void);
-SPEEDY_INLINE int speedy_file_set_state(int new_state);
+int speedy_file_set_state(int new_state);
 void speedy_file_need_reopen(void);
 void speedy_file_fork_child(void);
--- CGI-SpeedyCGI-2.22/src/speedy_inc.h				2008-10-11 02:08:05.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_inc.h.c99_inline		2008-10-11 02:28:25.000000000 +0200
@@ -41,12 +41,6 @@
 #   define MAP_FAILED (-1)
 #endif
 
-#ifdef __GNUC__
-#define SPEEDY_INLINE __inline__
-#else
-#define SPEEDY_INLINE
-#endif
-
 #ifdef EWOULDBLOCK
 #   define SP_EWOULDBLOCK(e) ((e) == EWOULDBLOCK)
 #else
--- CGI-SpeedyCGI-2.22/src/speedy_opt.c				2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_opt.c.c99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -441,7 +441,7 @@
     return (const char * const *)(strlist_export(&exec_argv) + script_argv_loc);
 }
 
-SPEEDY_INLINE const char *speedy_opt_script_fname(void) {
+const char *speedy_opt_script_fname(void) {
     return strlist_export(&exec_argv)[script_argv_loc];
 }
 
--- CGI-SpeedyCGI-2.22/src/speedy_opt.h				2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_opt.h.c99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -44,6 +44,6 @@
 const char * const *speedy_opt_exec_argv(void);
 const char * const *speedy_opt_exec_envp(void);
 const char * const *speedy_opt_orig_argv(void);
-SPEEDY_INLINE const char *speedy_opt_script_fname(void);
+const char *speedy_opt_script_fname(void);
 void speedy_opt_save(void);
 void speedy_opt_restore(void);
--- CGI-SpeedyCGI-2.22/src/speedy_util.c			2008-10-11 02:07:41.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_util.c.c99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -55,7 +55,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_geteuid(void) {
+int speedy_util_geteuid(void) {
     if (my_euid == -1)
 	my_euid = geteuid();
     return my_euid;
@@ -70,7 +70,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_getuid(void) {
+int speedy_util_getuid(void) {
     static int uid = -1;
     if (uid == -1)
 	uid = getuid();
@@ -86,7 +86,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_getpid(void) {
+int speedy_util_getpid(void) {
     if (!saved_pid) saved_pid = getpid();
     return saved_pid;
 }
@@ -178,13 +178,13 @@
     return buf;
 }
 
-SPEEDY_INLINE void speedy_util_gettimeofday(struct timeval *tv) {
+void speedy_util_gettimeofday(struct timeval *tv) {
     if (!saved_time.tv_sec)
 	gettimeofday(&saved_time, NULL);
     *tv = saved_time;
 }
 
-SPEEDY_INLINE int speedy_util_time(void) {
+int speedy_util_time(void) {
     struct timeval tv;
     speedy_util_gettimeofday(&tv);
     return tv.tv_sec;
@@ -290,14 +290,14 @@
     return mi;
 }
 
-SPEEDY_INLINE SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf) {
+SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf) {
     SpeedyDevIno retval;
     retval.d = stbuf->st_dev;
     retval.i = stbuf->st_ino;
     return retval;
 }
 
-SPEEDY_INLINE int speedy_util_open_stat(const char *path, struct stat *stbuf)
+int speedy_util_open_stat(const char *path, struct stat *stbuf)
 {
     int fd = open(path, O_RDONLY);
     if (fd != -1 && fstat(fd, stbuf) == -1) {
--- CGI-SpeedyCGI-2.22/src/speedy_util.c.strerror		2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_util.c.strerror.c99_inline	2008-10-11 02:19:49.000000000 +0200
@@ -55,7 +55,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_geteuid(void) {
+int speedy_util_geteuid(void) {
     if (my_euid == -1)
 	my_euid = geteuid();
     return my_euid;
@@ -70,7 +70,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_getuid(void) {
+int speedy_util_getuid(void) {
     static int uid = -1;
     if (uid == -1)
 	uid = getuid();
@@ -86,7 +86,7 @@
 }
 #endif
 
-SPEEDY_INLINE int speedy_util_getpid(void) {
+int speedy_util_getpid(void) {
     if (!saved_pid) saved_pid = getpid();
     return saved_pid;
 }
@@ -149,13 +149,13 @@
     return buf;
 }
 
-SPEEDY_INLINE void speedy_util_gettimeofday(struct timeval *tv) {
+void speedy_util_gettimeofday(struct timeval *tv) {
     if (!saved_time.tv_sec)
 	gettimeofday(&saved_time, NULL);
     *tv = saved_time;
 }
 
-SPEEDY_INLINE int speedy_util_time(void) {
+int speedy_util_time(void) {
     struct timeval tv;
     speedy_util_gettimeofday(&tv);
     return tv.tv_sec;
@@ -261,14 +261,14 @@
     return mi;
 }
 
-SPEEDY_INLINE SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf) {
+SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf) {
     SpeedyDevIno retval;
     retval.d = stbuf->st_dev;
     retval.i = stbuf->st_ino;
     return retval;
 }
 
-SPEEDY_INLINE int speedy_util_open_stat(const char *path, struct stat *stbuf)
+int speedy_util_open_stat(const char *path, struct stat *stbuf)
 {
     int fd = open(path, O_RDONLY);
     if (fd != -1 && fstat(fd, stbuf) == -1) {
--- CGI-SpeedyCGI-2.22/src/speedy_util.h			2003-10-07 06:03:48.000000000 +0200
+++ CGI-SpeedyCGI-2.22/src/speedy_util.h.c99_inline		2008-10-11 02:19:49.000000000 +0200
@@ -35,25 +35,25 @@
 } SpeedyBuf;
 
 int speedy_util_pref_fd(int oldfd, int newfd);
-SPEEDY_INLINE int speedy_util_getuid(void);
-SPEEDY_INLINE int speedy_util_geteuid(void);
+int speedy_util_getuid(void);
+int speedy_util_geteuid(void);
 int speedy_util_seteuid(int id);
 int speedy_util_argc(const char * const * argv);
-SPEEDY_INLINE int speedy_util_getpid(void);
+int speedy_util_getpid(void);
 void speedy_util_pid_invalidate(void);
 void speedy_util_die(const char *fmt, ...);
 void speedy_util_die_quiet(const char *fmt, ...);
 int speedy_util_execvp(const char *filename, const char *const *argv);
 char *speedy_util_strndup(const char *s, int len);
-SPEEDY_INLINE int speedy_util_time(void);
-SPEEDY_INLINE void speedy_util_gettimeofday(struct timeval *tv);
+int speedy_util_time(void);
+void speedy_util_gettimeofday(struct timeval *tv);
 void speedy_util_time_invalidate(void);
 char *speedy_util_fname(int num, char type);
 char *speedy_util_getcwd(void);
 SpeedyMapInfo *speedy_util_mapin(int fd, int max_size, int file_size);
 void speedy_util_mapout(SpeedyMapInfo *mi);
-SPEEDY_INLINE SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf);
-SPEEDY_INLINE int speedy_util_open_stat(const char *path, struct stat *stbuf);
+SpeedyDevIno speedy_util_stat_devino(const struct stat *stbuf);
+int speedy_util_open_stat(const char *path, struct stat *stbuf);
 void speedy_util_exit(int status, int underbar_exit);
 int speedy_util_kill(pid_t pid, int sig);
 
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com