| Anonymous | Login | Signup for a new account | 11-10-2008 11:19 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0001491 | [buildroot] Architecture Specific | major | always | 09-06-07 08:54 | 10-20-07 06:49 | |||||||
| Reporter | HappyCactus | View Status | public | |||||||||
| Assigned To | UlfSamuelsson | |||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | assigned | Product Version | ||||||||||
| Summary | 0001491: QTopia4 and uclibc string.h macro "index()" conflict | |||||||||||
| Description |
QTopia4 4.3.1 and uclibc doesn't compile when __UCLIBC_SUSV3_LEGACY_MACROS__ is defined in uclibc. Infacts we see in $(STAGING_DIR)/usr/include/string.h: # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__ /* bcopy/bzero/bcmp/index/rindex are marked LEGACY in SuSv3. * They are replaced as proposed by SuSv3. Don't sync this part * with glibc and keep it in sync with strings.h. */ # define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0) # define bzero(s,n) (memset((s), '\0', (n)), (void) 0) # define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n)) # define index(s,c) strchr((s), (c)) # define rindex(s,c) strrchr((s), (c)) # endif # Not very smart to define a macro for this very common names. Imagine what happens if src/corelib/kernel/qabstractitemmodel.h contains his code: class Q_CORE_EXPORT QAbstractItemModel : public QObject { // ... virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const = 0; Of course, the preprocessor changes the index to strchr( ... and doesn't compile. A workaround is a patch for the QByteArray.h file that unsets the macro. But it should be better to change the #define index(r,s) with a simple call to the chrchr () function and let the compiler do his optimizations. |
|||||||||||
| Additional Information | ||||||||||||
| Attached Files | ||||||||||||
|
|
||||||||||||
| Copyright © 2000 - 2006 Mantis Group |